Linux/linux fec88abDocumentation/vm hmm.rst, drivers/gpu/drm/nouveau nouveau_dmem.c

Merge tag 'for-linus-hmm' of git://

Pull HMM updates from Jason Gunthorpe:
 "Improvements and bug fixes for the hmm interface in the kernel:

   - Improve clarity, locking and APIs related to the 'hmm mirror'
     feature merged last cycle. In linux-next we now see AMDGPU and
     nouveau to be using this API.

   - Remove old or transitional hmm APIs. These are hold overs from the
     past with no users, or APIs that existed only to manage cross tree
     conflicts. There are still a few more of these cleanups that didn't
     make the merge window cut off.

   - Improve some core mm APIs:
       - export alloc_pages_vma() for driver use
       - refactor into devm_request_free_mem_region() to manage
         DEVICE_PRIVATE resource reservations
       - refactor duplicative driver code into the core dev_pagemap

   - Remove hmm wrappers of improved core mm APIs, instead have drivers
     use the simplified API directly


    [26 lines not shown]

Linux/linux fa6e951fs/ecryptfs crypto.c debug.c

Merge tag 'ecryptfs-5.3-rc1-fixes' of 

Pull eCryptfs updates from Tyler Hicks:

 - Fix error handling when ecryptfs_read_lower() encounters an error

 - Fix read-only file creation when the eCryptfs mount is configured to
   store metadata in xattrs

 - Minor code cleanups

* tag 'ecryptfs-5.3-rc1-fixes' of 
  ecryptfs: Change return type of ecryptfs_process_flags
  ecryptfs: Make ecryptfs_xattr_handler static
  ecryptfs: remove unnessesary null check in ecryptfs_keyring_auth_tok_for_sig
  ecryptfs: use print_hex_dump_bytes for hexdump
  eCryptfs: fix permission denied with ecryptfs_xattr mount option when create readonly 
  ecryptfs: re-order a condition for static checkers
  eCryptfs: fix a couple type promotion bugs

Linux/linux a318423fs/ubifs orphan.c auth.c

Merge tag 'upstream-5.3-rc1' of git://

Pull UBIFS updates from Richard Weinberger:

 - Support for zstd compression

 - Support for offline signed filesystems

 - Various fixes for regressions

* tag 'upstream-5.3-rc1' of git://
  ubifs: Don't leak orphans on memory during commit
  ubifs: Check link count of inodes when killing orphans.
  ubifs: Add support for zstd compression.
  ubifs: support offline signed images
  ubifs: remove unnecessary check in ubifs_log_start_commit
  ubifs: Fix typo of output in get_cs_sqnum
  ubifs: Simplify redundant code
  ubifs: Correctly use tnc_next() in search_dh_cookie()

Linux/linux f2772a0arch/um/drivers chan_kern.c ssl.h, arch/um/include/shared timer-internal.h

Merge tag 'for-linus-5.3-rc1' of git://

Pull UML updates from Richard Weinberger:

 - A new timer mode, time travel, for testing with UML

 - Many bugixes/improvements for the serial line driver

 - Various bugfixes

* tag 'for-linus-5.3-rc1' of git://
  um: fix build without CONFIG_UML_TIME_TRAVEL_SUPPORT
  um: Fix kcov crash during startup
  um: configs: Remove useless UEVENT_HELPER_PATH
  um: Support time travel mode
  um: Pass nsecs to os timer functions
  um: Remove drivers/ssl.h
  um: Don't garbage collect in deactivate_all_fds()
  um: Silence lockdep complaint about mmap_sem
  um: Remove locking in deactivate_all_fds()
  um: Timer code cleanup
  um: fix os_timer_one_shot()
  um: Fix IRQ controller regression on console read

Linux/linux fcd9814drivers/hid hid-sensor-custom.c, drivers/input mousedev.c

Merge tag 'stream_open-5.3' of

