]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 18:33:45 +0000 (11:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 18:33:45 +0000 (11:33 -0700)
Pull security layer updates from James Morris:
 "There are a bunch of fixes to the TPM, IMA, and Keys code, with minor
  fixes scattered across the subsystem.

  IMA now requires signed policy, and that policy is also now measured
  and appraised"

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (67 commits)
  X.509: Make algo identifiers text instead of enum
  akcipher: Move the RSA DER encoding check to the crypto layer
  crypto: Add hash param to pkcs1pad
  sign-file: fix build with CMS support disabled
  MAINTAINERS: update tpmdd urls
  MODSIGN: linux/string.h should be #included to get memcpy()
  certs: Fix misaligned data in extra certificate list
  X.509: Handle midnight alternative notation in GeneralizedTime
  X.509: Support leap seconds
  Handle ISO 8601 leap seconds and encodings of midnight in mktime64()
  X.509: Fix leap year handling again
  PKCS#7: fix unitialized boolean 'want'
  firmware: change kernel read fail to dev_dbg()
  KEYS: Use the symbol value for list size, updated by scripts/insert-sys-cert
  KEYS: Reserve an extra certificate symbol for inserting without recompiling
  modsign: hide openssl output in silent builds
  tpm_tis: fix build warning with tpm_tis_resume
  ima: require signed IMA policy
  ima: measure and appraise the IMA policy itself
  ima: load policy using path
  ...

1  2 
MAINTAINERS
arch/x86/configs/i386_defconfig
init/Kconfig
kernel/kexec_file.c
kernel/module.c

diff --combined MAINTAINERS
index 99bd725affc60e1c5882e409890fbe94f061bc67,2900d481dba777f224b075dd9eb9f8b859912973..5e6f388f3c3e813947bf2befb65ee98d34e5b4c4
@@@ -920,24 -920,17 +920,24 @@@ M:      Emilio López <emilio@elopez.com.ar
  S:    Maintained
  F:    drivers/clk/sunxi/
  
 -ARM/Amlogic MesonX SoC support
 +ARM/Amlogic Meson SoC support
  M:    Carlo Caione <carlo@caione.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +L:    linux-meson@googlegroups.com
 +W:    http://linux-meson.com/
  S:    Maintained
 -F:    drivers/media/rc/meson-ir.c
 -N:    meson[x68]
 +F:    arch/arm/mach-meson/
 +F:    arch/arm/boot/dts/meson*
 +N:    meson
  
  ARM/Annapurna Labs ALPINE ARCHITECTURE
  M:    Tsahee Zidenberg <tsahee@annapurnalabs.com>
 +M:    Antoine Tenart <antoine.tenart@free-electrons.com>
  S:    Maintained
  F:    arch/arm/mach-alpine/
 +F:    arch/arm/boot/dts/alpine*
 +F:    arch/arm64/boot/dts/al/
 +F:    drivers/*/*alpine*
  
  ARM/ATMEL AT91RM9200, AT91SAM9 AND SAMA5 SOC SUPPORT
  M:    Nicolas Ferre <nicolas.ferre@atmel.com>
@@@ -1449,8 -1442,8 +1449,8 @@@ S:      Maintaine
  ARM/RENESAS ARM64 ARCHITECTURE
  M:    Simon Horman <horms@verge.net.au>
  M:    Magnus Damm <magnus.damm@gmail.com>
 -L:    linux-sh@vger.kernel.org
 -Q:    http://patchwork.kernel.org/project/linux-sh/list/
 +L:    linux-renesas-soc@vger.kernel.org
 +Q:    http://patchwork.kernel.org/project/linux-renesas-soc/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
  S:    Supported
  F:    arch/arm64/boot/dts/renesas/
@@@ -2369,6 -2362,14 +2369,6 @@@ T:     git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  N:    bcm2835
  
 -BROADCOM BCM33XX MIPS ARCHITECTURE
 -M:    Kevin Cernekee <cernekee@gmail.com>
 -L:    linux-mips@linux-mips.org
 -S:    Maintained
 -F:    arch/mips/bcm3384/*
 -F:    arch/mips/include/asm/mach-bcm3384/*
 -F:    arch/mips/kernel/*bmips*
 -
  BROADCOM BCM47XX MIPS ARCHITECTURE
  M:    Hauke Mehrtens <hauke@hauke-m.de>
  M:    Rafał Miłecki <zajec5@gmail.com>
@@@ -2422,7 -2423,6 +2422,7 @@@ F:      arch/mips/bmips/
  F:    arch/mips/include/asm/mach-bmips/*
  F:    arch/mips/kernel/*bmips*
  F:    arch/mips/boot/dts/brcm/bcm*.dts*
 +F:    drivers/irqchip/irq-bcm63*
  F:    drivers/irqchip/irq-bcm7*
  F:    drivers/irqchip/irq-brcmstb*
  F:    include/linux/bcm963xx_nvram.h
@@@ -3452,6 -3452,7 +3452,6 @@@ F:      drivers/usb/dwc2
  DESIGNWARE USB3 DRD IP DRIVER
  M:    Felipe Balbi <balbi@kernel.org>
  L:    linux-usb@vger.kernel.org
 -L:    linux-omap@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
  S:    Maintained
  F:    drivers/usb/dwc3/
@@@ -4519,12 -4520,6 +4519,12 @@@ L:    linuxppc-dev@lists.ozlabs.or
  S:    Maintained
  F:    drivers/dma/fsldma.*
  
 +FREESCALE GPMI NAND DRIVER
 +M:    Han Xu <han.xu@nxp.com>
 +L:    linux-mtd@lists.infradead.org
 +S:    Maintained
 +F:    drivers/mtd/nand/gpmi-nand/*
 +
  FREESCALE I2C CPM DRIVER
  M:    Jochen Friedrich <jochen@scram.de>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -4541,7 -4536,7 +4541,7 @@@ F:      include/linux/platform_data/video-im
  F:    drivers/video/fbdev/imxfb.c
  
  FREESCALE QUAD SPI DRIVER
 -M:    Han Xu <han.xu@freescale.com>
 +M:    Han Xu <han.xu@nxp.com>
  L:    linux-mtd@lists.infradead.org
  S:    Maintained
  F:    drivers/mtd/spi-nor/fsl-quadspi.c
@@@ -4555,15 -4550,6 +4555,15 @@@ S:    Maintaine
  F:    drivers/net/ethernet/freescale/fs_enet/
  F:    include/linux/fs_enet_pd.h
  
 +FREESCALE IMX / MXC FEC DRIVER
 +M:    Fugang Duan <fugang.duan@nxp.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/ethernet/freescale/fec_main.c
 +F:    drivers/net/ethernet/freescale/fec_ptp.c
 +F:    drivers/net/ethernet/freescale/fec.h
 +F:    Documentation/devicetree/bindings/net/fsl-fec.txt
 +
  FREESCALE QUICC ENGINE LIBRARY
  L:    linuxppc-dev@lists.ozlabs.org
  S:    Orphan
@@@ -5007,9 -4993,9 +5007,9 @@@ F:      Documentation/blockdev/cpqarray.tx
  F:    drivers/block/cpqarray.*
  
  HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa)
 -M:    Don Brace <don.brace@pmcs.com>
 +M:    Don Brace <don.brace@microsemi.com>
  L:    iss_storagedev@hp.com
 -L:    storagedev@pmcs.com
 +L:    esc.storagedev@microsemi.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    Documentation/scsi/hpsa.txt
@@@ -5205,7 -5191,6 +5205,7 @@@ F:      arch/x86/kernel/cpu/mshyperv.
  F:    drivers/hid/hid-hyperv.c
  F:    drivers/hv/
  F:    drivers/input/serio/hyperv-keyboard.c
 +F:    drivers/pci/host/pci-hyperv.c
  F:    drivers/net/hyperv/
  F:    drivers/scsi/storvsc_drv.c
  F:    drivers/video/fbdev/hyperv_fb.c
@@@ -6151,7 -6136,7 +6151,7 @@@ F:      include/uapi/linux/sunrpc
  
  KERNEL SELFTEST FRAMEWORK
  M:    Shuah Khan <shuahkh@osg.samsung.com>
 -L:    linux-api@vger.kernel.org
 +L:    linux-kselftest@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/shuah/linux-kselftest
  S:    Maintained
  F:    tools/testing/selftests
@@@ -6682,12 -6667,13 +6682,12 @@@ S:   Maintaine
  F:    arch/arm/mach-lpc32xx/
  
  LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
 -M:    Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
 -M:    Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>
 -M:    Sreekanth Reddy <sreekanth.reddy@avagotech.com>
 -M:    Abhijit Mahajan <abhijit.mahajan@avagotech.com>
 -L:    MPT-FusionLinux.pdl@avagotech.com
 +M:    Sathya Prakash <sathya.prakash@broadcom.com>
 +M:    Chaitra P B <chaitra.basappa@broadcom.com>
 +M:    Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
 +L:    MPT-FusionLinux.pdl@broadcom.com
  L:    linux-scsi@vger.kernel.org
 -W:    http://www.lsilogic.com/support
 +W:    http://www.avagotech.com/support/
  S:    Supported
  F:    drivers/message/fusion/
  F:    drivers/scsi/mpt2sas/
@@@ -6780,7 -6766,6 +6780,7 @@@ S:      Maintaine
  F:    Documentation/networking/mac80211-injection.txt
  F:    include/net/mac80211.h
  F:    net/mac80211/
 +F:    drivers/net/wireless/mac80211_hwsim.[ch]
  
  MACVLAN DRIVER
  M:    Patrick McHardy <kaber@trash.net>
@@@ -6910,7 -6895,7 +6910,7 @@@ MAXIM MAX77802 MULTIFUNCTION PMIC DEVIC
  M:    Javier Martinez Canillas <javier@osg.samsung.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
 -F:    drivers/*/*max77802.c
 +F:    drivers/*/*max77802*.c
  F:    Documentation/devicetree/bindings/*/*max77802.txt
  F:    include/dt-bindings/*/*max77802.h
  
@@@ -6920,7 -6905,7 +6920,7 @@@ M:      Krzysztof Kozlowski <k.kozlowski@sam
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  F:    drivers/*/max14577.c
 -F:    drivers/*/max77686.c
 +F:    drivers/*/max77686*.c
  F:    drivers/*/max77693.c
  F:    drivers/extcon/extcon-max14577.c
  F:    drivers/extcon/extcon-max77693.c
@@@ -7236,8 -7221,10 +7236,8 @@@ L:     linux-media@vger.kernel.or
  W:    https://linuxtv.org
  W:    http://palosaari.fi/linux/
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 -T:    git git://linuxtv.org/anttip/media_tree.git
  S:    Maintained
 -F:    drivers/staging/media/mn88473/
 -F:    drivers/media/dvb-frontends/mn88473.h
 +F:    drivers/media/dvb-frontends/mn88473*
  
  MODULE SUPPORT
  M:    Rusty Russell <rusty@rustcorp.com.au>
@@@ -7375,7 -7362,7 +7375,7 @@@ F:      drivers/tty/isicom.
  F:    include/linux/isicom.h
  
  MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
 -M:    Felipe Balbi <balbi@kernel.org>
 +M:    Bin Liu <b-liu@ti.com>
  L:    linux-usb@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
  S:    Maintained
@@@ -7398,17 -7385,6 +7398,17 @@@ W:    https://www.myricom.com/support/down
  S:    Supported
  F:    drivers/net/ethernet/myricom/myri10ge/
  
 +NAND FLASH SUBSYSTEM
 +M:    Boris Brezillon <boris.brezillon@free-electrons.com>
 +R:    Richard Weinberger <richard@nod.at>
 +L:    linux-mtd@lists.infradead.org
 +W:    http://www.linux-mtd.infradead.org/
 +Q:    http://patchwork.ozlabs.org/project/linux-mtd/list/
 +T:    git git://github.com/linux-nand/linux.git
 +S:    Maintained
 +F:    drivers/mtd/nand/
 +F:    include/linux/mtd/nand*.h
 +
  NATSEMI ETHERNET DRIVER (DP8381x)
  S:    Orphan
  F:    drivers/net/ethernet/natsemi/natsemi.c
@@@ -7718,13 -7694,13 +7718,13 @@@ S:   Maintaine
  F:    arch/nios2/
  
  NOKIA N900 POWER SUPPLY DRIVERS
 -M:    Pali Rohár <pali.rohar@gmail.com>
 -S:    Maintained
 +R:    Pali Rohár <pali.rohar@gmail.com>
  F:    include/linux/power/bq2415x_charger.h
  F:    include/linux/power/bq27xxx_battery.h
  F:    include/linux/power/isp1704_charger.h
  F:    drivers/power/bq2415x_charger.c
  F:    drivers/power/bq27xxx_battery.c
 +F:    drivers/power/bq27xxx_battery_i2c.c
  F:    drivers/power/isp1704_charger.c
  F:    drivers/power/rx51_battery.c
  
@@@ -7955,9 -7931,11 +7955,9 @@@ F:     drivers/media/platform/omap3isp
  F:    drivers/staging/media/omap4iss/
  
  OMAP USB SUPPORT
 -M:    Felipe Balbi <balbi@kernel.org>
  L:    linux-usb@vger.kernel.org
  L:    linux-omap@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
 -S:    Maintained
 +S:    Orphan
  F:    drivers/usb/*/*omap*
  F:    arch/arm/*omap*/usb*
  
@@@ -8381,20 -8359,12 +8381,20 @@@ L:   linux-pci@vger.kernel.or
  S:    Maintained
  F:    drivers/pci/host/*designware*
  
 +PCI DRIVER FOR SYNOPSYS PROTOTYPING DEVICE
 +M:    Joao Pinto <jpinto@synopsys.com>
 +L:    linux-pci@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/designware-pcie.txt
 +F:    drivers/pci/host/pcie-designware-plat.c
 +
  PCI DRIVER FOR GENERIC OF HOSTS
  M:    Will Deacon <will.deacon@arm.com>
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/host-generic-pci.txt
 +F:    drivers/pci/host/pci-host-common.c
  F:    drivers/pci/host/pci-host-generic.c
  
  PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD)
@@@ -8440,14 -8410,6 +8440,14 @@@ L:     linux-arm-msm@vger.kernel.or
  S:     Maintained
  F:     drivers/pci/host/*qcom*
  
 +PCIE DRIVER FOR CAVIUM THUNDERX
 +M:    David Daney <david.daney@cavium.com>
 +L:    linux-pci@vger.kernel.org
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Supported
 +F:    Documentation/devicetree/bindings/pci/pci-thunder-*
 +F:    drivers/pci/host/pci-thunder-*
 +
  PCMCIA SUBSYSTEM
  P:    Linux PCMCIA Team
  L:    linux-pcmcia@lists.infradead.org
@@@ -8490,7 -8452,6 +8490,7 @@@ PERFORMANCE EVENTS SUBSYSTE
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Ingo Molnar <mingo@redhat.com>
  M:    Arnaldo Carvalho de Melo <acme@kernel.org>
 +R:    Alexander Shishkin <alexander.shishkin@linux.intel.com>
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
  S:    Supported
@@@ -9605,12 -9566,6 +9605,12 @@@ M:    Andreas Noever <andreas.noever@gmail
  S:    Maintained
  F:    drivers/thunderbolt/
  
 +TI BQ27XXX POWER SUPPLY DRIVER
 +R:    Andrew F. Davis <afd@ti.com>
 +F:    include/linux/power/bq27xxx_battery.h
 +F:    drivers/power/bq27xxx_battery.c
 +F:    drivers/power/bq27xxx_battery_i2c.c
 +
  TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER
  M:    John Stultz <john.stultz@linaro.org>
  M:    Thomas Gleixner <tglx@linutronix.de>
@@@ -9688,7 -9643,7 +9688,7 @@@ F:      drivers/scsi/sg.
  F:    include/scsi/sg.h
  
  SCSI SUBSYSTEM
 -M:    "James E.J. Bottomley" <JBottomley@odin.com>
 +M:    "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
  M:    "Martin K. Petersen" <martin.petersen@oracle.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
@@@ -9832,11 -9787,10 +9832,11 @@@ S:   Supporte
  F:    drivers/scsi/be2iscsi/
  
  Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER
 -M:    Sathya Perla <sathya.perla@avagotech.com>
 -M:    Ajit Khaparde <ajit.khaparde@avagotech.com>
 -M:    Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
 -M:    Sriharsha Basavapatna <sriharsha.basavapatna@avagotech.com>
 +M:    Sathya Perla <sathya.perla@broadcom.com>
 +M:    Ajit Khaparde <ajit.khaparde@broadcom.com>
 +M:    Padmanabh Ratnakar <padmanabh.ratnakar@broadcom.com>
 +M:    Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
 +M:    Somnath Kotur <somnath.kotur@broadcom.com>
  L:    netdev@vger.kernel.org
  W:    http://www.emulex.com
  S:    Supported
@@@ -10895,14 -10849,6 +10895,14 @@@ L: linux-omap@vger.kernel.or
  S:    Maintained
  F:    drivers/thermal/ti-soc-thermal/
  
 +TI VPE/CAL DRIVERS
 +M:    Benoit Parrot <bparrot@ti.com>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +S:    Maintained
 +F:    drivers/media/platform/ti-vpe/
 +
  TI CDCE706 CLOCK DRIVER
  M:    Max Filippov <jcmvbkbc@gmail.com>
  S:    Maintained
@@@ -11126,8 -11072,8 +11126,8 @@@ M:   Jarkko Sakkinen <jarkko.sakkinen@lin
  R:    Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
  W:    http://tpmdd.sourceforge.net
  L:    tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
- Q:    git git://github.com/PeterHuewe/linux-tpmdd.git
- T:    git https://github.com/PeterHuewe/linux-tpmdd
+ Q:    https://patchwork.kernel.org/project/tpmdd-devel/list/
+ T:    git git://git.infradead.org/users/jjs/linux-tpmdd.git
  S:    Maintained
  F:    drivers/char/tpm/
  
@@@ -12074,6 -12020,7 +12074,6 @@@ F:   arch/arm64/xen
  F:    arch/arm64/include/asm/xen/
  
  XEN NETWORK BACKEND DRIVER
 -M:    Ian Campbell <ian.campbell@citrix.com>
  M:    Wei Liu <wei.liu2@citrix.com>
  L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
  L:    netdev@vger.kernel.org
index e25a1630320cc47b3112b8082eaba3cb66cc0cee,a212b68a49094815af644b17c4caacbe5a1d9d39..265901a84f3f51f60c54fd3a3bab50234ac331e5
@@@ -288,7 -288,7 +288,7 @@@ CONFIG_NLS_ISO8859_1=
  CONFIG_NLS_UTF8=y
  CONFIG_PRINTK_TIME=y
  # CONFIG_ENABLE_WARN_DEPRECATED is not set
 -CONFIG_FRAME_WARN=2048
 +CONFIG_FRAME_WARN=1024
  CONFIG_MAGIC_SYSRQ=y
  # CONFIG_UNUSED_SYMBOLS is not set
  CONFIG_DEBUG_KERNEL=y
@@@ -303,7 -303,6 +303,6 @@@ CONFIG_DEBUG_STACKOVERFLOW=
  # CONFIG_DEBUG_RODATA_TEST is not set
  CONFIG_DEBUG_BOOT_PARAMS=y
  CONFIG_OPTIMIZE_INLINING=y
- CONFIG_KEYS_DEBUG_PROC_KEYS=y
  CONFIG_SECURITY=y
  CONFIG_SECURITY_NETWORK=y
  CONFIG_SECURITY_SELINUX=y
diff --combined init/Kconfig
index fd664b3ab99ef79432643ab3e954943e759f81ca,af4de4f1b02c339f2f31c5b951a85008d204f2db..2d70c8c4b1d8fdcff16997b7b145cc32d8a5d7f9
@@@ -1420,28 -1420,6 +1420,28 @@@ config KALLSYMS_AL
  
           Say N unless you really need all symbols.
  
 +config KALLSYMS_ABSOLUTE_PERCPU
 +      bool
 +      default X86_64 && SMP
 +
 +config KALLSYMS_BASE_RELATIVE
 +      bool
 +      depends on KALLSYMS
 +      default !IA64 && !(TILE && 64BIT)
 +      help
 +        Instead of emitting them as absolute values in the native word size,
 +        emit the symbol references in the kallsyms table as 32-bit entries,
 +        each containing a relative value in the range [base, base + U32_MAX]
 +        or, when KALLSYMS_ABSOLUTE_PERCPU is in effect, each containing either
 +        an absolute value in the range [0, S32_MAX] or a relative value in the
 +        range [base, base + S32_MAX], where base is the lowest relative symbol
 +        address encountered in the image.
 +
 +        On 64-bit builds, this reduces the size of the address table by 50%,
 +        but more importantly, it results in entries whose values are build
 +        time constants, and no relocation pass is required at runtime to fix
 +        up the entries based on the runtime load address of the kernel.
 +
  config PRINTK
        default y
        bool "Enable support for printk" if EXPERT
@@@ -1779,9 -1757,9 +1779,9 @@@ config SYSTEM_DATA_VERIFICATIO
        select SYSTEM_TRUSTED_KEYRING
        select KEYS
        select CRYPTO
+       select CRYPTO_RSA
        select ASYMMETRIC_KEY_TYPE
        select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
-       select PUBLIC_KEY_ALGO_RSA
        select ASN1
        select OID_REGISTRY
        select X509_CERTIFICATE_PARSER
diff --combined kernel/kexec_file.c
index 56b18eb1f0013c9bc7e041a3dd2a8ecaeb580b95,b696c3f3708f49587d2413959d088060770cbd39..c72d2ff5896e9f37e21c789d45d7b2cc058be9f0
@@@ -18,6 -18,7 +18,7 @@@
  #include <linux/kexec.h>
  #include <linux/mutex.h>
  #include <linux/list.h>
+ #include <linux/fs.h>
  #include <crypto/hash.h>
  #include <crypto/sha.h>
  #include <linux/syscalls.h>
@@@ -33,65 -34,6 +34,6 @@@ size_t __weak kexec_purgatory_size = 0
  
  static int kexec_calculate_store_digests(struct kimage *image);
  
- static int copy_file_from_fd(int fd, void **buf, unsigned long *buf_len)
- {
-       struct fd f = fdget(fd);
-       int ret;
-       struct kstat stat;
-       loff_t pos;
-       ssize_t bytes = 0;
-       if (!f.file)
-               return -EBADF;
-       ret = vfs_getattr(&f.file->f_path, &stat);
-       if (ret)
-               goto out;
-       if (stat.size > INT_MAX) {
-               ret = -EFBIG;
-               goto out;
-       }
-       /* Don't hand 0 to vmalloc, it whines. */
-       if (stat.size == 0) {
-               ret = -EINVAL;
-               goto out;
-       }
-       *buf = vmalloc(stat.size);
-       if (!*buf) {
-               ret = -ENOMEM;
-               goto out;
-       }
-       pos = 0;
-       while (pos < stat.size) {
-               bytes = kernel_read(f.file, pos, (char *)(*buf) + pos,
-                                   stat.size - pos);
-               if (bytes < 0) {
-                       vfree(*buf);
-                       ret = bytes;
-                       goto out;
-               }
-               if (bytes == 0)
-                       break;
-               pos += bytes;
-       }
-       if (pos != stat.size) {
-               ret = -EBADF;
-               vfree(*buf);
-               goto out;
-       }
-       *buf_len = pos;
- out:
-       fdput(f);
-       return ret;
- }
  /* Architectures can provide this probe function */
  int __weak arch_kexec_kernel_image_probe(struct kimage *image, void *buf,
                                         unsigned long buf_len)
