Merge tag 'trace-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Oct 2020 22:51:28 +0000 (15:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Oct 2020 22:51:28 +0000 (15:51 -0700)
Pull tracing updates from Steven Rostedt:
 "Updates for tracing and bootconfig:

   - Add support for "bool" type in synthetic events

   - Add per instance tracing for bootconfig

   - Support perf-style return probe ("SYMBOL%return") in kprobes and
     uprobes

   - Allow for kprobes to be enabled earlier in boot up

   - Added tracepoint helper function to allow testing if tracepoints
     are enabled in headers

   - Synthetic events can now have dynamic strings (variable length)

   - Various fixes and cleanups"

* tag 'trace-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (58 commits)
  tracing: support "bool" type in synthetic trace events
  selftests/ftrace: Add test case for synthetic event syntax errors
  tracing: Handle synthetic event array field type checking correctly
  selftests/ftrace: Change synthetic event name for inter-event-combined test
  tracing: Add synthetic event error logging
  tracing: Check that the synthetic event and field names are legal
  tracing: Move is_good_name() from trace_probe.h to trace.h
  tracing: Don't show dynamic string internals in synthetic event description
  tracing: Fix some typos in comments
  tracing/boot: Add ftrace.instance.*.alloc_snapshot option
  tracing: Fix race in trace_open and buffer resize call
  tracing: Check return value of __create_val_fields() before using its result
  tracing: Fix synthetic print fmt check for use of __get_str()
  tracing: Remove a pointless assignment
  ftrace: ftrace_global_list is renamed to ftrace_ops_list
  ftrace: Format variable declarations of ftrace_allocate_records
  ftrace: Simplify the calculation of page number for ftrace_page->records
  ftrace: Simplify the dyn_ftrace->flags macro
  ftrace: Simplify the hash calculation
  ftrace: Use fls() to get the bits for dup_hash()
  ...

1  2 
Documentation/trace/histogram.rst
Documentation/trace/kprobetrace.rst
MAINTAINERS
include/linux/tracepoint-defs.h
kernel/kprobes.c
kernel/trace/ftrace.c
kernel/trace/trace.c
kernel/trace/trace_events.c
kernel/trace/trace_printk.c
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc

@@@ -1495,7 -1495,7 +1495,7 @@@ Extended error informatio
      #
  
      { stacktrace:
 -             _do_fork+0x18e/0x330
 +             kernel_clone+0x18e/0x330
               kernel_thread+0x29/0x30
               kthreadd+0x154/0x1b0
               ret_from_fork+0x3f/0x70
               SYSC_sendto+0xef/0x170
      } hitcount:         88
      { stacktrace:
 -             _do_fork+0x18e/0x330
 +             kernel_clone+0x18e/0x330
               SyS_clone+0x19/0x20
               entry_SYSCALL_64_fastpath+0x12/0x6a
      } hitcount:        244
@@@ -1776,6 -1776,24 +1776,24 @@@ consisting of the name of the new even
  variables and their types, which can be any valid field type,
  separated by semicolons, to the tracing/synthetic_events file.
  
+ See synth_field_size() for available types.
+ If field_name contains [n], the field is considered to be a static array.
+ If field_names contains[] (no subscript), the field is considered to
+ be a dynamic array, which will only take as much space in the event as
+ is required to hold the array.
+ A string field can be specified using either the static notation:
+   char name[32];
+ Or the dynamic:
+   char name[];
+ The size limit for either is 256.
  For instance, the following creates a new event named 'wakeup_latency'
  with 3 fields: lat, pid, and prio.  Each of those fields is simply a
  variable reference to a variable on another event::
@@@ -30,6 -30,7 +30,7 @@@ Synopsis of kprobe_event
  
    p[:[GRP/]EVENT] [MOD:]SYM[+offs]|MEMADDR [FETCHARGS]        : Set a probe
    r[MAXACTIVE][:[GRP/]EVENT] [MOD:]SYM[+0] [FETCHARGS]        : Set a return probe
+   p:[GRP/]EVENT] [MOD:]SYM[+0]%return [FETCHARGS]     : Set a return probe
    -:[GRP/]EVENT                                               : Clear a probe
  
   GRP          : Group name. If omitted, use "kprobes" for it.
                  based on SYM+offs or MEMADDR.
   MOD          : Module name which has given SYM.
   SYM[+offs]   : Symbol+offset where the probe is inserted.
+  SYM%return   : Return address of the symbol
   MEMADDR      : Address where the probe is inserted.
   MAXACTIVE    : Maximum number of instances of the specified function that
                  can be probed simultaneously, or 0 for the default value
 -                as defined in Documentation/staging/kprobes.rst section 1.3.1.
 +                as defined in Documentation/trace/kprobes.rst section 1.3.1.
  
   FETCHARGS    : Arguments. Each probe can have up to 128 args.
    %REG                : Fetch register REG
diff --combined MAINTAINERS
@@@ -405,7 -405,7 +405,7 @@@ F: drivers/platform/x86/i2c-multi-insta
  ACPI PMIC DRIVERS
  M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
  M:    Len Brown <lenb@kernel.org>
 -R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 +R:    Andy Shevchenko <andy@kernel.org>
  R:    Mika Westerberg <mika.westerberg@linux.intel.com>
  L:    linux-acpi@vger.kernel.org
  S:    Supported
@@@ -802,13 -802,6 +802,13 @@@ S:       Maintaine
  F:    Documentation/devicetree/bindings/interrupt-controller/amazon,al-fic.txt
  F:    drivers/irqchip/irq-al-fic.c
  
 +AMAZON ANNAPURNA LABS MEMORY CONTROLLER EDAC
 +M:    Talel Shenhar <talel@amazon.com>
 +M:    Talel Shenhar <talelshenhar@gmail.com>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/edac/amazon,al-mc-edac.yaml
 +F:    drivers/edac/al_mc_edac.c
 +
  AMAZON ANNAPURNA LABS THERMAL MMIO DRIVER
  M:    Talel Shenhar <talel@amazon.com>
  S:    Maintained
@@@ -950,12 -943,37 +950,12 @@@ S:      Supporte
  F:    arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi
  F:    drivers/net/ethernet/amd/xgbe/
  
 -ANALOG DEVICES INC AD5686 DRIVER
 -M:    Michael Hennerich <Michael.Hennerich@analog.com>
 -L:    linux-pm@vger.kernel.org
 -S:    Supported
 -W:    http://ez.analog.com/community/linux-device-drivers
 -F:    drivers/iio/dac/ad5686*
 -F:    drivers/iio/dac/ad5696*
 -
 -ANALOG DEVICES INC AD5758 DRIVER
 -M:    Michael Hennerich <Michael.Hennerich@analog.com>
 +AMS AS73211 DRIVER
 +M:    Christian Eggers <ceggers@arri.de>
  L:    linux-iio@vger.kernel.org
 -S:    Supported
 -W:    http://ez.analog.com/community/linux-device-drivers
 -F:    Documentation/devicetree/bindings/iio/dac/ad5758.txt
 -F:    drivers/iio/dac/ad5758.c
 -
 -ANALOG DEVICES INC AD7091R5 DRIVER
 -M:    Beniamin Bia <beniamin.bia@analog.com>
 -L:    linux-iio@vger.kernel.org
 -S:    Supported
 -W:    http://ez.analog.com/community/linux-device-drivers
 -F:    Documentation/devicetree/bindings/iio/adc/adi,ad7091r5.yaml
 -F:    drivers/iio/adc/ad7091r5.c
 -
 -ANALOG DEVICES INC AD7124 DRIVER
 -M:    Michael Hennerich <Michael.Hennerich@analog.com>
 -L:    linux-iio@vger.kernel.org
 -S:    Supported
 -W:    http://ez.analog.com/community/linux-device-drivers
 -F:    Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
 -F:    drivers/iio/adc/ad7124.c
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/light/ams,as73211.yaml
 +F:    drivers/iio/light/as73211.c
  
  ANALOG DEVICES INC AD7192 DRIVER
  M:    Alexandru Tachici <alexandru.tachici@analog.com>
@@@ -973,6 -991,15 +973,6 @@@ W:        http://ez.analog.com/community/linux
  F:    Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
  F:    drivers/iio/adc/ad7292.c
  
 -ANALOG DEVICES INC AD7606 DRIVER
 -M:    Michael Hennerich <Michael.Hennerich@analog.com>
 -M:    Beniamin Bia <beniamin.bia@analog.com>
 -L:    linux-iio@vger.kernel.org
 -S:    Supported
 -W:    http://ez.analog.com/community/linux-device-drivers
 -F:    Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
 -F:    drivers/iio/adc/ad7606.c
 -
  ANALOG DEVICES INC AD7768-1 DRIVER
  M:    Michael Hennerich <Michael.Hennerich@analog.com>
  L:    linux-iio@vger.kernel.org
@@@ -1034,6 -1061,7 +1034,6 @@@ F:      drivers/iio/imu/adis16475.
  F:    Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
  
  ANALOG DEVICES INC ADM1177 DRIVER
 -M:    Beniamin Bia <beniamin.bia@analog.com>
  M:    Michael Hennerich <Michael.Hennerich@analog.com>
  L:    linux-hwmon@vger.kernel.org
  S:    Supported
@@@ -1080,13 -1108,6 +1080,13 @@@ L:    linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/i2c/adv7842*
  
 +ANALOG DEVICES INC ADXRS290 DRIVER
 +M:    Nishant Malpani <nish.malpani25@gmail.com>
 +L:    linux-iio@vger.kernel.org
 +S:    Supported
 +F:    drivers/iio/gyro/adxrs290.c
 +F:    Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
 +
  ANALOG DEVICES INC ASOC CODEC DRIVERS
  M:    Lars-Peter Clausen <lars@metafoo.de>
  M:    Nuno Sá <nuno.sa@analog.com>
@@@ -1107,6 -1128,15 +1107,6 @@@ S:     Supporte
  W:    http://ez.analog.com/community/linux-device-drivers
  F:    drivers/dma/dma-axi-dmac.c
  
 -ANALOG DEVICES INC HMC425A DRIVER
 -M:    Beniamin Bia <beniamin.bia@analog.com>
 -M:    Michael Hennerich <michael.hennerich@analog.com>
 -L:    linux-iio@vger.kernel.org
 -S:    Supported
 -W:    http://ez.analog.com/community/linux-device-drivers
 -F:    Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
 -F:    drivers/iio/amplifiers/hmc425a.c
 -
  ANALOG DEVICES INC IIO DRIVERS
  M:    Lars-Peter Clausen <lars@metafoo.de>
  M:    Michael Hennerich <Michael.Hennerich@analog.com>
@@@ -1115,11 -1145,8 +1115,11 @@@ W:    http://wiki.analog.com
  W:    http://ez.analog.com/community/linux-device-drivers
  F:    Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523
  F:    Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
 +F:    Documentation/devicetree/bindings/iio/*/adi,*
 +F:    Documentation/devicetree/bindings/iio/dac/ad5758.txt
  F:    drivers/iio/*/ad*
  F:    drivers/iio/adc/ltc249*
 +F:    drivers/iio/amplifiers/hmc425a.c
  F:    drivers/staging/iio/*/ad*
  X:    drivers/iio/*/adjd*
  
@@@ -1433,11 -1460,6 +1433,11 @@@ S:    Odd Fixe
  F:    drivers/amba/
  F:    include/linux/amba/bus.h
  
 +ARM PRIMECELL CLCD PL110 DRIVER
 +M:    Russell King <linux@armlinux.org.uk>
 +S:    Odd Fixes
 +F:    drivers/video/fbdev/amba-clcd.*
 +
  ARM PRIMECELL KMI PL050 DRIVER
  M:    Russell King <linux@armlinux.org.uk>
  S:    Odd Fixes
@@@ -1484,7 -1506,8 +1484,7 @@@ L:      linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    Documentation/devicetree/bindings/iommu/arm,smmu*
  F:    drivers/iommu/arm/
 -F:    drivers/iommu/io-pgtable-arm-v7s.c
 -F:    drivers/iommu/io-pgtable-arm.c
 +F:    drivers/iommu/io-pgtable-arm*
  
  ARM SUB-ARCHITECTURES
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1502,9 -1525,8 +1502,9 @@@ F:      Documentation/devicetree/bindings/ar
  F:    Documentation/devicetree/bindings/clock/actions,owl-cmu.txt
  F:    Documentation/devicetree/bindings/dma/owl-dma.txt
  F:    Documentation/devicetree/bindings/i2c/i2c-owl.txt
 +F:    Documentation/devicetree/bindings/interrupt-controller/actions,owl-sirq.yaml
  F:    Documentation/devicetree/bindings/mmc/owl-mmc.yaml
 -F:    Documentation/devicetree/bindings/pinctrl/actions,s900-pinctrl.txt
 +F:    Documentation/devicetree/bindings/pinctrl/actions,*
  F:    Documentation/devicetree/bindings/power/actions,owl-sps.txt
  F:    Documentation/devicetree/bindings/timer/actions,owl-timer.txt
  F:    arch/arm/boot/dts/owl-*