Pull stream_open() updates from Kirill Smelkov:
 "This time on stream_open front it is only two small changes:

   - the first one converts stream_open.cocci to treat all functions
     that start with wait_.* as blocking. Previously it was only
     wait_event_.* functions that were considered as blocking, but this
     was falsely reporting several deadlock cases as only warning.

     This was picked by linux-kbuild and entered mainline as commit
     0c4ab18fc33b ("coccinelle: api/stream_open: treat all wait_.*()
     calls as blocking"), and already merged earlier.

   - the second one teaches stream_open.cocci to consider files as being
     stream-like even if they use noop_llseek. It results in two more
     drivers being converted to stream_open() (mousedev.c and

* tag 'stream_open-5.3' of
  *: convert stream-like files -> stream_open, even if they use noop_llseek

Linux/linux 5516745drivers/platform/olpc olpc-xo175-ec.c, drivers/platform/x86 asus-wmi.c

Merge tag 'platform-drivers-x86-v5.3-1' of 

Pull x86 platform driver updates from Andy Shevchenko:
 "Gathered a bunch of x86 platform driver changes. It's rather big,
  since includes two big refactors and completely new driver:

   - ASUS WMI driver got a big refactoring in order to support the TUF
     Gaming laptops. Besides that, the regression with backlight being
     permanently off on various EeePC laptops has been fixed.

   - Accelerometer on HP ProBook 450 G0 shows wrong measurements due to
     X axis being inverted. This has been fixed.

   - Intel PMC core driver has been extended to be ACPI enumerated if
     the DSDT provides device with _HID "INT33A1". This allows to
     convert the driver to be pure platform and support new hardware
     purely based on ACPI DSDT.

   - From now on the Intel Speed Select Technology is supported thru a
     corresponding driver. This driver provides an access to the
     features of the ISST, such as Performance Profile, Core Power, Base
     frequency and Turbo Frequency.

   - Mellanox platform drivers has been refactored and now extended to

    [49 lines not shown]

Linux/linux fde7dc6Documentation/devicetree/bindings/mailbox omap-mailbox.txt, drivers/mailbox omap-mailbox.c stm32-ipcc.c

Merge tag 'mailbox-v5.3' of git://

Pull mailbox updates from Jassi Brar:

 - stm32: race fix by adding a spinlock

 - mhu: trim included headers

 - omap: add support for K3 SoCs

 - imx: Irq disable fix

 - bcm: tidy up extracting driver data

 - tegra: make resume 'noirq'

 - api: fix error handling

* tag 'mailbox-v5.3' of git://
  mailbox: handle failed named mailbox channel request
  mailbox: tegra: avoid resume NULL mailboxes
  mailbox: tegra: hsp: add noirq resume
  mailbox: bcm-flexrm-mailbox: using dev_get_drvdata directly
  mailbox: imx: Clear GIEn bit at shutdown
  mailbox: omap: Add support for TI K3 SoCs

    [3 lines not shown]

Linux/linux a1240cfdrivers/md md.c, fs io_uring.c

Merge branch 'for-5.3' of git://

Pull percpu updates from Dennis Zhou:
 "This includes changes to let percpu_ref release the backing percpu
  memory earlier after it has been switched to atomic in cases where the
  percpu ref is not revived.

  This will help recycle percpu memory earlier in cases where the
  refcounts are pinned for prolonged periods of time"

* 'for-5.3' of git://
  percpu_ref: release percpu memory early without PERCPU_REF_ALLOW_REINIT
  md: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT
  io_uring: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT
  percpu_ref: introduce PERCPU_REF_ALLOW_REINIT flag

Linux/linux 1d03985kernel/events core.c, tools/perf/ui/browsers hists.c

Merge branch 'perf-urgent-for-linus' of 

Pull perf fixes from Ingo Molnar:
 "A number of PMU driver corner case fixes, a race fix, an event
  grouping fix, plus a bunch of tooling fixes/updates"

* 'perf-urgent-for-linus' of git:// (30 
  perf/x86/intel: Fix spurious NMI on fixed counter
  perf/core: Fix exclusive events' grouping
  perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs
  perf/x86/amd/uncore: Do not set 'ThreadMask' and 'SliceMask' for non-L3 PMCs
  perf/core: Fix race between close() and fork()
  perf intel-pt: Fix potential NULL pointer dereference found by the smatch tool
  perf intel-bts: Fix potential NULL pointer dereference found by the smatch tool
  perf script: Assume native_arch for pipe mode
  perf scripts python: Fix DROP VIEW power_events_view
  perf scripts python: Fix DROP VIEW power_events_view
  perf hists browser: Fix potential NULL pointer dereference found by the smatch tool
  perf cs-etm: Fix potential NULL pointer dereference found by the smatch tool
  perf parse-events: Remove unused variable: error
  perf parse-events: Remove unused variable 'i'
  perf metricgroup: Add missing list_del_init() when flushing egroups list
  perf tools: Use list_del_init() more thorougly

    [5 lines not shown]

Linux/linux 0c85ce1kernel/locking lockdep_proc.c

Merge branch 'locking-urgent-for-linus' of 

Pull locking fix from Ingo Molnar:
 "A single fix for a locking statistics bug"

* 'locking-urgent-for-linus' of git://
  locking/lockdep: Fix lock used or unused stats error

Linux/linux 577d946arch/x86/entry/vdso Makefile

Merge branch 'x86-urgent-for-linus' of 

Pull x86 fix from Ingo Molnar:
 "A single build system bugfix"

* 'x86-urgent-for-linus' of git://
  x86/vdso: Fix flip/flop vdso build bug

Linux/linux 50ec188kernel/sched core.c

Merge branch 'sched-urgent-for-linus' of 

Pull scheduler fix from Ingo Molnar:
 "Fix a sched statistics related bug that would trigger a kernel warning
  on certain configs"

* 'sched-urgent-for-linus' of git://
  sched/core: Fix preempt warning in ttwu

Linux/linux 3975b09drivers/hid hid-sensor-custom.c, drivers/input mousedev.c

*: convert stream-like files -> stream_open, even if they use noop_llseek

This patch continues 10dce8af3422 (fs: stream_open - opener for
stream-like files so that read and write can run simultaneously without
deadlock) and c5bf68fe0c86 (*: convert stream-like files from
nonseekable_open -> stream_open) and teaches steam_open.cocci to
consider files as being stream-like not only if they have
.llseek=no_llseek, but also if they have .llseek=noop_llseek.

This is safe to do: the comment about noop_llseek says

        This is an implementation of ->llseek useable for the rare special case when
        userspace expects the seek to succeed but the (device) file is actually not
        able to perform the seek. In this case you use noop_llseek() instead of
        falling back to the default implementation of ->llseek.

and in general noop_llseek was massively added to drivers in 6038f373a3dc
(llseek: automatically add .llseek fop) when changing default for NULL .llseek
from NOP to no_llseek with the idea to avoid breaking compatibility, if
maybe some user-space program was using lseek on a device without caring
about the result, but caring if it was an error or not.

Amended semantic patch produces two changes when applied tree-wide:

        drivers/hid/hid-sensor-custom.c:690:8-24: WARNING: hid_sensor_custom_fops: .read() 

    [13 lines not shown]

Linux/linux 192f0f8arch/powerpc/include/asm exception-64s.h, arch/powerpc/kernel exceptions-64s.S

Merge tag 'powerpc-5.3-1' of git://

Pull powerpc updates from Michael Ellerman:
 "Notable changes:

   - Removal of the NPU DMA code, used by the out-of-tree Nvidia driver,
     as well as some other functions only used by drivers that haven't
     (yet?) made it upstream.

   - A fix for a bug in our handling of hardware watchpoints (eg. perf
     record -e mem: ...) which could lead to register corruption and
     kernel crashes.

   - Enable HAVE_ARCH_HUGE_VMAP, which allows us to use large pages for
     vmalloc when using the Radix MMU.

   - A large but incremental rewrite of our exception handling code to
     use gas macros rather than multiple levels of nested CPP macros.

  And the usual small fixes, cleanups and improvements.

  Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Andreas Schwab,
  Aneesh Kumar K.V, Anju T Sudhakar, Anton Blanchard, Arnd Bergmann,
  Athira Rajeev, Cédric Le Goater, Christian Lamparter, Christophe
  Leroy, Christophe Lombard, Christoph Hellwig, Daniel Axtens, Denis

    [32 lines not shown]

Linux/linux ec92497arch/sparc/configs sparc64_defconfig sparc32_defconfig, arch/sparc/include/uapi/asm openpromio.h

Merge git://

Pull sparc updates from David Miller:
 "Just a few small changes:

   - Fix console naming inconsistency with hypervisor consoles, from
     John Paul Adrian Glaubitz

   - Fix userland compilation due to use of u_int, from Masahiro Yamada"

* git://
  sparc64: Add missing newline at end of file
  sparc: fix unknown type name u_int in uapi header
  sparc: configs: Remove useless UEVENT_HELPER_PATH
  sparc: Remove redundant copy of the LGPL-2.0
  sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg

Linux/linux d121092drivers/net/ethernet/mellanox/mlx5/core/en_accel ktls_tx.c, drivers/net/ethernet/netronome/nfp/flower offload.c

Merge git://

Pull networking fixes from David Miller:

 1) Fix excessive stack usage in cxgb4, from Arnd Bergmann.

 2) Missing skb queue lock init in tipc, from Chris Packham.

 3) Fix some regressions in ipv6 flow label handling, from Eric Dumazet.

 4) Elide flow dissection of local packets in FIB rules, from Petar

 5) Fix TLS support build failure in mlx5, from Tariq Toukab.