@@@ -182,16 -124,17 +124,17 @@@ kimage_file_prepare_segments(struct kim
  {
        int ret = 0;
        void *ldata;
+       loff_t size;
  
-       ret = copy_file_from_fd(kernel_fd, &image->kernel_buf,
-                               &image->kernel_buf_len);
+       ret = kernel_read_file_from_fd(kernel_fd, &image->kernel_buf,
+                                      &size, INT_MAX, READING_KEXEC_IMAGE);
        if (ret)
                return ret;
+       image->kernel_buf_len = size;
  
        /* Call arch image probe handlers */
        ret = arch_kexec_kernel_image_probe(image, image->kernel_buf,
                                            image->kernel_buf_len);
        if (ret)
                goto out;
  
  #endif
        /* It is possible that there no initramfs is being loaded */
        if (!(flags & KEXEC_FILE_NO_INITRAMFS)) {
-               ret = copy_file_from_fd(initrd_fd, &image->initrd_buf,
-                                       &image->initrd_buf_len);
+               ret = kernel_read_file_from_fd(initrd_fd, &image->initrd_buf,
+                                              &size, INT_MAX,
+                                              READING_KEXEC_INITRAMFS);
                if (ret)
                        goto out;
+               image->initrd_buf_len = size;
        }
  
        if (cmdline_len) {
@@@ -524,10 -469,10 +469,10 @@@ int kexec_add_buffer(struct kimage *ima
  
        /* Walk the RAM ranges and allocate a suitable range for the buffer */
        if (image->type == KEXEC_TYPE_CRASH)
 -              ret = walk_iomem_res("Crash kernel",
 -                                   IORESOURCE_MEM | IORESOURCE_BUSY,
 -                                   crashk_res.start, crashk_res.end, kbuf,
 -                                   locate_mem_hole_callback);
 +              ret = walk_iomem_res_desc(crashk_res.desc,
 +                              IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY,
 +                              crashk_res.start, crashk_res.end, kbuf,
 +                              locate_mem_hole_callback);
        else
                ret = walk_system_ram_res(0, -1, kbuf,
                                          locate_mem_hole_callback);
diff --combined kernel/module.c
index 794ebe8e878d55cf9a0b94a1ae7a994ac4dec80b,955410928696c4a6d2185d69bcfed6d5ed13094a..87cfeb25cf65516236fbc911b1ccedd6d5f09e3d
@@@ -303,9 -303,6 +303,9 @@@ struct load_info 
        struct _ddebug *debug;
        unsigned int num_debug;
        bool sig_ok;
 +#ifdef CONFIG_KALLSYMS
 +      unsigned long mod_kallsyms_init_off;
 +#endif
        struct {
                unsigned int sym, str, mod, vers, info, pcpu;
        } index;
@@@ -984,8 -981,6 +984,8 @@@ SYSCALL_DEFINE2(delete_module, const ch
                mod->exit();
        blocking_notifier_call_chain(&module_notify_list,
                                     MODULE_STATE_GOING, mod);
 +      ftrace_release_mod(mod);
 +
        async_synchronize_full();
  
        /* Store the name of the last unloaded module for diagnostic purposes */
@@@ -2485,21 -2480,10 +2485,21 @@@ static void layout_symtab(struct modul
        strsect->sh_flags |= SHF_ALLOC;
        strsect->sh_entsize = get_offset(mod, &mod->init_layout.size, strsect,
                                         info->index.str) | INIT_OFFSET_MASK;
 -      mod->init_layout.size = debug_align(mod->init_layout.size);
        pr_debug("\t%s\n", info->secstrings + strsect->sh_name);
 +
 +      /* We'll tack temporary mod_kallsyms on the end. */
 +      mod->init_layout.size = ALIGN(mod->init_layout.size,
 +                                    __alignof__(struct mod_kallsyms));
 +      info->mod_kallsyms_init_off = mod->init_layout.size;
 +      mod->init_layout.size += sizeof(struct mod_kallsyms);
 +      mod->init_layout.size = debug_align(mod->init_layout.size);
  }
  
 +/*
 + * We use the full symtab and strtab which layout_symtab arranged to
 + * be appended to the init section.  Later we switch to the cut-down
 + * core-only ones.
 + */
  static void add_kallsyms(struct module *mod, const struct load_info *info)
  {
        unsigned int i, ndst;
        char *s;
        Elf_Shdr *symsec = &info->sechdrs[info->index.sym];
  
 -      mod->symtab = (void *)symsec->sh_addr;
 -      mod->num_symtab = symsec->sh_size / sizeof(Elf_Sym);
 +      /* Set up to point into init section. */
 +      mod->kallsyms = mod->init_layout.base + info->mod_kallsyms_init_off;
 +
 +      mod->kallsyms->symtab = (void *)symsec->sh_addr;
 +      mod->kallsyms->num_symtab = symsec->sh_size / sizeof(Elf_Sym);
        /* Make sure we get permanent strtab: don't use info->strtab. */
 -      mod->strtab = (void *)info->sechdrs[info->index.str].sh_addr;
 +      mod->kallsyms->strtab = (void *)info->sechdrs[info->index.str].sh_addr;
  
        /* Set types up while we still have access to sections. */
 -      for (i = 0; i < mod->num_symtab; i++)
 -              mod->symtab[i].st_info = elf_type(&mod->symtab[i], info);
 -
 -      mod->core_symtab = dst = mod->core_layout.base + info->symoffs;
 -      mod->core_strtab = s = mod->core_layout.base + info->stroffs;
 -      src = mod->symtab;
 -      for (ndst = i = 0; i < mod->num_symtab; i++) {
 +      for (i = 0; i < mod->kallsyms->num_symtab; i++)
 +              mod->kallsyms->symtab[i].st_info
 +                      = elf_type(&mod->kallsyms->symtab[i], info);
 +
 +      /* Now populate the cut down core kallsyms for after init. */
 +      mod->core_kallsyms.symtab = dst = mod->core_layout.base + info->symoffs;
 +      mod->core_kallsyms.strtab = s = mod->core_layout.base + info->stroffs;
 +      src = mod->kallsyms->symtab;
 +      for (ndst = i = 0; i < mod->kallsyms->num_symtab; i++) {
                if (i == 0 ||
                    is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum,
                                   info->index.pcpu)) {
                        dst[ndst] = src[i];
 -                      dst[ndst++].st_name = s - mod->core_strtab;
 -                      s += strlcpy(s, &mod->strtab[src[i].st_name],
 +                      dst[ndst++].st_name = s - mod->core_kallsyms.strtab;
 +                      s += strlcpy(s, &mod->kallsyms->strtab[src[i].st_name],
                                     KSYM_NAME_LEN) + 1;
                }
        }
 -      mod->core_num_syms = ndst;
 +      mod->core_kallsyms.num_symtab = ndst;
  }
  #else
  static inline void layout_symtab(struct module *mod, struct load_info *info)
@@@ -2675,7 -2654,7 +2675,7 @@@ static int copy_module_from_user(const 
        if (info->len < sizeof(*(info->hdr)))
                return -ENOEXEC;
  
-       err = security_kernel_module_from_file(NULL);
+       err = security_kernel_read_file(NULL, READING_MODULE);
        if (err)
                return err;
  
        return 0;
  }
  
- /* Sets info->hdr and info->len. */
- static int copy_module_from_fd(int fd, struct load_info *info)
- {
-       struct fd f = fdget(fd);
-       int err;
-       struct kstat stat;
-       loff_t pos;
-       ssize_t bytes = 0;
-       if (!f.file)
-               return -ENOEXEC;
-       err = security_kernel_module_from_file(f.file);
-       if (err)
-               goto out;
-       err = vfs_getattr(&f.file->f_path, &stat);
-       if (err)
-               goto out;
-       if (stat.size > INT_MAX) {
-               err = -EFBIG;
-               goto out;
-       }
-       /* Don't hand 0 to vmalloc, it whines. */
-       if (stat.size == 0) {
-               err = -EINVAL;
-               goto out;
-       }
-       info->hdr = vmalloc(stat.size);
-       if (!info->hdr) {
-               err = -ENOMEM;
-               goto out;
-       }
-       pos = 0;
-       while (pos < stat.size) {
-               bytes = kernel_read(f.file, pos, (char *)(info->hdr) + pos,
-                                   stat.size - pos);
-               if (bytes < 0) {
-                       vfree(info->hdr);
-                       err = bytes;
-                       goto out;
-               }
-               if (bytes == 0)
-                       break;
-               pos += bytes;
-       }
-       info->len = pos;
- out:
-       fdput(f);
-       return err;
- }
  static void free_copy(struct load_info *info)
  {
        vfree(info->hdr);
@@@ -3284,8 -3206,9 +3227,8 @@@ static noinline int do_init_module(stru
        module_put(mod);
        trim_init_extable(mod);
  #ifdef CONFIG_KALLSYMS
 -      mod->num_symtab = mod->core_num_syms;
 -      mod->symtab = mod->core_symtab;
 -      mod->strtab = mod->core_strtab;
 +      /* Switch to core kallsyms now init is done: kallsyms may be walking! */
 +      rcu_assign_pointer(mod->kallsyms, &mod->core_kallsyms);
  #endif
        mod_tree_remove_init(mod);
        disable_ro_nx(&mod->init_layout);
@@@ -3315,7 -3238,6 +3258,7 @@@ fail
        module_put(mod);
        blocking_notifier_call_chain(&module_notify_list,
                                     MODULE_STATE_GOING, mod);
 +      ftrace_release_mod(mod);
        free_module(mod);
        wake_up_all(&module_wq);
        return ret;
@@@ -3392,7 -3314,6 +3335,7 @@@ static int complete_formation(struct mo
        mod->state = MODULE_STATE_COMING;
        mutex_unlock(&module_mutex);
  
 +      ftrace_module_enable(mod);
        blocking_notifier_call_chain(&module_notify_list,
                                     MODULE_STATE_COMING, mod);
        return 0;
@@@ -3518,7 -3439,7 +3461,7 @@@ static int load_module(struct load_inf
  
        /* Module is ready to execute: parsing args may do that. */
        after_dashes = parse_args(mod->name, mod->args, mod->kp, mod->num_kp,
 -                                -32768, 32767, NULL,
 +                                -32768, 32767, mod,
                                  unknown_module_param_cb);
        if (IS_ERR(after_dashes)) {
                err = PTR_ERR(after_dashes);
@@@ -3611,8 -3532,10 +3554,10 @@@ SYSCALL_DEFINE3(init_module, void __use
  
  SYSCALL_DEFINE3(finit_module, int, fd, const char __user *, uargs, int, flags)
  {
-       int err;
        struct load_info info = { };
+       loff_t size;
+       void *hdr;
+       int err;
  
        err = may_init_module();
        if (err)
                      |MODULE_INIT_IGNORE_VERMAGIC))
                return -EINVAL;
  
-       err = copy_module_from_fd(fd, &info);
+       err = kernel_read_file_from_fd(fd, &hdr, &size, INT_MAX,
+                                      READING_MODULE);
        if (err)
                return err;
+       info.hdr = hdr;
+       info.len = size;
  
        return load_module(&info, uargs, flags);
  }
@@@ -3649,11 -3575,6 +3597,11 @@@ static inline int is_arm_mapping_symbol
               && (str[2] == '\0' || str[2] == '.');
  }
  
 +static const char *symname(struct mod_kallsyms *kallsyms, unsigned int symnum)
 +{
 +      return kallsyms->strtab + kallsyms->symtab[symnum].st_name;
 +}
 +
  static const char *get_ksymbol(struct module *mod,
                               unsigned long addr,
                               unsigned long *size,
  {
        unsigned int i, best = 0;
        unsigned long nextval;
 +      struct mod_kallsyms *kallsyms = rcu_dereference_sched(mod->kallsyms);
  
        /* At worse, next value is at end of module */
        if (within_module_init(addr, mod))
  
        /* Scan for closest preceding symbol, and next symbol. (ELF
           starts real symbols at 1). */
 -      for (i = 1; i < mod->num_symtab; i++) {
 -              if (mod->symtab[i].st_shndx == SHN_UNDEF)
 +      for (i = 1; i < kallsyms->num_symtab; i++) {
 +              if (kallsyms->symtab[i].st_shndx == SHN_UNDEF)
                        continue;
  
                /* We ignore unnamed symbols: they're uninformative
                 * and inserted at a whim. */
 -              if (mod->symtab[i].st_value <= addr
 -                  && mod->symtab[i].st_value > mod->symtab[best].st_value
 -                  && *(mod->strtab + mod->symtab[i].st_name) != '\0'
 -                  && !is_arm_mapping_symbol(mod->strtab + mod->symtab[i].st_name))
 +              if (*symname(kallsyms, i) == '\0'
 +                  || is_arm_mapping_symbol(symname(kallsyms, i)))
 +                      continue;
 +
 +              if (kallsyms->symtab[i].st_value <= addr
 +                  && kallsyms->symtab[i].st_value > kallsyms->symtab[best].st_value)
                        best = i;
 -              if (mod->symtab[i].st_value > addr
 -                  && mod->symtab[i].st_value < nextval
 -                  && *(mod->strtab + mod->symtab[i].st_name) != '\0'
 -                  && !is_arm_mapping_symbol(mod->strtab + mod->symtab[i].st_name))
 -                      nextval = mod->symtab[i].st_value;
 +              if (kallsyms->symtab[i].st_value > addr
 +                  && kallsyms->symtab[i].st_value < nextval)
 +                      nextval = kallsyms->symtab[i].st_value;
        }
  
        if (!best)
                return NULL;
  
        if (size)
 -              *size = nextval - mod->symtab[best].st_value;
 +              *size = nextval - kallsyms->symtab[best].st_value;
        if (offset)
 -              *offset = addr - mod->symtab[best].st_value;
 -      return mod->strtab + mod->symtab[best].st_name;
 +              *offset = addr - kallsyms->symtab[best].st_value;
 +      return symname(kallsyms, best);
  }
  
  /* For kallsyms to ask for address resolution.  NULL means not found.  Careful
@@@ -3786,21 -3706,19 +3734,21 @@@ int module_get_kallsym(unsigned int sym
  
        preempt_disable();
        list_for_each_entry_rcu(mod, &modules, list) {
 +              struct mod_kallsyms *kallsyms;
 +
                if (mod->state == MODULE_STATE_UNFORMED)
                        continue;
 -              if (symnum < mod->num_symtab) {
 -                      *value = mod->symtab[symnum].st_value;
 -                      *type = mod->symtab[symnum].st_info;
 -                      strlcpy(name, mod->strtab + mod->symtab[symnum].st_name,
 -                              KSYM_NAME_LEN);
 +              kallsyms = rcu_dereference_sched(mod->kallsyms);
 +              if (symnum < kallsyms->num_symtab) {
 +                      *value = kallsyms->symtab[symnum].st_value;
 +                      *type = kallsyms->symtab[symnum].st_info;
 +                      strlcpy(name, symname(kallsyms, symnum), KSYM_NAME_LEN);
                        strlcpy(module_name, mod->name, MODULE_NAME_LEN);
                        *exported = is_exported(name, *value, mod);
                        preempt_enable();
                        return 0;
                }
 -              symnum -= mod->num_symtab;
 +              symnum -= kallsyms->num_symtab;
        }
        preempt_enable();
        return -ERANGE;
  static unsigned long mod_find_symname(struct module *mod, const char *name)
  {
        unsigned int i;
 +      struct mod_kallsyms *kallsyms = rcu_dereference_sched(mod->kallsyms);
  
 -      for (i = 0; i < mod->num_symtab; i++)
 -              if (strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0 &&
 -                  mod->symtab[i].st_info != 'U')
 -                      return mod->symtab[i].st_value;
 +      for (i = 0; i < kallsyms->num_symtab; i++)
 +              if (strcmp(name, symname(kallsyms, i)) == 0 &&
 +                  kallsyms->symtab[i].st_info != 'U')
 +                      return kallsyms->symtab[i].st_value;
        return 0;
  }
  
@@@ -3853,14 -3770,11 +3801,14 @@@ int module_kallsyms_on_each_symbol(int 
        module_assert_mutex();
  
        list_for_each_entry(mod, &modules, list) {
 +              /* We hold module_mutex: no need for rcu_dereference_sched */
 +              struct mod_kallsyms *kallsyms = mod->kallsyms;
 +
                if (mod->state == MODULE_STATE_UNFORMED)
                        continue;
 -              for (i = 0; i < mod->num_symtab; i++) {
 -                      ret = fn(data, mod->strtab + mod->symtab[i].st_name,
 -                               mod, mod->symtab[i].st_value);
 +              for (i = 0; i < kallsyms->num_symtab; i++) {
 +                      ret = fn(data, symname(kallsyms, i),
 +                               mod, kallsyms->symtab[i].st_value);
                        if (ret != 0)
                                return ret;
                }