@@@ -1514,7 -1536,6 +1514,7 @@@ F:      drivers/clk/actions
  F:    drivers/clocksource/timer-owl*
  F:    drivers/dma/owl-dma.c
  F:    drivers/i2c/busses/i2c-owl.c
 +F:    drivers/irqchip/irq-owl-sirq.c
  F:    drivers/mmc/host/owl-mmc.c
  F:    drivers/pinctrl/actions/*
  F:    drivers/soc/actions/
@@@ -1602,7 -1623,7 +1602,7 @@@ N:      meso
  
  ARM/Annapurna Labs ALPINE ARCHITECTURE
  M:    Tsahee Zidenberg <tsahee@annapurnalabs.com>
 -M:    Antoine Tenart <antoine.tenart@bootlin.com>
 +M:    Antoine Tenart <atenart@kernel.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/boot/dts/alpine*
@@@ -1725,7 -1746,6 +1725,7 @@@ ARM/CORESIGHT FRAMEWORK AND DRIVER
  M:    Mathieu Poirier <mathieu.poirier@linaro.org>
  R:    Suzuki K Poulose <suzuki.poulose@arm.com>
  R:    Mike Leach <mike.leach@linaro.org>
 +L:    coresight@lists.linaro.org (moderated for non-subscribers)
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-bus-coresight-devices-*
@@@ -2425,7 -2445,7 +2425,7 @@@ L:      linux-samsung-soc@vger.kernel.org (m
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/media/s5p-cec.txt
 -F:    drivers/media/platform/s5p-cec/
 +F:    drivers/media/cec/platform/s5p/
  
  ARM/SAMSUNG S5P SERIES JPEG CODEC SUPPORT
  M:    Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
@@@ -2484,7 -2504,7 +2484,7 @@@ S:      Maintaine
  F:    drivers/clk/socfpga/
  
  ARM/SOCFPGA EDAC SUPPORT
 -M:    Thor Thayer <thor.thayer@linux.intel.com>
 +M:    Dinh Nguyen <dinguyen@kernel.org>
  S:    Maintained
  F:    drivers/edac/altera_edac.
  
@@@ -2570,7 -2590,7 +2570,7 @@@ L:      linux-tegra@vger.kernel.or
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/media/tegra-cec.txt
 -F:    drivers/media/platform/tegra-cec/
 +F:    drivers/media/cec/platform/tegra/
  
  ARM/TETON BGA MACHINE SUPPORT
  M:    "Mark F. Brown" <mark.brown314@gmail.com>
@@@ -3455,14 -3475,6 +3455,14 @@@ F:    drivers/bus/brcmstb_gisb.
  F:    drivers/pci/controller/pcie-brcmstb.c
  N:    brcmstb
  
 +BROADCOM BDC DRIVER
 +M:    Al Cooper <alcooperx@gmail.com>
 +L:    linux-usb@vger.kernel.org
 +L:    bcm-kernel-feedback-list@broadcom.com
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/usb/brcm,bdc.txt
 +F:    drivers/usb/gadget/udc/bdc/
 +
  BROADCOM BMIPS CPUFREQ DRIVER
  M:    Markus Mayer <mmayer@broadcom.com>
  M:    bcm-kernel-feedback-list@broadcom.com
@@@ -3495,17 -3507,13 +3495,17 @@@ F:   drivers/net/ethernet/broadcom/bnx2.
  F:    drivers/net/ethernet/broadcom/bnx2_*
  
  BROADCOM BNX2FC 10 GIGABIT FCOE DRIVER
 -M:    QLogic-Storage-Upstream@qlogic.com
 +M:    Saurav Kashyap <skashyap@marvell.com>
 +M:    Javed Hasan <jhasan@marvell.com>
 +M:    GR-QLogic-Storage-Upstream@marvell.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/bnx2fc/
  
  BROADCOM BNX2I 1/10 GIGABIT iSCSI DRIVER
 -M:    QLogic-Storage-Upstream@qlogic.com
 +M:    Nilesh Javali <njavali@marvell.com>
 +M:    Manish Rangankar <mrangankar@marvell.com>
 +M:    GR-QLogic-Storage-Upstream@marvell.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/bnx2i/
@@@ -3840,16 -3848,6 +3840,16 @@@ S:    Orpha
  F:    Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt
  F:    drivers/mtd/nand/raw/cadence-nand-controller.c
  
 +CADENCE USB3 DRD IP DRIVER
 +M:    Peter Chen <peter.chen@nxp.com>
 +M:    Pawel Laszczak <pawell@cadence.com>
 +M:    Roger Quadros <rogerq@ti.com>
 +L:    linux-usb@vger.kernel.org
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
 +F:    Documentation/devicetree/bindings/usb/cdns-usb3.txt
 +F:    drivers/usb/cdns3/
 +
  CADET FM/AM RADIO RECEIVER DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -4032,7 -4030,7 +4032,7 @@@ S:      Supporte
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
  F:    Documentation/devicetree/bindings/media/cec-gpio.txt
 -F:    drivers/media/platform/cec-gpio/
 +F:    drivers/media/cec/platform/cec-gpio/
  
  CELL BROADBAND ENGINE ARCHITECTURE
  M:    Arnd Bergmann <arnd@arndb.de>
@@@ -4102,11 -4100,6 +4102,11 @@@ T:    git git://git.kernel.org/pub/scm/lin
  F:    drivers/char/
  F:    drivers/misc/
  F:    include/linux/miscdevice.h
 +X:    drivers/char/agp/
 +X:    drivers/char/hw_random/
 +X:    drivers/char/ipmi/
 +X:    drivers/char/random.c
 +X:    drivers/char/tpm/
  
  CHECKPATCH
  M:    Andy Whitcroft <apw@canonical.com>
@@@ -4177,7 -4170,6 +4177,7 @@@ CIRRUS LOGIC AUDIO CODEC DRIVER
  M:    James Schulman <james.schulman@cirrus.com>
  M:    David Rhodes <david.rhodes@cirrus.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +L:    patches@opensource.cirrus.com
  S:    Maintained
  F:    sound/soc/codecs/cs*
  
@@@ -4415,7 -4407,12 +4415,7 @@@ S:     Supporte
  T:    git git://git.infradead.org/users/hch/configfs.git
  F:    fs/configfs/
  F:    include/linux/configfs.h
 -
 -CONNECTOR
 -M:    Evgeniy Polyakov <zbr@ioremap.net>
 -L:    netdev@vger.kernel.org
 -S:    Maintained
 -F:    drivers/connector/
 +F:    samples/configfs/
  
  CONSOLE SUBSYSTEM
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@@@ -5015,12 -5012,6 +5015,12 @@@ S:    Maintaine
  F:    drivers/base/devcoredump.c
  F:    include/linux/devcoredump.h
  
 +DEVICE DEPENDENCY HELPER SCRIPT
 +M:    Saravana Kannan <saravanak@google.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    scripts/dev-needs.sh
 +
  DEVICE DIRECT ACCESS (DAX)
  M:    Dan Williams <dan.j.williams@intel.com>
  M:    Vishal Verma <vishal.l.verma@intel.com>
@@@ -5217,7 -5208,7 +5217,7 @@@ T:      git git://git.infradead.org/users/hc
  F:    include/asm-generic/dma-mapping.h
  F:    include/linux/dma-direct.h
  F:    include/linux/dma-mapping.h
 -F:    include/linux/dma-noncoherent.h
 +F:    include/linux/dma-map-ops.h
  F:    kernel/dma/
  
  DMA-BUF HEAPS FRAMEWORK
@@@ -5389,6 -5380,7 +5389,6 @@@ F:      include/linux/kobj
  F:    lib/kobj*
  
  DRIVERS FOR ADAPTIVE VOLTAGE SCALING (AVS)
 -M:    Kevin Hilman <khilman@kernel.org>
  M:    Nishanth Menon <nm@ti.com>
  L:    linux-pm@vger.kernel.org
  S:    Maintained
@@@ -5419,7 -5411,7 +5419,7 @@@ F:      drivers/gpu/drm/panel/panel-arm-vers
  
  DRM DRIVER FOR ASPEED BMC GFX
  M:    Joel Stanley <joel@jms.id.au>
 -L:    linux-aspeed@lists.ozlabs.org
 +L:    linux-aspeed@lists.ozlabs.org (moderated for non-subscribers)
  S:    Supported
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    Documentation/devicetree/bindings/gpu/aspeed-gfx.txt
@@@ -5427,10 -5419,7 +5427,10 @@@ F:    drivers/gpu/drm/aspeed
  
  DRM DRIVER FOR AST SERVER GRAPHICS CHIPS
  M:    Dave Airlie <airlied@redhat.com>
 -S:    Odd Fixes
 +R:    Thomas Zimmermann <tzimmermann@suse.de>
 +L:    dri-devel@lists.freedesktop.org
 +S:    Supported
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    drivers/gpu/drm/ast/
  
  DRM DRIVER FOR BOCHS VIRTUAL GPU
@@@ -5504,24 -5493,14 +5504,24 @@@ S:   Maintaine
  F:    drivers/gpu/drm/panel/panel-lvds.c
  F:    Documentation/devicetree/bindings/display/panel/lvds.yaml
  
 +DRM DRIVER FOR MANTIX MLAF057WE51 PANELS
 +M:    Guido Günther <agx@sigxcpu.org>
 +R:    Purism Kernel Team <kernel@puri.sm>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
 +F:    drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
 +
  DRM DRIVER FOR MATROX G200/G400 GRAPHICS CARDS
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/mga/
  F:    include/uapi/drm/mga_drm.h
  
 -DRM DRIVER FOR MGA G200 SERVER GRAPHICS CHIPS
 +DRM DRIVER FOR MGA G200 GRAPHICS CHIPS
  M:    Dave Airlie <airlied@redhat.com>
 -S:    Odd Fixes
 +R:    Thomas Zimmermann <tzimmermann@suse.de>
 +L:    dri-devel@lists.freedesktop.org
 +S:    Supported
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    drivers/gpu/drm/mgag200/
  
  DRM DRIVER FOR MI0283QT
@@@ -5602,13 -5581,12 +5602,13 @@@ S:   Maintaine
  F:    Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml
  F:    drivers/gpu/drm/panel/panel-raydium-rm67191.c
  
 -DRM DRIVER FOR ROCKTECH JH057N00900 PANELS
 +DRM DRIVER FOR SITRONIX ST7703 PANELS
  M:    Guido Günther <agx@sigxcpu.org>
  R:    Purism Kernel Team <kernel@puri.sm>
 +R:    Ondrej Jirman <megous@megous.com>
  S:    Maintained
 -F:    Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt
 -F:    drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c
 +F:    Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml
 +F:    drivers/gpu/drm/panel/panel-sitronix-st7703.c
  
  DRM DRIVER FOR SAVAGE VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -5667,15 -5645,13 +5667,15 @@@ F:   drivers/gpu/drm/panel/panel-tpo-tpg1
  DRM DRIVER FOR USB DISPLAYLINK VIDEO ADAPTERS
  M:    Dave Airlie <airlied@redhat.com>
  R:    Sean Paul <sean@poorly.run>
 +R:    Thomas Zimmermann <tzimmermann@suse.de>
  L:    dri-devel@lists.freedesktop.org
 -S:    Odd Fixes
 +S:    Supported
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    drivers/gpu/drm/udl/
  
  DRM DRIVER FOR VIRTUAL KERNEL MODESETTING (VKMS)
  M:    Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
 +M:    Melissa Wen <melissa.srw@gmail.com>
  R:    Haneen Mohammed <hamohammed.sa@gmail.com>
  R:    Daniel Vetter <daniel@ffwll.ch>
  L:    dri-devel@lists.freedesktop.org
@@@ -5810,7 -5786,7 +5810,7 @@@ F:      drivers/gpu/drm/gma500
  
  DRM DRIVERS FOR HISILICON
  M:    Xinliang Liu <xinliang.liu@linaro.org>
 -M:    Rongrong Zou <zourongrong@gmail.com>
 +M:    Tian Tao  <tiantao6@hisilicon.com>
  R:    John Stultz <john.stultz@linaro.org>
  R:    Xinwei Kong <kong.kongxinwei@hisilicon.com>
  R:    Chen Feng <puck.chen@hisilicon.com>
@@@ -5836,7 -5812,6 +5836,7 @@@ L:      dri-devel@lists.freedesktop.or
  S:    Supported
  F:    Documentation/devicetree/bindings/display/mediatek/
  F:    drivers/gpu/drm/mediatek/
 +F:    drivers/phy/mediatek/phy-mtk-hdmi*
  
  DRM DRIVERS FOR NVIDIA TEGRA
  M:    Thierry Reding <thierry.reding@gmail.com>
@@@ -6205,12 -6180,12 +6205,12 @@@ F:   Documentation/devicetree/bindings/ed
  F:    drivers/edac/aspeed_edac.c
  
  EDAC-BLUEFIELD
 -M:    Shravan Kumar Ramani <sramani@nvidia.com>
 +M:    Shravan Kumar Ramani <shravankr@nvidia.com>
  S:    Supported
  F:    drivers/edac/bluefield_edac.c
  
  EDAC-CALXEDA
 -M:    Robert Richter <rric@kernel.org>
 +M:    Andre Przywara <andre.przywara@arm.com>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    drivers/edac/highbank*
@@@ -6626,6 -6601,7 +6626,7 @@@ F:      fs/proc/bootconfig.
  F:    include/linux/bootconfig.h
  F:    lib/bootconfig.c
  F:    tools/bootconfig/*
+ F:    tools/bootconfig/scripts/*
  
  EXYNOS DP DRIVER
  M:    Jingoo Han <jingoohan1@gmail.com>
@@@ -6853,17 -6829,14 +6854,17 @@@ F:   drivers/net/ethernet/nvidia/
  
  FPGA DFL DRIVERS
  M:    Wu Hao <hao.wu@intel.com>
 +R:    Tom Rix <trix@redhat.com>
  L:    linux-fpga@vger.kernel.org
  S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-bus-dfl
  F:    Documentation/fpga/dfl.rst
  F:    drivers/fpga/dfl*
  F:    include/uapi/linux/fpga-dfl.h
  
  FPGA MANAGER FRAMEWORK
  M:    Moritz Fischer <mdf@kernel.org>
 +R:    Tom Rix <trix@redhat.com>
  L:    linux-fpga@vger.kernel.org
  S:    Maintained
  W:    http://www.rocketboards.org
@@@ -7269,7 -7242,7 +7270,7 @@@ F:      drivers/staging/gasket
  GCC PLUGINS
  M:    Kees Cook <keescook@chromium.org>
  R:    Emese Revfy <re.emese@gmail.com>
 -L:    kernel-hardening@lists.openwall.com
 +L:    linux-hardening@vger.kernel.org
  S:    Maintained
  F:    Documentation/kbuild/gcc-plugins.rst
  F:    scripts/Makefile.gcc-plugins
@@@ -7769,8 -7742,8 +7770,8 @@@ F:      Documentation/watchdog/hpwdt.rs
  F:    drivers/watchdog/hpwdt.c
  
  HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa)
 -M:    Don Brace <don.brace@microsemi.com>
 -L:    esc.storagedev@microsemi.com
 +M:    Don Brace <don.brace@microchip.com>
 +L:    storagedev@microchip.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    Documentation/scsi/hpsa.rst
@@@ -7913,13 -7886,6 +7914,13 @@@ W:    http://www.hisilicon.co
  F:    Documentation/devicetree/bindings/net/hisilicon*.txt
  F:    drivers/net/ethernet/hisilicon/
  
 +HIKEY960 ONBOARD USB GPIO HUB DRIVER
 +M:    John Stultz <john.stultz@linaro.org>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    drivers/misc/hisi_hikey_usb.c
 +F:    Documentation/devicetree/bindings/misc/hisilicon-hikey-usb.yaml
 +
  HISILICON PMU DRIVER
  M:    Shaokun Zhang <zhangshaokun@hisilicon.com>
  S:    Supported
@@@ -7963,12 -7929,6 +7964,12 @@@ F:    drivers/crypto/hisilicon/sec2/sec_cr
  F:    drivers/crypto/hisilicon/sec2/sec_crypto.h
  F:    drivers/crypto/hisilicon/sec2/sec_main.c
  
 +HISILICON STAGING DRIVERS FOR HIKEY 960/970
 +M:    Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
 +L:    devel@driverdev.osuosl.org
 +S:    Maintained
 +F:    drivers/staging/hikey9xx/
 +
  HISILICON TRUE RANDOM NUMBER GENERATOR V2 SUPPORT
  M:    Zaibo Xu <xuzaibo@huawei.com>
  S:    Maintained
@@@ -8370,9 -8330,8 +8371,9 @@@ S:      Supporte
  F:    drivers/pci/hotplug/rpaphp*
  
  IBM Power SRIOV Virtual NIC Device Driver
 -M:    Thomas Falcon <tlfalcon@linux.ibm.com>
 -M:    John Allen <jallen@linux.ibm.com>
 +M:    Dany Madden <drt@linux.ibm.com>
 +M:    Lijun Pan <ljp@linux.ibm.com>
 +M:    Sukadev Bhattiprolu <sukadev@linux.ibm.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/ibm/ibmvnic.*
@@@ -8386,7 -8345,7 +8387,7 @@@ F:      arch/powerpc/platforms/powernv/copy-
  F:    arch/powerpc/platforms/powernv/vas*
  
  IBM Power Virtual Ethernet Device Driver
 -M:    Thomas Falcon <tlfalcon@linux.ibm.com>
 +M:    Cristobal Forno <cforno12@linux.ibm.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/ibm/ibmveth.*
@@@ -8546,6 -8505,7 +8547,6 @@@ F:      drivers/iio/multiplexer/iio-mux.
  
  IIO SUBSYSTEM AND DRIVERS
  M:    Jonathan Cameron <jic23@kernel.org>
 -R:    Hartmut Knaack <knaack.h@gmx.de>
  R:    Lars-Peter Clausen <lars@metafoo.de>
  R:    Peter Meerwald-Stadler <pmeerw@pmeerw.net>
  L:    linux-iio@vger.kernel.org
@@@ -8719,7 -8679,7 +8720,7 @@@ F:      drivers/input/input-mt.
  K:    \b(ABS|SYN)_MT_
  
  INSIDE SECURE CRYPTO DRIVER
 -M:    Antoine Tenart <antoine.tenart@bootlin.com>
 +M:    Antoine Tenart <atenart@kernel.org>
  L:    linux-crypto@vger.kernel.org
  S:    Maintained
  F:    drivers/crypto/inside-secure/
@@@ -8798,8 -8758,7 +8799,8 @@@ F:      include/drm/i915
  F:    include/uapi/drm/i915_drm.h
  
  INTEL ETHERNET DRIVERS
 -M:    Jeff Kirsher <jeffrey.t.kirsher@intel.com>
 +M:    Jesse Brandeburg <jesse.brandeburg@intel.com>
 +M:    Tony Nguyen <anthony.l.nguyen@intel.com>
  L:    intel-wired-lan@lists.osuosl.org (moderated for non-subscribers)
  S:    Supported
  W:    http://www.intel.com/support/feedback.htm
@@@ -8898,7 -8857,7 +8899,7 @@@ INTEL IPU3 CSI-2 CIO2 DRIVE
  M:    Yong Zhi <yong.zhi@intel.com>
  M:    Sakari Ailus <sakari.ailus@linux.intel.com>
  M:    Bingbu Cao <bingbu.cao@intel.com>
 -R:    Tian Shu Qiu <tian.shu.qiu@intel.com>
 +R:    Tianshu Qiu <tian.shu.qiu@intel.com>
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    Documentation/userspace-api/media/v4l/pixfmt-srggb10-ipu3.rst
@@@ -8907,7 -8866,7 +8908,7 @@@ F:      drivers/media/pci/intel/ipu3
  INTEL IPU3 CSI-2 IMGU DRIVER
  M:    Sakari Ailus <sakari.ailus@linux.intel.com>
  R:    Bingbu Cao <bingbu.cao@intel.com>
 -R:    Tian Shu Qiu <tian.shu.qiu@intel.com>
 +R:    Tianshu Qiu <tian.shu.qiu@intel.com>
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    Documentation/admin-guide/media/ipu3.rst
@@@ -8972,8 -8931,8 +8973,8 @@@ F:      arch/x86/include/asm/intel_punit_ipc
  F:    drivers/platform/x86/intel_punit_ipc.c
  
  INTEL PMC CORE DRIVER
 -M:    Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
 -M:    Vishwanath Somayaji <vishwanath.somayaji@intel.com>
 +M:    Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
 +M:    David E Box <david.e.box@intel.com>
  L:    platform-driver-x86@vger.kernel.org
  S:    Maintained
  F:    drivers/platform/x86/intel_pmc_core*
@@@ -8986,7 -8945,7 +8987,7 @@@ F:      drivers/gpio/gpio-*cove.
  F:    drivers/gpio/gpio-msic.c
  
  INTEL PMIC MULTIFUNCTION DEVICE DRIVERS
 -R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 +M:    Andy Shevchenko <andy@kernel.org>
  S:    Maintained
  F:    drivers/mfd/intel_msic.c
  F:    drivers/mfd/intel_soc_pmic*
@@@ -9167,7 -9126,6 +9168,7 @@@ L:      iommu@lists.linux-foundation.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
  F:    Documentation/devicetree/bindings/iommu/
 +F:    Documentation/userspace-api/iommu.rst
  F:    drivers/iommu/
  F:    include/linux/iommu.h
  F:    include/linux/iova.h
@@@ -9294,7 -9252,7 +9295,7 @@@ F:      drivers/firmware/iscsi_ibft
  
  ISCSI EXTENSIONS FOR RDMA (ISER) INITIATOR
  M:    Sagi Grimberg <sagi@grimberg.me>
 -M:    Max Gurtovoy <maxg@nvidia.com>
 +M:    Max Gurtovoy <mgurtovoy@nvidia.com>
  L:    linux-rdma@vger.kernel.org
  S:    Supported
  W:    http://www.openfabrics.org
@@@ -9760,8 -9718,8 +9761,8 @@@ M:      Catalin Marinas <catalin.marinas@arm
  S:    Maintained
  F:    Documentation/dev-tools/kmemleak.rst
  F:    include/linux/kmemleak.h
 -F:    mm/kmemleak-test.c
  F:    mm/kmemleak.c
 +F:    samples/kmemleak/kmemleak-test.c
  
  KMOD KERNEL MODULE LOADER - USERMODE HELPER
  M:    Luis Chamberlain <mcgrof@kernel.org>
@@@ -9790,12 -9748,6 +9791,12 @@@ F:    Documentation/admin-guide/auxdisplay
  F:    drivers/auxdisplay/ks0108.c
  F:    include/linux/ks0108.h
  
 +KTD253 BACKLIGHT DRIVER
 +M:    Linus Walleij <linus.walleij@linaro.org>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml
 +F:    drivers/video/backlight/ktd253-backlight.c
 +
  L3MDEV
  M:    David Ahern <dsahern@kernel.org>
  L:    netdev@vger.kernel.org
@@@ -9850,7 -9802,7 +9851,7 @@@ F:      drivers/scsi/53c700
  LEAKING_ADDRESSES
  M:    Tobin C. Harding <me@tobin.cc>
  M:    Tycho Andersen <tycho@tycho.pizza>
 -L:    kernel-hardening@lists.openwall.com
 +L:    linux-hardening@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tobin/leaks.git
  F:    scripts/leaking_addresses.pl
@@@ -9921,6 -9873,15 +9922,6 @@@ T:     git git://git.kernel.org/pub/scm/lin
  F:    drivers/ata/pata_arasan_cf.c
  F:    include/linux/pata_arasan_cf_data.h
  
 -LIBATA PATA DRIVERS
 -M:    Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 -M:    Jens Axboe <axboe@kernel.dk>
 -L:    linux-ide@vger.kernel.org
 -S:    Maintained
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
 -F:    drivers/ata/ata_generic.c
 -F:    drivers/ata/pata_*.c
 -
  LIBATA PATA FARADAY FTIDE010 AND GEMINI SATA BRIDGE DRIVERS
  M:    Linus Walleij <linus.walleij@linaro.org>
  L:    linux-ide@vger.kernel.org
@@@ -11082,7 -11043,6 +11083,7 @@@ F:   drivers/char/hw_random/mtk-rng.
  
  MEDIATEK SWITCH DRIVER
  M:    Sean Wang <sean.wang@mediatek.com>
 +M:    Landen Chao <Landen.Chao@mediatek.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/dsa/mt7530.*
@@@ -11090,7 -11050,7 +11091,7 @@@ F:   net/dsa/tag_mtk.
  
  MEDIATEK USB3 DRD IP DRIVER
  M:    Chunfeng Yun <chunfeng.yun@mediatek.com>
 -L:    linux-usb@vger.kernel.org (moderated for non-subscribers)
 +L:    linux-usb@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -11358,8 -11318,8 +11359,8 @@@ S:   Supporte
  W:    http://linux-meson.com/
  T:    git git://linuxtv.org/media_tree.git
  F:    Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml
 -F:    drivers/media/platform/meson/ao-cec-g12a.c
 -F:    drivers/media/platform/meson/ao-cec.c
 +F:    drivers/media/cec/platform/meson/ao-cec-g12a.c
 +F:    drivers/media/cec/platform/meson/ao-cec.c
  
  MESON NAND CONTROLLER DRIVER FOR AMLOGIC SOCS
  M:    Liang Yang <liang.yang@amlogic.com>
@@@ -11369,6 -11329,7 +11370,6 @@@ F:   Documentation/devicetree/bindings/mt
  F:    drivers/mtd/nand/raw/meson_*
  
  MESON VIDEO DECODER DRIVER FOR AMLOGIC SOCS
 -M:    Maxime Jourdan <mjourdan@baylibre.com>
  M:    Neil Armstrong <narmstrong@baylibre.com>
  L:    linux-media@vger.kernel.org
  L:    linux-amlogic@lists.infradead.org
@@@ -11388,7 -11349,6 +11389,7 @@@ M:   Hemant Kumar <hemantk@codeaurora.org
  L:    linux-arm-msm@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git
 +F:    Documentation/ABI/stable/sysfs-bus-mhi
  F:    Documentation/mhi/
  F:    drivers/bus/mhi/
  F:    include/linux/mhi.h
@@@ -11587,8 -11547,8 +11588,8 @@@ F:   arch/mips/configs/generic/board-ocel
  F:    arch/mips/generic/board-ocelot.c
  
  MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi)
 -M:    Don Brace <don.brace@microsemi.com>
 -L:    esc.storagedev@microsemi.com
 +M:    Don Brace <don.brace@microchip.com>
 +L:    storagedev@microchip.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    Documentation/scsi/smartpqi.rst
@@@ -11702,7 -11662,7 +11703,7 @@@ S:   Odd Fixe
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git
  F:    arch/arm/boot/dts/mmp*
  F:    arch/arm/mach-mmp/
 -F:    linux/soc/mmp/
 +F:    include/linux/soc/mmp/
  
  MMP USB PHY DRIVERS
  R:    Lubomir Rintel <lkundrak@v3.sk>
@@@ -11820,13 -11780,6 +11821,13 @@@ Q: http://patchwork.linuxtv.org/project
  T:    git git://linuxtv.org/anttip/media_tree.git
  F:    drivers/media/usb/msi2500/
  
 +MSTAR INTERRUPT CONTROLLER DRIVER
 +M:    Mark-PK Tsai <mark-pk.tsai@mediatek.com>
 +M:    Daniel Palmer <daniel@thingy.jp>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
 +F:    drivers/irqchip/irq-mst-intc.c
 +
  MSYSTEMS DISKONCHIP G3 MTD DRIVER
  M:    Robert Jarzmik <robert.jarzmik@free.fr>
  L:    linux-mtd@lists.infradead.org
@@@ -12103,7 -12056,6 +12104,7 @@@ Q:   http://patchwork.ozlabs.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
  F:    Documentation/devicetree/bindings/net/
 +F:    drivers/connector/
  F:    drivers/net/
  F:    include/linux/etherdevice.h
  F:    include/linux/fcdevice.h
@@@ -12129,7 -12081,6 +12130,7 @@@ NETWORKING [DSA
  M:    Andrew Lunn <andrew@lunn.ch>
  M:    Vivien Didelot <vivien.didelot@gmail.com>
  M:    Florian Fainelli <f.fainelli@gmail.com>
 +M:    Vladimir Oltean <olteanv@gmail.com>
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/dsa/
  F:    drivers/net/dsa/
@@@ -12343,19 -12294,6 +12344,19 @@@ S: Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2.git
  F:    arch/nios2/
  
 +NITRO ENCLAVES (NE)
 +M:    Andra Paraschiv <andraprs@amazon.com>
 +M:    Alexandru Vasile <lexnv@amazon.com>
 +M:    Alexandru Ciobotaru <alcioa@amazon.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Supported
 +W:    https://aws.amazon.com/ec2/nitro/nitro-enclaves/
 +F:    Documentation/virt/ne_overview.rst
 +F:    drivers/virt/nitro_enclaves/
 +F:    include/linux/nitro_enclaves.h
 +F:    include/uapi/linux/nitro_enclaves.h
 +F:    samples/nitro_enclaves/
 +
  NOHZ, DYNTICKS SUPPORT
  M:    Frederic Weisbecker <fweisbec@gmail.com>
  M:    Thomas Gleixner <tglx@linutronix.de>
@@@ -12518,21 -12456,6 +12519,21 @@@ F: drivers/iio/gyro/fxas21002c_core.
  F:    drivers/iio/gyro/fxas21002c_i2c.c
  F:    drivers/iio/gyro/fxas21002c_spi.c
  
 +NXP i.MX 8MQ DCSS DRIVER
 +M:    Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
 +R:    Lucas Stach <l.stach@pengutronix.de>
 +L:    dri-devel@lists.freedesktop.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml
 +F:    drivers/gpu/drm/imx/dcss/
 +
 +NXP PTN5150A CC LOGIC AND EXTCON DRIVER
 +M:    Krzysztof Kozlowski <krzk@kernel.org>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
 +F:    drivers/extcon/extcon-ptn5150.c
 +
  NXP SGTL5000 DRIVER
  M:    Fabio Estevam <festevam@gmail.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
@@@ -12583,7 -12506,6 +12584,7 @@@ M:   Josh Poimboeuf <jpoimboe@redhat.com
  M:    Peter Zijlstra <peterz@infradead.org>
  S:    Supported
  F:    tools/objtool/
 +F:    include/linux/objtool.h
  
  OCELOT ETHERNET SWITCH DRIVER
  M:    Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
@@@ -12845,7 -12767,7 +12846,7 @@@ T:   git git://linuxtv.org/media_tree.gi
  F:    drivers/media/i2c/ov2685.c
  
  OMNIVISION OV2740 SENSOR DRIVER
 -M:    Tianshu Qiu <tian.shu.qiua@intel.com>
 +M:    Tianshu Qiu <tian.shu.qiu@intel.com>
  R:    Shawn Tu <shawnx.tu@intel.com>
  R:    Bingbu Cao <bingbu.cao@intel.com>
  L:    linux-media@vger.kernel.org
@@@ -12861,12 -12783,10 +12862,12 @@@ T:        git git://linuxtv.org/media_tree.gi
  F:    drivers/media/i2c/ov5640.c
  
  OMNIVISION OV5647 SENSOR DRIVER
 -M:    Luis Oliveira <lolivei@synopsys.com>
 +M:    Dave Stevenson <dave.stevenson@raspberrypi.com>
 +M:    Jacopo Mondi <jacopo@jmondi.org>
  L:    linux-media@vger.kernel.org
  S:    Maintained
  T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/i2c/ov5647.yaml
  F:    drivers/media/i2c/ov5647.c
  
  OMNIVISION OV5670 SENSOR DRIVER
@@@ -13129,9 -13049,7 +13130,9 @@@ F:   lib/packing.
  
  PADATA PARALLEL EXECUTION MECHANISM
  M:    Steffen Klassert <steffen.klassert@secunet.com>
 +M:    Daniel Jordan <daniel.m.jordan@oracle.com>
  L:    linux-crypto@vger.kernel.org
 +L:    linux-kernel@vger.kernel.org
  S:    Maintained
  F:    Documentation/core-api/padata.rst
  F:    include/linux/padata.h
@@@ -13268,7 -13186,6 +13269,7 @@@ F:   drivers/firmware/pcdp.
  
  PCI DRIVER FOR AARDVARK (Marvell Armada 3700)
  M:    Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 +M:    Pali Rohár <pali@kernel.org>
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -13803,9 -13720,10 +13804,9 @@@ PIN CONTROLLER - RENESA
  M:    Geert Uytterhoeven <geert+renesas@glider.be>
  L:    linux-renesas-soc@vger.kernel.org
  S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git sh-pfc
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git renesas-pinctrl
  F:    Documentation/devicetree/bindings/pinctrl/renesas,*
 -F:    drivers/pinctrl/pinctrl-rz*
 -F:    drivers/pinctrl/sh-pfc/
 +F:    drivers/pinctrl/renesas/
  
  PIN CONTROLLER - SAMSUNG
  M:    Tomasz Figa <tomasz.figa@gmail.com>
@@@ -14038,7 -13956,6 +14039,7 @@@ PRINT
  M:    Petr Mladek <pmladek@suse.com>
  M:    Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
  R:    Steven Rostedt <rostedt@goodmis.org>
 +R:    John Ogness <john.ogness@linutronix.de>
  S:    Maintained
  F:    include/linux/printk.h
  F:    kernel/printk/
@@@ -14276,17 -14193,13 +14277,17 @@@ S:        Supporte
  F:    drivers/infiniband/hw/qib/
  
  QLOGIC QL41xxx FCOE DRIVER
 -M:    QLogic-Storage-Upstream@cavium.com
 +M:    Saurav Kashyap <skashyap@marvell.com>
 +M:    Javed Hasan <jhasan@marvell.com>
 +M:    GR-QLogic-Storage-Upstream@marvell.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/qedf/
  
  QLOGIC QL41xxx ISCSI DRIVER
 -M:    QLogic-Storage-Upstream@cavium.com
 +M:    Nilesh Javali <njavali@marvell.com>
 +M:    Manish Rangankar <mrangankar@marvell.com>
 +M:    GR-QLogic-Storage-Upstream@marvell.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/qedi/
@@@ -14319,20 -14232,21 +14320,20 @@@ M:        Nilesh Javali <njavali@marvell.com
  M:    GR-QLogic-Storage-Upstream@marvell.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
 -F:    Documentation/scsi/LICENSE.qla2xxx
  F:    drivers/scsi/qla2xxx/
  
  QLOGIC QLA3XXX NETWORK DRIVER
  M:    GR-Linux-NIC-Dev@marvell.com
  L:    netdev@vger.kernel.org
  S:    Supported
 -F:    Documentation/networking/device_drivers/ethernet/qlogic/LICENSE.qla3xxx
  F:    drivers/net/ethernet/qlogic/qla3xxx.*
  
  QLOGIC QLA4XXX iSCSI DRIVER
 -M:    QLogic-Storage-Upstream@qlogic.com
 +M:    Nilesh Javali <njavali@marvell.com>
 +M:    Manish Rangankar <mrangankar@marvell.com>
 +M:    GR-QLogic-Storage-Upstream@marvell.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
 -F:    Documentation/scsi/LICENSE.qla4xxx
  F:    drivers/scsi/qla4xxx/
  
  QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
@@@ -14680,9 -14594,9 +14681,9 @@@ M:   Niklas Söderlund <niklas.soderlund+
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/media/i2c/imi,rdacm2x-gmsl.yaml
 -F:    drivers/media/i2c/rdacm20.c
  F:    drivers/media/i2c/max9271.c
  F:    drivers/media/i2c/max9271.h
 +F:    drivers/media/i2c/rdacm20.c
  
  RDC R-321X SoC
  M:    Florian Fainelli <florian@openwrt.org>
@@@ -14976,11 -14890,8 +14977,11 @@@ F: include/linux/hid-roccat
  
  ROCKCHIP ISP V1 DRIVER
  M:    Helen Koike <helen.koike@collabora.com>
 +M:    Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
  L:    linux-media@vger.kernel.org
  S:    Maintained
 +F:    Documentation/admin-guide/media/rkisp1.rst
 +F:    Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst
  F:    drivers/staging/media/rkisp1/
  
  ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
@@@ -15476,7 -15387,6 +15477,7 @@@ R:   Dietmar Eggemann <dietmar.eggemann@a
  R:    Steven Rostedt <rostedt@goodmis.org> (SCHED_FIFO/SCHED_RR)
  R:    Ben Segall <bsegall@google.com> (CONFIG_CFS_BANDWIDTH)
  R:    Mel Gorman <mgorman@suse.de> (CONFIG_NUMA_BALANCING)
 +R:    Daniel Bristot de Oliveira <bristot@redhat.com> (SCHED_DEADLINE)
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
@@@ -15598,8 -15508,8 +15599,8 @@@ F:   drivers/mmc/host/sdricoh_cs.
  SECO BOARDS CEC DRIVER
  M:    Ettore Chimenti <ek5.chimenti@gmail.com>
  S:    Maintained
 -F:    drivers/media/platform/seco-cec/seco-cec.c
 -F:    drivers/media/platform/seco-cec/seco-cec.h
 +F:    drivers/media/cec/platform/seco/seco-cec.c
 +F:    drivers/media/cec/platform/seco/seco-cec.h
  
  SECURE COMPUTING
  M:    Kees Cook <keescook@chromium.org>
@@@ -15692,7 -15602,6 +15693,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    Documentation/ABI/obsolete/sysfs-selinux-checkreqprot
  F:    Documentation/ABI/obsolete/sysfs-selinux-disable
  F:    Documentation/admin-guide/LSM/SELinux.rst
 +F:    include/trace/events/avc.h
  F:    include/uapi/linux/selinux_netlink.h
  F:    scripts/selinux/
  F:    security/selinux/
@@@ -16167,6 -16076,7 +16168,6 @@@ F:   include/uapi/rdma/rdma_user_rxe.
  SOFTLOGIC 6x10 MPEG CODEC
  M:    Bluecherry Maintainers <maintainers@bluecherrydvr.com>
  M:    Anton Sviridenko <anton@corp.bluecherry.net>
 -M:    Andrey Utkin <andrey.utkin@corp.bluecherry.net>
  M:    Andrey Utkin <andrey_utkin@fastmail.com>
  M:    Ismael Luceno <ismael@iodev.co.uk>
  L:    linux-media@vger.kernel.org
@@@ -16248,7 -16158,7 +16249,7 @@@ M:   Leon Luo <leonl@leopardimaging.com
  L:    linux-media@vger.kernel.org
  S:    Maintained
  T:    git git://linuxtv.org/media_tree.git
 -F:    Documentation/devicetree/bindings/media/i2c/imx274.txt
 +F:    Documentation/devicetree/bindings/media/i2c/sony,imx274.yaml
  F:    drivers/media/i2c/imx274.c
  
  SONY IMX290 SENSOR DRIVER
@@@ -16586,6 -16496,7 +16587,6 @@@ F:   drivers/staging/rtl8712
  
  STAGING - SEPS525 LCD CONTROLLER DRIVERS
  M:    Michael Hennerich <michael.hennerich@analog.com>
 -M:    Beniamin Bia <beniamin.bia@analog.com>
  L:    linux-fbdev@vger.kernel.org
  S:    Supported
  F:    Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
@@@ -16633,7 -16544,7 +16634,7 @@@ STI CEC DRIVE
  M:    Benjamin Gaignard <benjamin.gaignard@linaro.org>
  S:    Maintained
  F:    Documentation/devicetree/bindings/media/stih-cec.txt
 -F:    drivers/media/platform/sti/cec/
 +F:    drivers/media/cec/platform/sti/
  
  STK1160 USB VIDEO CAPTURE DRIVER
  M:    Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
@@@ -16817,13 -16728,6 +16818,13 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
  F:    drivers/gpio/gpio-dwapb.c
  
 +SYNOPSYS DESIGNWARE APB SSI DRIVER
 +M:    Serge Semin <fancer.lancer@gmail.com>
 +L:    linux-spi@vger.kernel.org
 +S:    Supported
 +F:    Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
 +F:    drivers/spi/spi-dw*
 +
  SYNOPSYS DESIGNWARE AXI DMAC DRIVER
  M:    Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
  S:    Maintained
@@@ -17690,7 -17594,7 +17691,7 @@@ L:   linux-integrity@vger.kernel.or
  S:    Maintained
  W:    https://kernsec.org/wiki/index.php/Linux_Kernel_Integrity
  Q:    https://patchwork.kernel.org/project/linux-integrity/list/
 -T:    git git://git.infradead.org/users/jjs/linux-tpmdd.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
  F:    drivers/char/tpm/
  
  TRACING
@@@ -17827,7 -17731,6 +17828,7 @@@ S:   Supporte
  W:    http://www.linux-mtd.infradead.org/doc/ubifs.html
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git next
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git fixes
 +F:    Documentation/filesystems/ubifs-authentication.rst
  F:    Documentation/filesystems/ubifs.rst
  F:    fs/ubifs/
  
@@@ -18221,6 -18124,14 +18222,6 @@@ T:  git git://linuxtv.org/media_tree.gi
  F:    drivers/media/usb/uvc/
  F:    include/uapi/linux/uvcvideo.h
  
 -USB VISION DRIVER
 -M:    Hans Verkuil <hverkuil@xs4all.nl>
 -L:    linux-media@vger.kernel.org
 -S:    Odd Fixes
 -W:    https://linuxtv.org
 -T:    git git://linuxtv.org/media_tree.git
 -F:    drivers/staging/media/usbvision/
 -
  USB WEBCAM GADGET
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    linux-usb@vger.kernel.org
@@@ -18374,8 -18285,7 +18375,8 @@@ F:   drivers/gpu/vga/vga_switcheroo.
  F:    include/linux/vga_switcheroo.h
  
  VIA RHINE NETWORK DRIVER
 -S:    Orphan
 +S:    Maintained
 +M:    Kevin Brace <kevinbrace@bracecomputerlab.com>
  F:    drivers/net/ethernet/via/via-rhine.c
  
  VIA SD/MMC CARD CONTROLLER DRIVER
@@@ -18420,8 -18330,10 +18421,8 @@@ S:  Maintaine
  F:    drivers/media/platform/video-mux.c
  
  VIDEOBUF2 FRAMEWORK
 -M:    Pawel Osciak <pawel@osciak.com>
 +M:    Tomasz Figa <tfiga@chromium.org>
  M:    Marek Szyprowski <m.szyprowski@samsung.com>
 -M:    Kyungmin Park <kyungmin.park@samsung.com>
 -R:    Tomasz Figa <tfiga@chromium.org>
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    drivers/media/common/videobuf2/*
@@@ -18611,14 -18523,6 +18612,14 @@@ W: https://linuxtv.or
  T:    git git://linuxtv.org/media_tree.git
  F:    drivers/media/test-drivers/vivid/*
  
 +VIDTV VIRTUAL DIGITAL TV DRIVER
 +M:    Daniel W. S. Almeida <dwlsalmeida@gmail.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +W:    https://linuxtv.org
 +T:    git git://linuxtv.org/media_tree.git
 +F:    drivers/media/test-drivers/vidtv/*
 +
  VLYNQ BUS
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    openwrt-devel@lists.openwrt.org (subscribers-only)
@@@ -18986,11 -18890,11 +18987,11 @@@ T:        git git://git.kernel.org/pub/scm/lin
  F:    arch/x86/mm/
  
  X86 PLATFORM DRIVERS
 -M:    Darren Hart <dvhart@infradead.org>
 -M:    Andy Shevchenko <andy@infradead.org>
 +M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Mark Gross <mgross@linux.intel.com>
  L:    platform-driver-x86@vger.kernel.org
 -S:    Odd Fixes
 -T:    git git://git.infradead.org/linux-platform-drivers-x86.git
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
  F:    drivers/platform/olpc/
  F:    drivers/platform/x86/
  
@@@ -19339,16 -19243,6 +19340,16 @@@ T: git git://git.kernel.org/pub/scm/lin
  F:    Documentation/filesystems/zonefs.rst
  F:    fs/zonefs/
  
 +ZR36067 VIDEO FOR LINUX DRIVER
 +M:    Corentin Labbe <clabbe@baylibre.com>
 +L:    mjpeg-users@lists.sourceforge.net
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +W:    http://mjpeg.sourceforge.net/driver-zoran/
 +Q:    https://patchwork.linuxtv.org/project/linux-media/list/
 +F:    Documentation/driver-api/media/drivers/zoran.rst
 +F:    drivers/staging/media/zoran/
 +
  ZPOOL COMPRESSED PAGE STORAGE API
  M:    Dan Streetman <ddstreet@ieee.org>
  L:    linux-mm@kvack.org
@@@ -11,8 -11,6 +11,8 @@@
  #include <linux/atomic.h>
  #include <linux/static_key.h>
  
 +struct static_call_key;
 +
  struct trace_print_flags {
        unsigned long           mask;
        const char              *name;
@@@ -32,9 -30,6 +32,9 @@@ struct tracepoint_func 
  struct tracepoint {
        const char *name;               /* Tracepoint name */
        struct static_key key;
 +      struct static_call_key *static_call_key;
 +      void *static_call_tramp;
 +      void *iterator;
        int (*regfunc)(void);
        void (*unregfunc)(void);
        struct tracepoint_func __rcu *funcs;