* git:// (36 commits)
  ppp: mppe: Revert "ppp: mppe: Add softdep to arc4"
  net: dsa: qca8k: replace legacy gpio include
  net: hisilicon: Use devm_platform_ioremap_resource
  cxgb4: reduce kernel stack usage in cudbg_collect_mem_region()
  tipc: ensure head->lock is initialised
  tc-tests: updated skbedit tests
  nfp: flower: ensure ip protocol is specified for L4 matches
  nfp: flower: fix ethernet check on match fields
  net/mlx5e: Provide cb_list pointer when setting up tc block on rep

    [12 lines not shown]

Linux/linux 1fa9185include/linux ide.h

Merge git://

Pull IDE update from David Miller:
 "Small cleanup"

* git://
  ide: use BIT() macro for defining bit-flags
+136-1361 files

Linux/linux 3f06962drivers/mtd/hyperbus hyperbus-core.c hbmc-am654.c, drivers/mtd/nand/raw/brcmnand brcmnand.c

Merge tag 'mtd/for-5.3' of git://

Pull MTD updates from Miquel Raynal:
 "This contains the following changes for MTD:

  MTD core changes:
   - New Hyperbus framework
   - New _is_locked (concat) implementation
   - Various cleanups

  NAND core changes:
   - use longest matching pattern in ->exec_op() default parser
   - export NAND operation tracer
   - add flag to indicate panic_write in MTD
   - use kzalloc() instead of kmalloc() and memset()

  Raw NAND controller drivers changes:
   - brcmnand:
       - fix BCH ECC layout for large page NAND parts
       - fallback to detected ecc-strength, ecc-step-size
       - when oops in progress use pio and interrupt polling
       - code refactor code to introduce helper functions
       - add support for v7.3 controller
   - FSMC:
       - use nand_op_trace for operation tracing

    [62 lines not shown]

Linux/linux 2260840Documentation/device-mapper snapshot.rst, drivers/md dm-snap.c dm-crypt.c

Merge tag 'for-5.3/dm-changes' of 

Pull device mapper updates from Mike Snitzer:

 - Add encrypted byte-offset initialization vector (eboiv) to DM crypt.

 - Add optional discard features to DM snapshot which allow freeing
   space from a DM device whose free space was exhausted.

 - Various small improvements to use struct_size() and kzalloc().

 - Fix to check if DM thin metadata is in fail_io mode before attempting
   to update the superblock to set the needs_check flag. Otherwise the
   DM thin-pool can hang.

 - Fix DM bufio shrinker's potential for ABBA recursion deadlock with DM
   thin provisioning on loop usecase.

* tag 'for-5.3/dm-changes' of 
  dm bufio: fix deadlock with loop device
  dm snapshot: add optional discard support features
  dm crypt: implement eboiv - encrypted byte-offset initialization vector
  dm crypt: remove obsolete comment about plumb IV

    [8 lines not shown]

Linux/linux 92adeb6Documentation/driver-api ipmb.rst, drivers/char/ipmi ipmb_dev_int.c Kconfig

Merge tag 'for-linus-5.3' of git://

Pull IPMI updates from Corey Minyard:
 "Some small fixes for various things, nothing huge, mostly found by
  automated tools.

  Plus add a driver that allows Linux to act as an IPMB slave device, so
  it can be a satellite MC in an IPMI network"

* tag 'for-linus-5.3' of git://
  docs: ipmb: place it at driver-api and convert to ReST
  fix platform_no_drv_owner.cocci warnings
  ipmi: ipmb: don't allocate i2c_client on stack
  ipmi: ipmb: Fix build error while CONFIG_I2C is set to m
  Add support for IPMB driver
  drivers: ipmi: Drop device reference
  ipmi_ssif: fix unexpected driver unregister warning
  ipmi_si: use bool type for initialized variable
  ipmi_si: fix unexpected driver unregister warning

Linux/linux 43c95d3arch/arm64/boot/dts/freescale imx8mn-pinfunc.h, drivers/pinctrl pinctrl-bm1880.c

Merge tag 'pinctrl-v5.3-1' of 

Pull pin control updates from Linus Walleij:
 "This is the bulk of pin control changes for the v5.3 kernel cycle:

  Core changes:

   - Device links can optionally be added between a pin control producer
     and its consumers. This will affect how the system power management
     is handled: a pin controller will not suspend before all of its
     consumers have been suspended.

     This was necessary for the ST Microelectronics STMFX expander and
     need to be tested on other systems as well: it makes sense to make
     this default in the long run.

     Right now it is opt-in per driver.

   - Drive strength can be specified in microamps. With decreases in
     silicon technology, milliamps isn't granular enough, let's make it
     possible to select drive strengths in microamps.

     Right now the Meson (AMlogic) driver needs this.

    [54 lines not shown]

Linux/linux 073c916drivers/input/joystick/iforce iforce-packets.c iforce-usb.c, drivers/input/mouse elantech.c elan_i2c_core.c

Merge branch 'for-linus' of git://

Pull input updates from Dmitry Torokhov:

 - an update to Elan touchpad SMBus driver to fetch device parameters
   (size, resolution) while it is still in PS/2 mode, before switching
   over to SMBus, as in that mode some devices return garbage dimensions

 - update to iforce joystick driver

 - miscellaneous driver fixes

* 'for-linus' of git:// (48 commits)
  Input: gpio_keys_polled - allow specifying name of input device
  Input: edt-ft5x06 - simplify event reporting code
  Input: max77650-onkey - add MODULE_ALIAS()
  Input: atmel_mxt_ts - fix leak in mxt_update_cfg()
  Input: synaptics - enable SMBUS on T480 thinkpad trackpad
  Input: atmel_mxt_ts - fix -Wunused-const-variable
  Input: joydev - extend absolute mouse detection
  HID: quirks: Refactor ELAN 400 and 401 handling
  Input: elan_i2c - export the device id whitelist
  Input: edt-ft5x06 - use get_unaligned_be16()
  Input: iforce - add the Saitek R440 Force Wheel
  Input: iforce - use unaligned accessors, where appropriate

    [9 lines not shown]

Linux/linux a2d79c7fs io_uring.c aio.c, include/linux socket.h

Merge tag 'for-5.3/io_uring-20190711' of git://

Pull io_uring updates from Jens Axboe:
 "This contains:

   - Support for recvmsg/sendmsg as first class opcodes.

     I don't envision going much further down this path, as there are
     plans in progress to support potentially any system call in an
     async fashion through io_uring. But I think it does make sense to
     have certain core ops available directly, especially those that can
     support a "try this non-blocking" flag/mode. (me)

   - Handle generic short reads automatically.

     This can happen fairly easily if parts of the buffered read is
     cached. Since the application needs to issue another request for
     the remainder, just do this internally and save kernel/user
     roundtrip while providing a nicer more robust API. (me)

   - Support for linked SQEs.

     This allows SQEs to depend on each other, enabling an application
     to eg queue a read-from-this-file,write-to-that-file pair. (me)

    [9 lines not shown]

Linux/linux 68d41d8kernel/locking lockdep_proc.c

locking/lockdep: Fix lock used or unused stats error

The stats variable nr_unused_locks is incremented every time a new lock
class is register and decremented when the lock is first used in
__lock_acquire(). And after all, it is shown and checked in lockdep_stats.

However, under configurations that either CONFIG_TRACE_IRQFLAGS or
CONFIG_PROVE_LOCKING is not defined:

The commit:

  091806515124b20 ("locking/lockdep: Consolidate lock usage bit initialization")