@@@ -53,4 -48,38 +53,38 @@@ struct bpf_raw_event_map 
        u32                     writable_size;
  } __aligned(32);
  
+ /*
+  * If a tracepoint needs to be called from a header file, it is not
+  * recommended to call it directly, as tracepoints in header files
+  * may cause side-effects and bloat the kernel. Instead, use
+  * tracepoint_enabled() to test if the tracepoint is enabled, then if
+  * it is, call a wrapper function defined in a C file that will then
+  * call the tracepoint.
+  *
+  * For "trace_foo_bar()", you would need to create a wrapper function
+  * in a C file to call trace_foo_bar():
+  *   void do_trace_foo_bar(args) { trace_foo_bar(args); }
+  * Then in the header file, declare the tracepoint:
+  *   DECLARE_TRACEPOINT(foo_bar);
+  * And call your wrapper:
+  *   static inline void some_inlined_function() {
+  *            [..]
+  *            if (tracepoint_enabled(foo_bar))
+  *                    do_trace_foo_bar(args);
+  *            [..]
+  *   }
+  *
+  * Note: tracepoint_enabled(foo_bar) is equivalent to trace_foo_bar_enabled()
+  *   but is safe to have in headers, where trace_foo_bar_enabled() is not.
+  */
+ #define DECLARE_TRACEPOINT(tp) \
+       extern struct tracepoint __tracepoint_##tp
+ #ifdef CONFIG_TRACEPOINTS
+ # define tracepoint_enabled(tp) \
+       static_key_false(&(__tracepoint_##tp).key)
+ #else
+ # define tracepoint_enabled(tracepoint) false
+ #endif
  #endif
diff --combined kernel/kprobes.c
@@@ -36,7 -36,6 +36,7 @@@
  #include <linux/cpu.h>
  #include <linux/jump_label.h>
  #include <linux/perf_event.h>
 +#include <linux/static_call.h>
  
  #include <asm/sections.h>
  #include <asm/cacheflush.h>
@@@ -1224,7 -1223,8 +1224,7 @@@ void kprobes_inc_nmissed_count(struct k
  }
  NOKPROBE_SYMBOL(kprobes_inc_nmissed_count);
  
 -void recycle_rp_inst(struct kretprobe_instance *ri,
 -                   struct hlist_head *head)
 +static void recycle_rp_inst(struct kretprobe_instance *ri)
  {
        struct kretprobe *rp = ri->rp;
  
                hlist_add_head(&ri->hlist, &rp->free_instances);
                raw_spin_unlock(&rp->lock);
        } else
 -              /* Unregistering */
 -              hlist_add_head(&ri->hlist, head);
 +              kfree_rcu(ri, rcu);
  }
  NOKPROBE_SYMBOL(recycle_rp_inst);
  
 -void kretprobe_hash_lock(struct task_struct *tsk,
 +static void kretprobe_hash_lock(struct task_struct *tsk,
                         struct hlist_head **head, unsigned long *flags)
  __acquires(hlist_lock)
  {
@@@ -1262,7 -1263,7 +1262,7 @@@ __acquires(hlist_lock
  }
  NOKPROBE_SYMBOL(kretprobe_table_lock);
  
 -void kretprobe_hash_unlock(struct task_struct *tsk,
 +static void kretprobe_hash_unlock(struct task_struct *tsk,
                           unsigned long *flags)
  __releases(hlist_lock)
  {
@@@ -1283,7 -1284,7 +1283,7 @@@ __releases(hlist_lock
  }
  NOKPROBE_SYMBOL(kretprobe_table_unlock);
  
 -struct kprobe kprobe_busy = {
 +static struct kprobe kprobe_busy = {
        .addr = (void *) get_kprobe,
  };
  
@@@ -1312,7 -1313,7 +1312,7 @@@ void kprobe_busy_end(void
  void kprobe_flush_task(struct task_struct *tk)
  {
        struct kretprobe_instance *ri;
 -      struct hlist_head *head, empty_rp;
 +      struct hlist_head *head;
        struct hlist_node *tmp;
        unsigned long hash, flags = 0;
  
  
        kprobe_busy_begin();
  
 -      INIT_HLIST_HEAD(&empty_rp);
        hash = hash_ptr(tk, KPROBE_HASH_BITS);
        head = &kretprobe_inst_table[hash];
        kretprobe_table_lock(hash, &flags);
        hlist_for_each_entry_safe(ri, tmp, head, hlist) {
                if (ri->task == tk)
 -                      recycle_rp_inst(ri, &empty_rp);
 +                      recycle_rp_inst(ri);
        }
        kretprobe_table_unlock(hash, &flags);
 -      hlist_for_each_entry_safe(ri, tmp, &empty_rp, hlist) {
 -              hlist_del(&ri->hlist);
 -              kfree(ri);
 -      }
  
        kprobe_busy_end();
  }
@@@ -1353,8 -1359,7 +1353,8 @@@ static void cleanup_rp_inst(struct kret
        struct hlist_node *next;
        struct hlist_head *head;
  
 -      /* No race here */
 +      /* To avoid recursive kretprobe by NMI, set kprobe busy here */
 +      kprobe_busy_begin();
        for (hash = 0; hash < KPROBE_TABLE_SIZE; hash++) {
                kretprobe_table_lock(hash, &flags);
                head = &kretprobe_inst_table[hash];
                }
                kretprobe_table_unlock(hash, &flags);
        }
 +      kprobe_busy_end();
 +
        free_rp_inst(rp);
  }
  NOKPROBE_SYMBOL(cleanup_rp_inst);
@@@ -1631,7 -1634,6 +1631,7 @@@ static int check_kprobe_address_safe(st
        if (!kernel_text_address((unsigned long) p->addr) ||
            within_kprobe_blacklist((unsigned long) p->addr) ||
            jump_label_text_reserved(p->addr, p->addr) ||
 +          static_call_text_reserved(p->addr, p->addr) ||
            find_bug((unsigned long)p->addr)) {
                ret = -EINVAL;
                goto out;
@@@ -1925,97 -1927,6 +1925,97 @@@ unsigned long __weak arch_deref_entry_p
  }
  
  #ifdef CONFIG_KRETPROBES
 +
 +unsigned long __kretprobe_trampoline_handler(struct pt_regs *regs,
 +                                           void *trampoline_address,
 +                                           void *frame_pointer)
 +{
 +      struct kretprobe_instance *ri = NULL, *last = NULL;
 +      struct hlist_head *head;
 +      struct hlist_node *tmp;
 +      unsigned long flags;
 +      kprobe_opcode_t *correct_ret_addr = NULL;
 +      bool skipped = false;
 +
 +      kretprobe_hash_lock(current, &head, &flags);
 +
 +      /*
 +       * It is possible to have multiple instances associated with a given
 +       * task either because multiple functions in the call path have
 +       * return probes installed on them, and/or more than one
 +       * return probe was registered for a target function.
 +       *
 +       * We can handle this because:
 +       *     - instances are always pushed into the head of the list
 +       *     - when multiple return probes are registered for the same
 +       *       function, the (chronologically) first instance's ret_addr
 +       *       will be the real return address, and all the rest will
 +       *       point to kretprobe_trampoline.
 +       */
 +      hlist_for_each_entry(ri, head, hlist) {
 +              if (ri->task != current)
 +                      /* another task is sharing our hash bucket */
 +                      continue;
 +              /*
 +               * Return probes must be pushed on this hash list correct
 +               * order (same as return order) so that it can be popped
 +               * correctly. However, if we find it is pushed it incorrect
 +               * order, this means we find a function which should not be
 +               * probed, because the wrong order entry is pushed on the
 +               * path of processing other kretprobe itself.
 +               */
 +              if (ri->fp != frame_pointer) {
 +                      if (!skipped)
 +                              pr_warn("kretprobe is stacked incorrectly. Trying to fixup.\n");
 +                      skipped = true;
 +                      continue;
 +              }
 +
 +              correct_ret_addr = ri->ret_addr;
 +              if (skipped)
 +                      pr_warn("%ps must be blacklisted because of incorrect kretprobe order\n",
 +                              ri->rp->kp.addr);
 +
 +              if (correct_ret_addr != trampoline_address)
 +                      /*
 +                       * This is the real return address. Any other
 +                       * instances associated with this task are for
 +                       * other calls deeper on the call stack
 +                       */
 +                      break;
 +      }
 +
 +      BUG_ON(!correct_ret_addr || (correct_ret_addr == trampoline_address));
 +      last = ri;
 +
 +      hlist_for_each_entry_safe(ri, tmp, head, hlist) {
 +              if (ri->task != current)
 +                      /* another task is sharing our hash bucket */
 +                      continue;
 +              if (ri->fp != frame_pointer)
 +                      continue;
 +
 +              if (ri->rp && ri->rp->handler) {
 +                      struct kprobe *prev = kprobe_running();
 +
 +                      __this_cpu_write(current_kprobe, &ri->rp->kp);
 +                      ri->ret_addr = correct_ret_addr;
 +                      ri->rp->handler(ri, regs);
 +                      __this_cpu_write(current_kprobe, prev);
 +              }
 +
 +              recycle_rp_inst(ri);
 +
 +              if (ri == last)
 +                      break;
 +      }
 +
 +      kretprobe_hash_unlock(current, &flags);
 +
 +      return (unsigned long)correct_ret_addr;
 +}
 +NOKPROBE_SYMBOL(__kretprobe_trampoline_handler)
 +
  /*
   * This kprobe pre_handler is registered with every kretprobe. When probe
   * hits it will set up the return probe.
@@@ -2026,6 -1937,17 +2026,6 @@@ static int pre_handler_kretprobe(struc
        unsigned long hash, flags = 0;
        struct kretprobe_instance *ri;
  
 -      /*
 -       * To avoid deadlocks, prohibit return probing in NMI contexts,
 -       * just skip the probe and increase the (inexact) 'nmissed'
 -       * statistical counter, so that the user is informed that
 -       * something happened:
 -       */
 -      if (unlikely(in_nmi())) {
 -              rp->nmissed++;
 -              return 0;
 -      }
 -
        /* TODO: consider to only swap the RA after the last pre_handler fired */
        hash = hash_ptr(current, KPROBE_HASH_BITS);
        raw_spin_lock_irqsave(&rp->lock, flags);
@@@ -2218,9 -2140,6 +2218,9 @@@ static void kill_kprobe(struct kprobe *
  
        lockdep_assert_held(&kprobe_mutex);
  
 +      if (WARN_ON_ONCE(kprobe_gone(p)))
 +              return;
 +
        p->flags |= KPROBE_FLAG_GONE;
        if (kprobe_aggrprobe(p)) {
                /*
@@@ -2501,10 -2420,7 +2501,10 @@@ static int kprobes_module_callback(stru
        mutex_lock(&kprobe_mutex);
        for (i = 0; i < KPROBE_TABLE_SIZE; i++) {
                head = &kprobe_table[i];
 -              hlist_for_each_entry(p, head, hlist)
 +              hlist_for_each_entry(p, head, hlist) {
 +                      if (kprobe_gone(p))
 +                              continue;
 +
                        if (within_module_init((unsigned long)p->addr, mod) ||
                            (checkcore &&
                             within_module_core((unsigned long)p->addr, mod))) {
                                 */
                                kill_kprobe(p);
                        }
 +              }
        }
        if (val == MODULE_STATE_GOING)
                remove_module_kprobe_blacklist(mod);
@@@ -2614,7 -2529,7 +2614,7 @@@ static int __init init_kprobes(void
                init_test_probes();
        return err;
  }
subsys_initcall(init_kprobes);
early_initcall(init_kprobes);
  
  #ifdef CONFIG_DEBUG_FS
  static void report_probe(struct seq_file *pi, struct kprobe *p,
diff --combined kernel/trace/ftrace.c
@@@ -230,7 -230,7 +230,7 @@@ static void update_ftrace_function(void
        /*
         * For static tracing, we need to be a bit more careful.
         * The function change takes affect immediately. Thus,
-        * we need to coorditate the setting of the function_trace_ops
+        * we need to coordinate the setting of the function_trace_ops
         * with the setting of the ftrace_trace_function.
         *
         * Set the function to the list ops, which will call the
@@@ -1368,10 -1368,10 +1368,10 @@@ static struct ftrace_hash *dup_hash(str
        int i;
  
        /*
-        * Make the hash size about 1/2 the # found
+        * Use around half the size (max bit of it), but
+        * a minimum of 2 is fine (as size of 0 or 1 both give 1 for bits).
         */
-       for (size /= 2; size; size >>= 1)
-               bits++;
+       bits = fls(size / 2);
  
        /* Don't allocate too much */
        if (bits > FTRACE_HASH_MAX_BITS)
@@@ -1451,7 -1451,7 +1451,7 @@@ static bool hash_contains_ip(unsigned l
  {
        /*
         * The function record is a match if it exists in the filter
-        * hash and not in the notrace hash. Note, an emty hash is
+        * hash and not in the notrace hash. Note, an empty hash is
         * considered a match for the filter hash, but an empty
         * notrace hash is considered not in the notrace hash.
         */
@@@ -2402,7 -2402,7 +2402,7 @@@ struct ftrace_ops direct_ops = 
   *
   * If the record has the FTRACE_FL_REGS set, that means that it
   * wants to convert to a callback that saves all regs. If FTRACE_FL_REGS
-  * is not not set, then it wants to convert to the normal callback.
+  * is not set, then it wants to convert to the normal callback.
   *
   * Returns the address of the trampoline to set to
   */
@@@ -2976,7 -2976,7 +2976,7 @@@ int ftrace_shutdown(struct ftrace_ops *
                synchronize_rcu_tasks_rude();
  
                /*
-                * When the kernel is preeptive, tasks can be preempted
+                * When the kernel is preemptive, tasks can be preempted
                 * while on a ftrace trampoline. Just scheduling a task on
                 * a CPU is not good enough to flush them. Calling
                 * synchornize_rcu_tasks() will wait for those tasks to
@@@ -3129,18 -3129,20 +3129,20 @@@ static int ftrace_update_code(struct mo
  static int ftrace_allocate_records(struct ftrace_page *pg, int count)
  {
        int order;
+       int pages;
        int cnt;
  
        if (WARN_ON(!count))
                return -EINVAL;
  
-       order = get_count_order(DIV_ROUND_UP(count, ENTRIES_PER_PAGE));
+       pages = DIV_ROUND_UP(count, ENTRIES_PER_PAGE);
+       order = get_count_order(pages);
  
        /*
         * We want to fill as much as possible. No more than a page
         * may be empty.
         */
-       while ((PAGE_SIZE << order) / ENTRY_SIZE >= count + ENTRIES_PER_PAGE)
+       if (!is_power_of_2(pages))
                order--;
  
   again:
@@@ -4368,7 -4370,7 +4370,7 @@@ void **ftrace_func_mapper_find_ip(struc
   * @ip: The instruction pointer address to map @data to
   * @data: The data to map to @ip
   *
-  * Returns 0 on succes otherwise an error.
+  * Returns 0 on success otherwise an error.
   */
  int ftrace_func_mapper_add_ip(struct ftrace_func_mapper *mapper,
                              unsigned long ip, void *data)
@@@ -4536,7 -4538,7 +4538,7 @@@ register_ftrace_function_probe(char *gl
  
        /*
         * Note, there's a small window here that the func_hash->filter_hash
-        * may be NULL or empty. Need to be carefule when reading the loop.
+        * may be NULL or empty. Need to be careful when reading the loop.
         */
        mutex_lock(&probe->ops.func_hash->regex_lock);
  
@@@ -6993,14 -6995,16 +6995,14 @@@ static void ftrace_ops_assist_func(unsi
  {
        int bit;
  
 -      if ((op->flags & FTRACE_OPS_FL_RCU) && !rcu_is_watching())
 -              return;
 -
        bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX);
        if (bit < 0)
                return;
  
        preempt_disable_notrace();
  
 -      op->func(ip, parent_ip, op, regs);
 +      if (!(op->flags & FTRACE_OPS_FL_RCU) || rcu_is_watching())
 +              op->func(ip, parent_ip, op, regs);
  
        preempt_enable_notrace();
        trace_clear_recursion(bit);
diff --combined kernel/trace/trace.c
@@@ -251,145 -251,6 +251,145 @@@ unsigned long long ns2usecs(u64 nsec
        return nsec;
  }
  
 +static void
 +trace_process_export(struct trace_export *export,
 +             struct ring_buffer_event *event, int flag)
 +{
 +      struct trace_entry *entry;
 +      unsigned int size = 0;
 +
 +      if (export->flags & flag) {
 +              entry = ring_buffer_event_data(event);
 +              size = ring_buffer_event_length(event);
 +              export->write(export, entry, size);
 +      }
 +}
 +
 +static DEFINE_MUTEX(ftrace_export_lock);
 +
 +static struct trace_export __rcu *ftrace_exports_list __read_mostly;
 +
 +static DEFINE_STATIC_KEY_FALSE(trace_function_exports_enabled);
 +static DEFINE_STATIC_KEY_FALSE(trace_event_exports_enabled);
 +static DEFINE_STATIC_KEY_FALSE(trace_marker_exports_enabled);
 +
 +static inline void ftrace_exports_enable(struct trace_export *export)
 +{
 +      if (export->flags & TRACE_EXPORT_FUNCTION)
 +              static_branch_inc(&trace_function_exports_enabled);
 +
 +      if (export->flags & TRACE_EXPORT_EVENT)
 +              static_branch_inc(&trace_event_exports_enabled);
 +
 +      if (export->flags & TRACE_EXPORT_MARKER)
 +              static_branch_inc(&trace_marker_exports_enabled);
 +}
 +
 +static inline void ftrace_exports_disable(struct trace_export *export)
 +{
 +      if (export->flags & TRACE_EXPORT_FUNCTION)
 +              static_branch_dec(&trace_function_exports_enabled);
 +
 +      if (export->flags & TRACE_EXPORT_EVENT)
 +              static_branch_dec(&trace_event_exports_enabled);
 +
 +      if (export->flags & TRACE_EXPORT_MARKER)
 +              static_branch_dec(&trace_marker_exports_enabled);
 +}
 +
 +static void ftrace_exports(struct ring_buffer_event *event, int flag)
 +{
 +      struct trace_export *export;
 +
 +      preempt_disable_notrace();
 +
 +      export = rcu_dereference_raw_check(ftrace_exports_list);
 +      while (export) {
 +              trace_process_export(export, event, flag);
 +              export = rcu_dereference_raw_check(export->next);
 +      }
 +
 +      preempt_enable_notrace();
 +}
 +
 +static inline void
 +add_trace_export(struct trace_export **list, struct trace_export *export)
 +{
 +      rcu_assign_pointer(export->next, *list);
 +      /*
 +       * We are entering export into the list but another
 +       * CPU might be walking that list. We need to make sure
 +       * the export->next pointer is valid before another CPU sees
 +       * the export pointer included into the list.
 +       */
 +      rcu_assign_pointer(*list, export);
 +}
 +
 +static inline int
 +rm_trace_export(struct trace_export **list, struct trace_export *export)
 +{
 +      struct trace_export **p;
 +
 +      for (p = list; *p != NULL; p = &(*p)->next)
 +              if (*p == export)
 +                      break;
 +
 +      if (*p != export)
 +              return -1;
 +
 +      rcu_assign_pointer(*p, (*p)->next);
 +
 +      return 0;
 +}
 +
 +static inline void
 +add_ftrace_export(struct trace_export **list, struct trace_export *export)
 +{
 +      ftrace_exports_enable(export);
 +
 +      add_trace_export(list, export);
 +}
 +
 +static inline int
 +rm_ftrace_export(struct trace_export **list, struct trace_export *export)
 +{
 +      int ret;
 +
 +      ret = rm_trace_export(list, export);
 +      ftrace_exports_disable(export);
 +
 +      return ret;
 +}
 +
 +int register_ftrace_export(struct trace_export *export)
 +{
 +      if (WARN_ON_ONCE(!export->write))
 +              return -1;
 +
 +      mutex_lock(&ftrace_export_lock);
 +
 +      add_ftrace_export(&ftrace_exports_list, export);
 +
 +      mutex_unlock(&ftrace_export_lock);
 +
 +      return 0;
 +}
 +EXPORT_SYMBOL_GPL(register_ftrace_export);
 +
 +int unregister_ftrace_export(struct trace_export *export)
 +{
 +      int ret;
 +
 +      mutex_lock(&ftrace_export_lock);
 +
 +      ret = rm_ftrace_export(&ftrace_exports_list, export);
 +
 +      mutex_unlock(&ftrace_export_lock);
 +
 +      return ret;
 +}
 +EXPORT_SYMBOL_GPL(unregister_ftrace_export);
 +
  /* trace_flags holds trace_options default values */
  #define TRACE_DEFAULT_FLAGS                                           \
        (FUNCTION_DEFAULT_FLAGS |                                       \
@@@ -2650,7 -2511,7 +2650,7 @@@ void trace_buffered_event_enable(void
  
                preempt_disable();
                if (cpu == smp_processor_id() &&
-                   this_cpu_read(trace_buffered_event) !=
+                   __this_cpu_read(trace_buffered_event) !=
                    per_cpu(trace_buffered_event, cpu))
                        WARN_ON_ONCE(1);
                preempt_enable();
@@@ -2838,8 -2699,6 +2838,8 @@@ void trace_event_buffer_commit(struct t
        if (static_key_false(&tracepoint_printk_key.key))
                output_printk(fbuffer);
  
 +      if (static_branch_unlikely(&trace_event_exports_enabled))
 +              ftrace_exports(fbuffer->event, TRACE_EXPORT_EVENT);
        event_trigger_unlock_commit_regs(fbuffer->trace_file, fbuffer->buffer,
                                    fbuffer->event, fbuffer->entry,
                                    fbuffer->flags, fbuffer->pc, fbuffer->regs);
@@@ -2883,6 -2742,129 +2883,6 @@@ trace_buffer_unlock_commit_nostack(stru
        __buffer_unlock_commit(buffer, event);
  }
  
 -static void
 -trace_process_export(struct trace_export *export,
 -             struct ring_buffer_event *event)
 -{
 -      struct trace_entry *entry;
 -      unsigned int size = 0;
 -
 -      entry = ring_buffer_event_data(event);
 -      size = ring_buffer_event_length(event);
 -      export->write(export, entry, size);
 -}
 -
 -static DEFINE_MUTEX(ftrace_export_lock);
 -
 -static struct trace_export __rcu *ftrace_exports_list __read_mostly;
 -
 -static DEFINE_STATIC_KEY_FALSE(ftrace_exports_enabled);
 -
 -static inline void ftrace_exports_enable(void)
 -{
 -      static_branch_enable(&ftrace_exports_enabled);
 -}
 -
 -static inline void ftrace_exports_disable(void)
 -{
 -      static_branch_disable(&ftrace_exports_enabled);
 -}
 -
 -static void ftrace_exports(struct ring_buffer_event *event)
 -{
 -      struct trace_export *export;
 -
 -      preempt_disable_notrace();
 -
 -      export = rcu_dereference_raw_check(ftrace_exports_list);
 -      while (export) {
 -              trace_process_export(export, event);
 -              export = rcu_dereference_raw_check(export->next);
 -      }
 -
 -      preempt_enable_notrace();
 -}
 -
 -static inline void
 -add_trace_export(struct trace_export **list, struct trace_export *export)
 -{
 -      rcu_assign_pointer(export->next, *list);
 -      /*
 -       * We are entering export into the list but another
 -       * CPU might be walking that list. We need to make sure
 -       * the export->next pointer is valid before another CPU sees
 -       * the export pointer included into the list.
 -       */
 -      rcu_assign_pointer(*list, export);
 -}
 -
 -static inline int
 -rm_trace_export(struct trace_export **list, struct trace_export *export)
 -{
 -      struct trace_export **p;
 -
 -      for (p = list; *p != NULL; p = &(*p)->next)
 -              if (*p == export)
 -                      break;
 -
 -      if (*p != export)
 -              return -1;
 -
 -      rcu_assign_pointer(*p, (*p)->next);
 -
 -      return 0;
 -}
 -
 -static inline void
 -add_ftrace_export(struct trace_export **list, struct trace_export *export)
 -{
 -      if (*list == NULL)
 -              ftrace_exports_enable();
 -
 -      add_trace_export(list, export);
 -}
 -
 -static inline int
 -rm_ftrace_export(struct trace_export **list, struct trace_export *export)
 -{
 -      int ret;
 -
 -      ret = rm_trace_export(list, export);
 -      if (*list == NULL)
 -              ftrace_exports_disable();
 -
 -      return ret;
 -}
 -
 -int register_ftrace_export(struct trace_export *export)
 -{
 -      if (WARN_ON_ONCE(!export->write))
 -              return -1;
 -
 -      mutex_lock(&ftrace_export_lock);
 -
 -      add_ftrace_export(&ftrace_exports_list, export);
 -
 -      mutex_unlock(&ftrace_export_lock);
 -
 -      return 0;
 -}
 -EXPORT_SYMBOL_GPL(register_ftrace_export);
 -
 -int unregister_ftrace_export(struct trace_export *export)
 -{
 -      int ret;
 -
 -      mutex_lock(&ftrace_export_lock);
 -
 -      ret = rm_ftrace_export(&ftrace_exports_list, export);
 -
 -      mutex_unlock(&ftrace_export_lock);
 -
 -      return ret;
 -}
 -EXPORT_SYMBOL_GPL(unregister_ftrace_export);
 -
  void
  trace_function(struct trace_array *tr,
               unsigned long ip, unsigned long parent_ip, unsigned long flags,
        entry->parent_ip                = parent_ip;
  
        if (!call_filter_check_discard(call, entry, buffer, event)) {
 -              if (static_branch_unlikely(&ftrace_exports_enabled))
 -                      ftrace_exports(event);
 +              if (static_branch_unlikely(&trace_function_exports_enabled))
 +                      ftrace_exports(event, TRACE_EXPORT_FUNCTION);
                __buffer_unlock_commit(buffer, event);
        }
  }
@@@ -3564,15 -3546,13 +3564,15 @@@ struct trace_entry *trace_find_next_ent
        if (iter->ent && iter->ent != iter->temp) {
                if ((!iter->temp || iter->temp_size < iter->ent_size) &&
                    !WARN_ON_ONCE(iter->temp == static_temp_buf)) {
 -                      kfree(iter->temp);
 -                      iter->temp = kmalloc(iter->ent_size, GFP_KERNEL);
 -                      if (!iter->temp)
 +                      void *temp;
 +                      temp = kmalloc(iter->ent_size, GFP_KERNEL);
 +                      if (!temp)
                                return NULL;
 +                      kfree(iter->temp);
 +                      iter->temp = temp;
 +                      iter->temp_size = iter->ent_size;
                }
                memcpy(iter->temp, iter->ent, iter->ent_size);
 -              iter->temp_size = iter->ent_size;
                iter->ent = iter->temp;
        }
        entry = __find_next_entry(iter, ent_cpu, NULL, ent_ts);
@@@ -5142,10 -5122,10 +5142,10 @@@ static const char readme_msg[] 
        "\t           -:[<group>/]<event>\n"
  #ifdef CONFIG_KPROBE_EVENTS
        "\t    place: [<module>:]<symbol>[+<offset>]|<memaddr>\n"
-   "place (kretprobe): [<module>:]<symbol>[+<offset>]|<memaddr>\n"
+   "place (kretprobe): [<module>:]<symbol>[+<offset>]%return|<memaddr>\n"
  #endif
  #ifdef CONFIG_UPROBE_EVENTS
-   "   place (uprobe): <path>:<offset>[(ref_ctr_offset)]\n"
+   "   place (uprobe): <path>:<offset>[%return][(ref_ctr_offset)]\n"
  #endif
        "\t     args: <name>=fetcharg[:type]\n"
        "\t fetcharg: %<register>, @<address>, @<symbol>[+|-<offset>],\n"
        "\t        trace(<synthetic_event>,param list)  - generate synthetic event\n"
        "\t        save(field,...)                      - save current event fields\n"
  #ifdef CONFIG_TRACER_SNAPSHOT
-       "\t        snapshot()                           - snapshot the trace buffer\n"
+       "\t        snapshot()                           - snapshot the trace buffer\n\n"
+ #endif
+ #ifdef CONFIG_SYNTH_EVENTS
+       "  events/synthetic_events\t- Create/append/remove/show synthetic events\n"
+       "\t  Write into this file to define/undefine new synthetic events.\n"
+       "\t     example: echo 'myevent u64 lat; char name[]' >> synthetic_events\n"
  #endif
  #endif
  ;
@@@ -6682,7 -6667,6 +6687,6 @@@ tracing_mark_write(struct file *filp, c
                written = -EFAULT;
        } else
                written = cnt;
-       len = cnt;
  
        if (tr->trace_marker_file && !list_empty(&tr->trace_marker_file->triggers)) {
                /* do not add \n before testing triggers, but add \0 */
        } else
                entry->buf[cnt] = '\0';
  
 +      if (static_branch_unlikely(&trace_marker_exports_enabled))
 +              ftrace_exports(event, TRACE_EXPORT_MARKER);
        __buffer_unlock_commit(buffer, event);
  
        if (tt)
@@@ -8658,6 -8640,24 +8662,24 @@@ struct trace_array *trace_array_find_ge
        return tr;
  }
  
+ static int trace_array_create_dir(struct trace_array *tr)
+ {
+       int ret;
+       tr->dir = tracefs_create_dir(tr->name, trace_instance_dir);
+       if (!tr->dir)
+               return -EINVAL;
+       ret = event_trace_add_tracer(tr->dir, tr);
+       if (ret)
+               tracefs_remove(tr->dir);
+       init_tracer_tracefs(tr, tr->dir);
+       __update_tracer_options(tr);
+       return ret;
+ }
  static struct trace_array *trace_array_create(const char *name)
  {
        struct trace_array *tr;
        if (allocate_trace_buffers(tr, trace_buf_size) < 0)
                goto out_free_tr;
  
-       tr->dir = tracefs_create_dir(name, trace_instance_dir);
-       if (!tr->dir)
+       if (ftrace_allocate_ftrace_ops(tr) < 0)
                goto out_free_tr;
  
-       ret = event_trace_add_tracer(tr->dir, tr);
-       if (ret) {
-               tracefs_remove(tr->dir);
-               goto out_free_tr;
-       }
        ftrace_init_trace_array(tr);
  
-       init_tracer_tracefs(tr, tr->dir);
        init_trace_flags_index(tr);
-       __update_tracer_options(tr);
+       if (trace_instance_dir) {
+               ret = trace_array_create_dir(tr);
+               if (ret)
+                       goto out_free_tr;
+       } else
+               __trace_early_add_events(tr);
  
        list_add(&tr->list, &ftrace_trace_arrays);
  
        tr->ref++;
  
        return tr;
  
   out_free_tr:
+       ftrace_free_ftrace_ops(tr);
        free_trace_buffers(tr);
        free_cpumask_var(tr->tracing_cpumask);
        kfree(tr->name);
@@@ -8821,7 -8819,6 +8841,6 @@@ static int __remove_instance(struct tra
        free_cpumask_var(tr->tracing_cpumask);
        kfree(tr->name);
        kfree(tr);
-       tr = NULL;
  
        return 0;
  }
@@@ -8875,11 -8872,27 +8894,27 @@@ static int instance_rmdir(const char *n
  
  static __init void create_trace_instances(struct dentry *d_tracer)
  {
+       struct trace_array *tr;
        trace_instance_dir = tracefs_create_instance_dir("instances", d_tracer,
                                                         instance_mkdir,
                                                         instance_rmdir);
        if (MEM_FAIL(!trace_instance_dir, "Failed to create instances directory\n"))
                return;
+       mutex_lock(&event_mutex);
+       mutex_lock(&trace_types_lock);
+       list_for_each_entry(tr, &ftrace_trace_arrays, list) {
+               if (!tr->name)
+                       continue;
+               if (MEM_FAIL(trace_array_create_dir(tr) < 0,
+                            "Failed to create instance directory\n"))
+                       break;
+       }
+       mutex_unlock(&trace_types_lock);
+       mutex_unlock(&event_mutex);
  }
  
  static void
@@@ -8993,21 -9006,21 +9028,21 @@@ static struct vfsmount *trace_automount
   * directory. It is called via fs_initcall() by any of the boot up code
   * and expects to return the dentry of the top level tracing directory.
   */
struct dentry *tracing_init_dentry(void)
int tracing_init_dentry(void)
  {
        struct trace_array *tr = &global_trace;
  
        if (security_locked_down(LOCKDOWN_TRACEFS)) {
                pr_warn("Tracing disabled due to lockdown\n");
-               return ERR_PTR(-EPERM);
+               return -EPERM;
        }
  
        /* The top level trace array uses  NULL as parent */
        if (tr->dir)
-               return NULL;
+               return 0;
  
        if (WARN_ON(!tracefs_initialized()))
-               return ERR_PTR(-ENODEV);
+               return -ENODEV;
  
        /*
         * As there may still be users that expect the tracing
        tr->dir = debugfs_create_automount("tracing", NULL,
                                           trace_automount, NULL);
  
-       return NULL;
+       return 0;
  }
  
  extern struct trace_eval_map *__start_ftrace_eval_maps[];
@@@ -9094,7 -9107,7 +9129,7 @@@ static int trace_module_notify(struct n
                break;
        }
  
 -      return 0;
 +      return NOTIFY_OK;
  }
  
  static struct notifier_block trace_module_nb = {
  
  static __init int tracer_init_tracefs(void)
  {
-       struct dentry *d_tracer;
+       int ret;
  
        trace_access_lock_init();
  
-       d_tracer = tracing_init_dentry();
-       if (IS_ERR(d_tracer))
+       ret = tracing_init_dentry();
+       if (ret)
                return 0;
  
        event_trace_init();
  
-       init_tracer_tracefs(&global_trace, d_tracer);
-       ftrace_init_tracefs_toplevel(&global_trace, d_tracer);
+       init_tracer_tracefs(&global_trace, NULL);
+       ftrace_init_tracefs_toplevel(&global_trace, NULL);
  
-       trace_create_file("tracing_thresh", 0644, d_tracer,
+       trace_create_file("tracing_thresh", 0644, NULL,
                        &global_trace, &tracing_thresh_fops);
  
-       trace_create_file("README", 0444, d_tracer,
+       trace_create_file("README", 0444, NULL,
                        NULL, &tracing_readme_fops);
  
-       trace_create_file("saved_cmdlines", 0444, d_tracer,
+       trace_create_file("saved_cmdlines", 0444, NULL,
                        NULL, &tracing_saved_cmdlines_fops);
  
-       trace_create_file("saved_cmdlines_size", 0644, d_tracer,
+       trace_create_file("saved_cmdlines_size", 0644, NULL,
                          NULL, &tracing_saved_cmdlines_size_fops);
  
-       trace_create_file("saved_tgids", 0444, d_tracer,
+       trace_create_file("saved_tgids", 0444, NULL,
                        NULL, &tracing_saved_tgids_fops);
  
        trace_eval_init();
  
-       trace_create_eval_file(d_tracer);
+       trace_create_eval_file(NULL);
  
  #ifdef CONFIG_MODULES
        register_module_notifier(&trace_module_nb);
  #endif
  
  #ifdef CONFIG_DYNAMIC_FTRACE
-       trace_create_file("dyn_ftrace_total_info", 0444, d_tracer,
+       trace_create_file("dyn_ftrace_total_info", 0444, NULL,
                        NULL, &tracing_dyn_info_fops);
  #endif
  
-       create_trace_instances(d_tracer);
+       create_trace_instances(NULL);
  
        update_tracer_options(&global_trace);
  
@@@ -9309,7 -9322,7 +9344,7 @@@ void ftrace_dump(enum ftrace_dump_mode 
        }
  
        /*
-        * We need to stop all tracing on all CPUS to read the
+        * We need to stop all tracing on all CPUS to read
         * the next buffer. This is a bit expensive, but is
         * not done often. We fill all what we can read,
         * and then release the locks again.
@@@ -9452,7 -9465,7 +9487,7 @@@ __init static int tracer_alloc_buffers(
        }
  
        /*
-        * Make sure we don't accidently add more trace options
+        * Make sure we don't accidentally add more trace options
         * than we have bits for.
         */
        BUILD_BUG_ON(TRACE_ITER_LAST_BIT > TRACE_FLAGS_MAX_SIZE);
  
        /*
         * The prepare callbacks allocates some memory for the ring buffer. We
-        * don't free the buffer if the if the CPU goes down. If we were to free
+        * don't free the buffer if the CPU goes down. If we were to free
         * the buffer, then the user would lose any trace that was in the
         * buffer. The memory will be removed once the "instance" is removed.
         */
@@@ -38,6 -38,7 +38,7 @@@ DEFINE_MUTEX(event_mutex)
  LIST_HEAD(ftrace_events);
  static LIST_HEAD(ftrace_generic_fields);
  static LIST_HEAD(ftrace_common_fields);
+ static bool eventdir_initialized;
  
  #define GFP_TRACE (GFP_KERNEL | __GFP_ZERO)
  
@@@ -2123,12 -2124,48 +2124,48 @@@ event_subsystem_dir(struct trace_array 
        return NULL;
  }
  
+ static int
+ event_define_fields(struct trace_event_call *call)
+ {
+       struct list_head *head;
+       int ret = 0;
+       /*
+        * Other events may have the same class. Only update
+        * the fields if they are not already defined.
+        */
+       head = trace_get_fields(call);
+       if (list_empty(head)) {
+               struct trace_event_fields *field = call->class->fields_array;
+               unsigned int offset = sizeof(struct trace_entry);
+               for (; field->type; field++) {
+                       if (field->type == TRACE_FUNCTION_TYPE) {
+                               field->define_fields(call);
+                               break;
+                       }
+                       offset = ALIGN(offset, field->align);
+                       ret = trace_define_field(call, field->type, field->name,
+                                                offset, field->size,
+                                                field->is_signed, field->filter_type);
+                       if (WARN_ON_ONCE(ret)) {
+                               pr_err("error code is %d\n", ret);
+                               break;
+                       }
+                       offset += field->size;
+               }
+       }
+       return ret;
+ }
  static int
  event_create_dir(struct dentry *parent, struct trace_event_file *file)
  {
        struct trace_event_call *call = file->event_call;
        struct trace_array *tr = file->tr;
-       struct list_head *head;
        struct dentry *d_events;
        const char *name;
        int ret;
                                  &ftrace_event_id_fops);
  #endif
  
-       /*
-        * Other events may have the same class. Only update
-        * the fields if they are not already defined.
-        */
-       head = trace_get_fields(call);
-       if (list_empty(head)) {
-               struct trace_event_fields *field = call->class->fields_array;
-               unsigned int offset = sizeof(struct trace_entry);
-               for (; field->type; field++) {
-                       if (field->type == TRACE_FUNCTION_TYPE) {
-                               ret = field->define_fields(call);
-                               break;
-                       }
-                       offset = ALIGN(offset, field->align);
-                       ret = trace_define_field(call, field->type, field->name,
-                                                offset, field->size,
-                                                field->is_signed, field->filter_type);
-                       if (ret)
-                               break;
-                       offset += field->size;
-               }
-               if (ret < 0) {
-                       pr_warn("Could not initialize trace point events/%s\n",
-                               name);
-                       return -1;
-               }
+       ret = event_define_fields(call);
+       if (ret < 0) {
+               pr_warn("Could not initialize trace point events/%s\n", name);
+               return ret;
        }
  
        /*
@@@ -2475,7 -2487,10 +2487,10 @@@ __trace_add_new_event(struct trace_even
        if (!file)
                return -ENOMEM;
  
-       return event_create_dir(tr->event_dir, file);
+       if (eventdir_initialized)
+               return event_create_dir(tr->event_dir, file);
+       else
+               return event_define_fields(call);
  }
  
  /*
@@@ -2493,7 -2508,7 +2508,7 @@@ __trace_early_add_new_event(struct trac
        if (!file)
                return -ENOMEM;
  
-       return 0;
+       return event_define_fields(call);
  }
  
  struct ftrace_module_file_ops;
@@@ -2646,7 -2661,7 +2661,7 @@@ static int trace_module_notify(struct n
        mutex_unlock(&trace_types_lock);
        mutex_unlock(&event_mutex);
  
 -      return 0;
 +      return NOTIFY_OK;
  }
  
  static struct notifier_block trace_module_nb = {
@@@ -3116,14 -3131,13 +3131,13 @@@ static inline int register_event_cmds(v
  #endif /* CONFIG_DYNAMIC_FTRACE */
  
  /*
-  * The top level array has already had its trace_event_file
-  * descriptors created in order to allow for early events to
-  * be recorded. This function is called after the tracefs has been
-  * initialized, and we now have to create the files associated
-  * to the events.
+  * The top level array and trace arrays created by boot-time tracing
+  * have already had its trace_event_file descriptors created in order
+  * to allow for early events to be recorded.
+  * This function is called after the tracefs has been initialized,
+  * and we now have to create the files associated to the events.
   */
- static __init void
- __trace_early_add_event_dirs(struct trace_array *tr)
+ static void __trace_early_add_event_dirs(struct trace_array *tr)
  {
        struct trace_event_file *file;
        int ret;
  }
  
  /*
-  * For early boot up, the top trace array requires to have
-  * a list of events that can be enabled. This must be done before
-  * the filesystem is set up in order to allow events to be traced
-  * early.
+  * For early boot up, the top trace array and the trace arrays created
+  * by boot-time tracing require to have a list of events that can be
+  * enabled. This must be done before the filesystem is set up in order
+  * to allow events to be traced early.
   */
- static __init void
- __trace_early_add_events(struct trace_array *tr)
+ void __trace_early_add_events(struct trace_array *tr)
  {
        struct trace_event_call *call;
        int ret;
@@@ -3275,7 -3288,11 +3288,11 @@@ int event_trace_add_tracer(struct dentr
                goto out;
  
        down_write(&trace_event_sem);
-       __trace_add_event_dirs(tr);
+       /* If tr already has the event list, it is initialized in early boot. */
+       if (unlikely(!list_empty(&tr->events)))
+               __trace_early_add_event_dirs(tr);
+       else
+               __trace_add_event_dirs(tr);
        up_write(&trace_event_sem);
  
   out:
@@@ -3431,10 -3448,21 +3448,21 @@@ static __init int event_trace_enable_ag
  
  early_initcall(event_trace_enable_again);
  
+ /* Init fields which doesn't related to the tracefs */
+ static __init int event_trace_init_fields(void)
+ {
+       if (trace_define_generic_fields())
+               pr_warn("tracing: Failed to allocated generic fields");
+       if (trace_define_common_fields())
+               pr_warn("tracing: Failed to allocate common fields");
+       return 0;
+ }
  __init int event_trace_init(void)
  {
        struct trace_array *tr;
-       struct dentry *d_tracer;
        struct dentry *entry;
        int ret;
  
        if (!tr)
                return -ENODEV;
  
-       d_tracer = tracing_init_dentry();
-       if (IS_ERR(d_tracer))
-               return 0;
-       entry = tracefs_create_file("available_events", 0444, d_tracer,
+       entry = tracefs_create_file("available_events", 0444, NULL,
                                    tr, &ftrace_avail_fops);
        if (!entry)
                pr_warn("Could not create tracefs 'available_events' entry\n");
  
-       if (trace_define_generic_fields())
-               pr_warn("tracing: Failed to allocated generic fields");
-       if (trace_define_common_fields())
-               pr_warn("tracing: Failed to allocate common fields");
-       ret = early_event_add_tracer(d_tracer, tr);
+       ret = early_event_add_tracer(NULL, tr);
        if (ret)
                return ret;
  
        if (ret)
                pr_warn("Failed to register trace events module notifier\n");
  #endif
+       eventdir_initialized = true;
        return 0;
  }
  
@@@ -3474,6 -3495,7 +3495,7 @@@ void __init trace_event_init(void
        event_trace_memsetup();
        init_ftrace_syscalls();
        event_trace_enable();
+       event_trace_init_fields();
  }
  
  #ifdef CONFIG_EVENT_TRACE_STARTUP_TEST
@@@ -96,7 -96,7 +96,7 @@@ static int module_trace_bprintk_format_
                if (val == MODULE_STATE_COMING)
                        hold_module_trace_bprintk_format(start, end);
        }
 -      return 0;
 +      return NOTIFY_OK;
  }
  
  /*
@@@ -174,7 -174,7 +174,7 @@@ __init static in
  module_trace_bprintk_format_notify(struct notifier_block *self,
                unsigned long val, void *data)
  {
 -      return 0;
 +      return NOTIFY_OK;
  }
  static inline const char **
  find_next_mod_format(int start_index, void *v, const char **fmt, loff_t *pos)
@@@ -367,13 -367,13 +367,13 @@@ static const struct file_operations ftr
  
  static __init int init_trace_printk_function_export(void)
  {
-       struct dentry *d_tracer;
+       int ret;
  
-       d_tracer = tracing_init_dentry();
-       if (IS_ERR(d_tracer))
+       ret = tracing_init_dentry();
+       if (ret)
                return 0;
  
-       trace_create_file("printk_formats", 0444, d_tracer,
+       trace_create_file("printk_formats", 0444, NULL,
                                    NULL, &ftrace_formats_fops);
  
        return 0;
@@@ -86,15 -86,21 +86,21 @@@ esa
  
  # multiprobe errors
  if grep -q "Create/append/" README && grep -q "imm-value" README; then
 -echo 'p:kprobes/testevent _do_fork' > kprobe_events
 +echo 'p:kprobes/testevent kernel_clone' > kprobe_events
  check_error '^r:kprobes/testevent do_exit'    # DIFF_PROBE_TYPE
  
  # Explicitly use printf "%s" to not interpret \1
 -printf "%s" 'p:kprobes/testevent _do_fork abcd=\1' > kprobe_events
 -check_error 'p:kprobes/testevent _do_fork ^bcd=\1'    # DIFF_ARG_TYPE
 -check_error 'p:kprobes/testevent _do_fork ^abcd=\1:u8'        # DIFF_ARG_TYPE
 -check_error 'p:kprobes/testevent _do_fork ^abcd=\"foo"'       # DIFF_ARG_TYPE
 -check_error '^p:kprobes/testevent _do_fork abcd=\1'   # SAME_PROBE
 +printf "%s" 'p:kprobes/testevent kernel_clone abcd=\1' > kprobe_events
 +check_error 'p:kprobes/testevent kernel_clone ^bcd=\1'        # DIFF_ARG_TYPE
 +check_error 'p:kprobes/testevent kernel_clone ^abcd=\1:u8'    # DIFF_ARG_TYPE
 +check_error 'p:kprobes/testevent kernel_clone ^abcd=\"foo"'   # DIFF_ARG_TYPE
 +check_error '^p:kprobes/testevent kernel_clone abcd=\1'       # SAME_PROBE
  fi
  
+ # %return suffix errors
+ if grep -q "place (kretprobe): .*%return.*" README; then
+ check_error 'p vfs_read^%hoge'                # BAD_ADDR_SUFFIX
+ check_error 'p ^vfs_read+10%return'   # BAD_RETPROBE
+ fi
  exit 0