missed marking the LOCK_USED flag at IRQ usage initialization because
as mark_usage() is not called. And the commit:

  886532aee3cd42d ("locking/lockdep: Move mark_lock() inside CONFIG_TRACE_IRQFLAGS && 

further made mark_lock() not defined such that the LOCK_USED cannot be
marked at all when the lock is first acquired.

As a result, we fix this by not showing and checking the stats under such
configurations for lockdep_stats.

    [13 lines not shown]

Linux/linux e3d8548kernel/sched core.c

sched/core: Fix preempt warning in ttwu

John reported a DEBUG_PREEMPT warning caused by commit:

  aacedf26fb76 ("sched/core: Optimize try_to_wake_up() for local wakeups")

I overlooked that ttwu_stat() requires preemption disabled.

Reported-by: John Stultz <john.stultz at>
Tested-by: John Stultz <john.stultz at>
Signed-off-by: Peter Zijlstra (Intel) <peterz at>
Cc: Andrew Morton <akpm at>
Cc: Linus Torvalds <torvalds at>
Cc: Peter Zijlstra <peterz at>
Cc: Thomas Gleixner <tglx at>
Fixes: aacedf26fb76 ("sched/core: Optimize try_to_wake_up() for local wakeups")
Link: at
Signed-off-by: Ingo Molnar <mingo at>

Linux/linux e4557c1arch/x86/events/intel core.c

perf/x86/intel: Fix spurious NMI on fixed counter

If a user first sample a PEBS event on a fixed counter, then sample a
non-PEBS event on the same fixed counter on Icelake, it will trigger
spurious NMI. For example:

  perf record -e 'cycles:p' -a
  perf record -e 'cycles' -a

The error message for spurious NMI:

  [June 21 15:38] Uhhuh. NMI received for unknown reason 30 on CPU 2.
  [    +0.000000] Do you have a strange power saving mode enabled?
  [    +0.000000] Dazed and confused, but trying to continue

The bug was introduced by the following commit:

  commit 6f55967ad9d9 ("perf/x86/intel: Fix race in intel_pmu_disable_event()")

The commit moves the intel_pmu_pebs_disable() after intel_pmu_disable_fixed(),
which returns immediately.  The related bit of PEBS_ENABLE MSR will never be
cleared for the fixed counter. Then a non-PEBS event runs on the fixed counter,
but the bit on PEBS_ENABLE is still set, which triggers spurious NMIs.

Check and disable PEBS for fixed counters after intel_pmu_disable_fixed().

    [17 lines not shown]

Linux/linux 8a58ddainclude/linux perf_event.h, kernel/events core.c

perf/core: Fix exclusive events' grouping

So far, we tried to disallow grouping exclusive events for the fear of
complications they would cause with moving between contexts. Specifically,
moving a software group to a hardware context would violate the exclusivity
rules if both groups contain matching exclusive events.

This attempt was, however, unsuccessful: the check that we have in the
perf_event_open() syscall is both wrong (looks at wrong PMU) and
insufficient (group leader may still be exclusive), as can be illustrated
by running:

  $ perf record -e '{intel_pt//,cycles}' uname
  $ perf record -e '{cycles,intel_pt//}' uname

ultimately successfully.

Furthermore, we are completely free to trigger the exclusivity violation

   perf -e '{cycles,intel_pt//}' -e '{intel_pt//,instructions}'

even though the helpful perf record will not allow that, the ABI will.

The warning later in the perf_event_open() path will also not trigger, because

    [20 lines not shown]

Linux/linux 2f217d5arch/x86/events/amd uncore.c

perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs

Fill in the L3 performance event select register ThreadMask
bitfield, to enable per hardware thread accounting.

Signed-off-by: Kim Phillips <kim.phillips at>
Signed-off-by: Peter Zijlstra (Intel) <peterz at>
Cc: <stable at>
Cc: Alexander Shishkin <alexander.shishkin at>
Cc: Arnaldo Carvalho de Melo <acme at>
Cc: Borislav Petkov <bp at>
Cc: Gary Hook <Gary.Hook at>
Cc: H. Peter Anvin <hpa at>
Cc: Janakarajan Natarajan <Janakarajan.Natarajan at>
Cc: Jiri Olsa <jolsa at>
Cc: Linus Torvalds <torvalds at>
Cc: Martin Liska <mliska at>
Cc: Namhyung Kim <namhyung at>
Cc: Peter Zijlstra <peterz at>
Cc: Pu Wen <puwen at>
Cc: Stephane Eranian <eranian at>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit at>
Cc: Thomas Gleixner <tglx at>
Cc: Vince Weaver <vincent.weaver at>
Link: at
Signed-off-by: Ingo Molnar <mingo at>

Linux/linux 16f4641arch/x86/events/amd uncore.c

perf/x86/amd/uncore: Do not set 'ThreadMask' and 'SliceMask' for non-L3 PMCs

The following commit:

  d7cbbe49a930 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf 

enables L3 PMC events for all threads and slices by writing 1's in
'ChL3PmcCfg' (L3 PMC PERF_CTL) register fields.

Those bitfields overlap with high order event select bits in the Data
Fabric PMC control register, however.

So when a user requests raw Data Fabric events (-e amd_df/event=0xYYY/),
the two highest order bits get inadvertently set, changing the counter
select to events that don't exist, and for which no counts are read.

This patch changes the logic to write the L3 masks only when dealing
with L3 PMC counters.

AMD Family 16h and below Northbridge (NB) counters were not affected.

Signed-off-by: Kim Phillips <kim.phillips at>
Signed-off-by: Peter Zijlstra (Intel) <peterz at>
Cc: <stable at>

    [20 lines not shown]

Linux/linux 1cf8dfekernel/events core.c

perf/core: Fix race between close() and fork()

Syzcaller reported the following Use-after-Free bug:

        close()                                           clone()

                                                               // expose event on child 

                                                      goto bad_fork_*

    [63 lines not shown]
+41-81 files

Linux/linux e5eb08atools/lib zalloc.c, tools/perf/ui/browsers hists.c

Merge tag 'perf-core-for-mingo-5.3-20190709' of 
git:// into perf/urgent

Pull perf/core improvements and fixes:

Intel PT:

  Adrian Hunter:

  - Fix DROP VIEW power_events_view in the postgresql and sqlite export-db
    python scripts.

perf script:

  Song Liu:

  - Assume native_arch for pipe mode, fixing a segfault.

perf inject:

  Arnaldo Carvalho de Melo:

  - The tool->read() call may pass a NULL evsel, handle it.


    [30 lines not shown]

Linux/linux 25a09cedrivers/net/ppp ppp_mppe.c

ppp: mppe: Revert "ppp: mppe: Add softdep to arc4"

Commit 0e5a610b5ca5 ("ppp: mppe: switch to RC4 library interface"),
which was merged through the crypto tree for v5.3, changed ppp_mppe.c to
use the new arc4_crypt() library function rather than access RC4 through
the dynamic crypto_skcipher API.

Meanwhile commit aad1dcc4f011 ("ppp: mppe: Add softdep to arc4") was
merged through the net tree and added a module soft-dependency on "arc4".

The latter commit no longer makes sense because the code now uses the
"libarc4" module rather than "arc4", and also due to the direct use of
arc4_crypt(), no module soft-dependency is required.

So revert the latter commit.

Cc: Takashi Iwai <tiwai at>
Cc: Ard Biesheuvel <ard.biesheuvel at>
Signed-off-by: Eric Biggers <ebiggers at>
Signed-off-by: David S. Miller <davem at>

Linux/linux 964a4eafs/dlm debug_fs.c lowcomms.c

Merge tag 'dlm-5.3' of git://

Pull dlm updates from David Teigland:
 "This set removes some unnecessary debugfs error handling, and checks
  that lowcomms workqueues are not NULL before destroying"

* tag 'dlm-5.3' of git://
  dlm: no need to check return value of debugfs_create functions
  dlm: check if workqueues are NULL before flushing/destroying

Linux/linux 23bbbf5net/9p trans_xen.c trans_virtio.c

Merge tag '9p-for-5.3' of git://

Pull 9p updates from Dominique Martinet:
 "Two small fixes to properly cleanup the 9p transports list if
  virtio/xen module initialization fail.

  9p might otherwise try to access memory from a module that failed to
  register got freed"

* tag '9p-for-5.3' of git://
  9p/xen: Add cleanup path in p9_trans_xen_init
  9p/virtio: Add cleanup path in p9_virtio_init

Linux/linux a641a88Documentation/filesystems f2fs.txt, fs/f2fs super.c file.c

Merge tag 'f2fs-for-5.3' of git://

Pull f2fs updates from Jaegeuk Kim:
 "In this round, we've introduced native swap file support which can
  exploit DIO, enhanced existing checkpoint=disable feature with
  additional mount option to tune the triggering condition, and allowed
  user to preallocate physical blocks in a pinned file which will be
  useful to avoid f2fs fragmentation in append-only workloads. In
  addition, we've fixed subtle quota corruption issue.

   - add swap file support which uses DIO
   - allocate blocks for pinned file
   - allow SSR and mount option to enhance checkpoint=disable
   - enhance IPU IOs
   - add more sanity checks such as memory boundary access

  Bug fixes:
   - quota corruption in very corner case of error-injected SPO case
   - fix root_reserved on remount and some wrong counts
   - add missing fsck flag

  Some patches were also introduced to clean up ambiguous i_flags and
  debugging messages codes"

    [23 lines not shown]

Linux/linux 4ce9d18fs/xfs xfs_itable.c xfs_iwalk.c

Merge tag 'xfs-5.3-merge-12' of git://

Pull xfs updates from Darrick Wong:
 "In this release there are a significant amounts of consolidations and
  cleanups in the log code; restructuring of the log to issue struct
  bios directly; new bulkstat ioctls to return v5 fs inode information
  (and fix all the padding problems of the old ioctl); the beginnings of
  multithreaded inode walks (e.g. quotacheck); and a reduction in memory
  usage in the online scrub code leading to reduced runtimes.

   - Refactor inode geometry calculation into a single structure instead
     of open-coding pieces everywhere.

   - Add online repair to build options.

   - Remove unnecessary function call flags and functions.

   - Claim maintainership of various loose xfs documentation and header

   - Use struct bio directly for log buffer IOs instead of struct

   - Reduce log item boilerplate code requirements.

    [70 lines not shown]

Linux/linux 5010fe9fs inode.c, fs/btrfs ioctl.c

Merge tag 'vfs-fix-ioctl-checking-3' of git://

Pull common SETFLAGS/FSSETXATTR parameter checking from Darrick Wong:
 "Here's a patch series that sets up common parameter checking functions
  for the FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctl implementations.

  The goal here is to reduce the amount of behaviorial variance between
  the filesystems where those ioctls originated (ext2 and XFS,
  respectively) and everybody else.

   - Standardize parameter checking for the SETFLAGS and FSSETXATTR
     ioctls (which were the file attribute setters for ext4 and xfs and
     have now been hoisted to the vfs)

   - Only allow the DAX flag to be set on files and directories"

* tag 'vfs-fix-ioctl-checking-3' of git://
  vfs: only allow FSSETXATTR to set DAX flag on files and dirs
  vfs: teach vfs_ioc_fssetxattr_check to check extent size hints
  vfs: teach vfs_ioc_fssetxattr_check to check project id info
  vfs: create a generic checking function for FS_IOC_FSSETXATTR
  vfs: create a generic checking and prep function for FS_IOC_SETFLAGS

Linux/linux 8487d82tools/testing/selftests/cgroup test_freezer.c, tools/testing/selftests/drivers/dma-buf config

Merge tag 'linux-kselftest-5.3-rc1' of 

Pull Kselftest updates from Shuah Khan:
 "This Kselftest update for Linux 5.3-rc1 consists of build failure
  fixes and minor code cleaning patch to remove duplicate headers"

* tag 'linux-kselftest-5.3-rc1' of 
  rseq/selftests: Fix Thumb mode build failure on arm32
  kselftests: cgroup: remove duplicated include from test_freezer.c
  selftests: timestamping: Fix SIOCGSTAMP undeclared build failure
  selftests: dma-buf: Adding kernel config fragment CONFIG_UDMABUF=y

Linux/linux 106f146arch/unicore32/configs unicore32_defconfig defconfig, scripts/kconfig confdata.c nconf.c

Merge tag 'kconfig-v5.3' of 

Pull Kconfig updates from Masahiro Yamada:

 - always require argument for --defconfig and remove the hard-coded
   arch/$(ARCH)/defconfig path

 - make arch/$(SRCARCH)/configs/defconfig the new default of defconfig

 - some code cleanups

* tag 'kconfig-v5.3' of 
  kconfig: remove meaningless if-conditional in conf_read()
  kconfig: Fix spelling of sym_is_changable
  unicore32: rename unicore32_defconfig to defconfig
  kconfig: make arch/*/configs/defconfig the default of KBUILD_DEFCONFIG
  kconfig: add static qualifier to expand_string()
  kconfig: require the argument of --defconfig
  kconfig: remove always false ifeq ($(KBUILD_DEFCONFIG,) conditional

Linux/linux 39ceda5. Makefile, include Kbuild

Merge tag 'kbuild-v5.3' of 

Pull Kbuild updates from Masahiro Yamada:

 - remove headers_{install,check}_all targets

 - remove unreasonable 'depends on !UML' from CONFIG_SAMPLES

 - re-implement 'make headers_install' more cleanly

 - add new header-test-y syntax to compile-test headers

 - compile-test exported headers to ensure they are compilable in

 - compile-test headers under include/ to ensure they are self-contained

 - remove -Waggregate-return, -Wno-uninitialized, -Wno-unused-value

 - add -Werror=unknown-warning-option for Clang

 - add 128-bit built-in types support to genksyms

    [38 lines not shown]

Linux/linux 5f26f11arch/arm64/include/asm ptrace.h, arch/mips/include/asm ptrace.h

Merge tag 'asm-generic-5.3' of 

Pull asm-generic updates from Arnd Bergmann:
 "The asm-generic changes for 5.3 consist of a cleanup series to remove
  ptrace.h from Christoph Hellwig, who explains:

    'asm-generic/ptrace.h is a little weird in that it doesn't actually
     implement any functionality, but it provided multiple layers of
     macros that just implement trivial inline functions. We implement
     those directly in the few architectures and be off with a much
     simpler design.'

  at at"

* tag 'asm-generic-5.3' of git://
  asm-generic: remove ptrace.h
  x86: don't use asm-generic/ptrace.h
  sh: don't use asm-generic/ptrace.h
  powerpc: don't use asm-generic/ptrace.h
  arm64: don't use asm-generic/ptrace.h

Linux/linux aabfea8arch/s390/include/uapi/asm dasd.h, drivers/s390/block dasd_eckd.c dasd.c

Merge tag 's390-5.3-2' of git://

Pull more s390 updates from Vasily Gorbik:

 - Fix integer overflow during stack frame unwind with invalid

 - Cleanup unused symbol export in zcrypt code.

 - Fix MIO addressing control activation in PCI code and expose its
   usage via sysfs.

 - Fix kernel image signature verification report presence detection.

 - Fix irq registration in vfio-ap code.

 - Add CPU measurement counters for newer machines.

 - Add base DASD thin provisioning support and code cleanups.

* tag 's390-5.3-2' of git:// (21 
  s390/unwind: avoid int overflow in outside_of_stack
  s390/zcrypt: remove the exporting of ap_query_configuration
  s390/pci: add mio_enabled attribute

    [18 lines not shown]

Linux/linux f32ae8adrivers/net/dsa qca8k.c

net: dsa: qca8k: replace legacy gpio include

This patch replaces the legacy bulk gpio.h include
with the proper gpio/consumer.h variant. This was
caught by the kbuild test robot that was running
into an error because of this.

For more information why linux/gpio.h is bad can be found in:
commit 56a46b6144e7 ("gpio: Clarify that <linux/gpio.h> is legacy")

Reported-by: kbuild test robot <lkp at>
Fixes: a653f2f538f9 ("net: dsa: qca8k: introduce reset via gpio feature")
Signed-off-by: Christian Lamparter <chunkeey at>
Reviewed-by: Vivien Didelot <vivien.didelot at>
Reviewed-by: Florian Fainelli <f.fainelli at>
Signed-off-by: David S. Miller <davem at>

Linux/linux 7181febarch/nios2 Kconfig.debug, arch/nios2/configs 3c120_defconfig 10m50_defconfig

Merge tag 'nios2-v5.3-rc1' of git://

Pull arch/nios2 updates from Ley Foon Tan.

* tag 'nios2-v5.3-rc1' of git://
  nios2: configs: Remove useless UEVENT_HELPER_PATH
  nios2: remove pointless second entry for CONFIG_TRACE_IRQFLAGS_SUPPORT

Linux/linux 56170badrivers/net/ethernet/hisilicon hisi_femac.c hix5hd2_gmac.c

net: hisilicon: Use devm_platform_ioremap_resource

Use devm_platform_ioremap_resource instead of
devm_ioremap_resource. Make the code simpler.

Signed-off-by: Jiangfeng Xiao <xiaojiangfeng at>
Signed-off-by: David S. Miller <davem at>

Linux/linux 752c2eadrivers/net/ethernet/chelsio/cxgb4 cudbg_lib.c

cxgb4: reduce kernel stack usage in cudbg_collect_mem_region()

The cudbg_collect_mem_region() and cudbg_read_fw_mem() both use several
hundred kilobytes of kernel stack space. One gets inlined into the other,
which causes the stack usage to be combined beyond the warning limit
when building with clang:

drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:1057:12: error: stack frame size of 1244 
bytes in function 'cudbg_collect_mem_region' [-Werror,-Wframe-larger-than=]

Restructuring cudbg_collect_mem_region() lets clang do the same
optimization that gcc does and reuse the stack slots as it can
see that the large variables are never used together.

A better fix might be to avoid using cudbg_meminfo on the stack
altogether, but that requires a larger rewrite.

Fixes: a1c69520f785 ("cxgb4: collect MC memory dump")
Signed-off-by: Arnd Bergmann <arnd at>
Signed-off-by: David S. Miller <davem at>

Linux/linux 39d7530arch/x86/kvm cpuid.c x86.c, arch/x86/kvm/vmx nested.c vmx.c

Merge tag 'for-linus' of git://

Pull KVM updates from Paolo Bonzini:
   - support for chained PMU counters in guests
   - improved SError handling
   - handle Neoverse N1 erratum #1349291
   - allow side-channel mitigation status to be migrated
   - standardise most AArch64 system register accesses to msr_s/mrs_s
   - fix host MPIDR corruption on 32bit
   - selftests ckleanups

   - PMU event {white,black}listing
   - ability for the guest to disable host-side interrupt polling
   - fixes for enlightened VMCS (Hyper-V pv nested virtualization),
   - new hypercall to yield to IPI target
   - support for passing cstate MSRs through to the guest
   - lots of cleanups and optimizations

   - Some txt->rST conversions for the documentation"

* tag 'for-linus' of git:// (128 commits)
  Documentation: virtual: Add toctree hooks

    [20 lines not shown]

Linux/linux d12cffenet/tipc name_distr.c

tipc: ensure head->lock is initialised

tipc_named_node_up() creates a skb list. It passes the list to
tipc_node_xmit() which has some code paths that can call
skb_queue_purge() which relies on the list->lock being initialised.

The spin_lock is only needed if the messages end up on the receive path
but when the list is created in tipc_named_node_up() we don't
necessarily know if it is going to end up there.

Once all the skb list users are updated in tipc it will then be possible
to update them to use the unlocked variants of the skb list functions
and initialise the lock when we know the message will follow the receive

Signed-off-by: Chris Packham <chris.packham at>
Acked-by: Jon Maloy <jon.maloy at>
Signed-off-by: David S. Miller <davem at>

Linux/linux 100c404tools/testing/selftests/tc-testing/tc-tests/actions skbedit.json

tc-tests: updated skbedit tests

- Added mask upper bound test case
- Added mask validation test case
- Added mask replacement case

Signed-off-by: Roman Mashak <mrv at>
Signed-off-by: David S. Miller <davem at>

Linux/linux fd262a6drivers/net/ethernet/netronome/nfp/flower offload.c

nfp: flower: fix ethernet check on match fields

NFP firmware does not explicitly match on an ethernet type field. Rather,
each rule has a bitmask of match fields that can be used to infer the
ethernet type.

Currently, if a flower rule contains an unknown ethernet type, a check is
carried out for matches on other fields of the packet. If matches on
layer 3 or 4 are found, then the offload is rejected as firmware will not
be able to extract these fields from a packet with an ethernet type it
does not currently understand.

However, if a rule contains an unknown ethernet type without any L3 (or
above) matches then this will effectively be offloaded as a rule with a
wildcarded ethertype. This can lead to misclassifications on the firmware.

Fix this issue by rejecting all flower rules that specify a match on an
unknown ethernet type.

Further ensure correct offloads by moving the 'L3 and above' check to any
rule that does not specify an ethernet type and rejecting rules with
further matches. This means that we can still offload rules with a
wildcarded ethertype if they only match on L2 fields but will prevent
rules which match on further fields that we cannot be sure if the firmware
will be able to extract.

    [5 lines not shown]