Commit Graph

1000830 Commits

Author SHA1 Message Date
Roman Kiryanov
5ab47c085c ANDROID: Revert "net: wireless: Add module_param(mac_prefix) to mac80211_hwsim"
This reverts commit 21afbdd808.

Reason for revert: This was a workaround we don't need anymore

Bug: 150388981
Change-Id: Ia9fb3dd9c4ac7ff819e16f2ebe2f21e8b31bad30
Signed-off-by: Roman Kiryanov <rkir@google.com>
2021-04-22 19:07:26 +00:00
Chris Ye
93912b7793 ANDROID: GKI: enable hid-playstation driver/rumble
To enable DualSense driver, i.e. hid-playstation, we need to set
CONFIG_HID_PLAYSTATION to "y". To enable Dualsense rumble, we need to
set CONFIG_PLAYSTATION_FF to "y".

Bug: 167947264

Signed-off-by: Chris Ye <lzye@google.com>
Change-Id: I376b3e2c1a155632ec52f110cff8ac7a3d9a6191
2021-04-22 18:08:51 +00:00
Paul Lawrence
c9a0b73d25 ANDROID: Incremental fs: Add INCFS_IOC_GET_LAST_READ_ERROR
Bug: 184291759
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: If46e91f9c992337d53970573c238be965187761e
2021-04-22 16:33:00 +00:00
Greg Kroah-Hartman
8f58eda4de Merge 7af0814097 ("Revert "gcov: clang: fix clang-11+ build"") into android-mainline
Upstream fix for build breakages of 5.12-rc8 on clang builds

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1027544d1cdd7f01dd1b9f08af2113c0662d913a
2021-04-22 11:51:21 +02:00
Greg Kroah-Hartman
184b79e124 Merge tag 'v5.12-rc8' into android-mainline
Linux 5.12-rc8

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I15026b050f0a6a798e2f645520a95da10a2f3536
2021-04-22 11:49:06 +02:00
Greg Kroah-Hartman
67a1678948 Merge tag 'v5.12-rc7' into android-mainline
Linux 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idbdb502acb1acbb5a6f076084f6a4782e300cc50
2021-04-22 11:18:05 +02:00
Greg Kroah-Hartman
5ae3c4b3f0 Revert "bpf: program: Refuse non-O_RDWR flags in BPF_OBJ_GET"
This reverts commit d37300ed18.

Looks like it breaks vts-core/gce/vts-presubmit-kernel-kernel-triggered
on kernel_virt_x86_64 on aosp_kernel-common-android-mainline

Will do more digging later, revert it for now.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ide1562bce106d02f4058874f5696fa0662a85731
2021-04-22 09:48:46 +02:00
Greg Kroah-Hartman
cb974ba923 Merge ca7a83e248 ("libbpf: Only create rx and tx XDP rings when necessary") into android-mainline
Bisection steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2594b515cee99b15379ad91cfad0907cdfebfa8b
2021-04-22 07:15:14 +02:00
Greg Kroah-Hartman
ebc9179e4b Merge 6032ebb54c ("libbpf: Fix bail out from 'ringbuf_process_ring()' on error") into android-mainline
Bisection steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If55ef050c52026b5fc19d397a9b0b4d0d4aed00c
2021-04-22 07:14:41 +02:00
Paul Lawrence
c52d623f04 ANDROID: Incremental fs: Fix INCFS_MAGIC_NUMBER casts
Sparse complains about casting a five byte number to a ulong on 32-bit
platorms. Fix by anding the constant with ULONG_MAX

Bug: 186015158
Test: incfs_test passes, sparse reports no warnings on 32 & 64 bit builds
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ic83e03626b7f290370d75b3aaba187b8392fb344
2021-04-21 20:26:00 +00:00
Jone Chou
440b6d482f ANDROID: kernel: clear debug_kinfo precisely
Clear debug_kinfo itself instead of whole reserved memory

Bug: 176088154
Bug: 175726952
Bug: 185982588
Signed-off-by: Jone Chou <jonechou@google.com>
Change-Id: Ic322f6289b508a51c19cad17a2e264974d0b3e0e
2021-04-22 00:51:10 +08:00
Paul Lawrence
bfee974e81 ANDROID: Incremental fs: Add status to sysfs
Adding seven sysfs entries per mount:

reads_failed_timed_out
reads_failed_hash_verification
reads_failed_other
reads_delayed_pending
reads_delayed_pending_us
reads_delayed_min
reads_delayed_min_us

to allow for status monitoring from userland

Change-Id: I50677511c2af4778ba0c574bb80323f31425b4d0
Test: incfs_test passes
Bug: 160634343
Bug: 184291759
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2021-04-21 14:35:45 +00:00
Greg Kroah-Hartman
bd3046c3c6 Merge 6f7f657f24 ("net: ieee802154: nl-mac: fix check on panid") into android-mainline
Bisection steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1b36ea238a6b09af286206e4eda60ec0d5ba7e94
2021-04-21 08:43:19 +02:00
Greg Kroah-Hartman
33a1ffbaf8 Merge c3214de929 ("i40e: Fix display statistics for veb_tc") into android-mainline
Bisection steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If3dbfac267eab01b2df6aca65c56096b80d2f651
2021-04-20 13:19:14 +02:00
Linus Torvalds
7af0814097 Revert "gcov: clang: fix clang-11+ build"
This reverts commit 04c53de57c.

Nathan Chancellor points out that it should not have been merged into
mainline by itself. It was a fix for "gcov: use kvmalloc()", which is
still in -mm/-next. Merging it alone has broken the build.

Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/2384465683?check_suite_focus=true
Reported-by: Nathan Chancellor <nathan@kernel.org>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-19 15:08:49 -07:00
Nick Desaulniers
7ec815f5df ANDROID: clang: update to 12.0.5
Bug: 185804542
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: If3d0c122472d8979b326d8a6fece30d8b2af962a
2021-04-19 19:38:54 +00:00
Greg Kroah-Hartman
32f323bc4d Merge 3b9784350f ("Merge tag 'io_uring-5.12-2021-04-09' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by Greg Kroah-Hartman <gregkh@google.com>

Change-Id: I43699fcf2d84ca863e3c5cd406c69198c0676096
2021-04-19 10:52:20 +02:00
Greg Kroah-Hartman
72989f28ac Merge a2521822bd ("Merge tag 'devicetree-fixes-for-5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by Greg Kroah-Hartman <gregkh@google.com>

Change-Id: I07c98bd742572ef95cd1f2b08417b03e376ee780
2021-04-19 10:52:20 +02:00
Greg Kroah-Hartman
c4c6deb418 Merge a85f165e1f ("Merge tag 'drm-fixes-2021-04-10' of git://anongit.freedesktop.org/drm/drm") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by Greg Kroah-Hartman <gregkh@google.com>

Change-Id: I86e8380de6b93c9aa5106339f46657bf198321a0
2021-04-19 10:52:19 +02:00
Greg Kroah-Hartman
44ef0c2e4b Merge 60144b23c9 ("Merge tag 'selinux-pr-20210409' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by Greg Kroah-Hartman <gregkh@google.com>

Change-Id: Ia4b9f3dfdd7f6b6a93b5348fe6fc343248b4b0b2
2021-04-19 10:52:19 +02:00
Greg Kroah-Hartman
0aa448d00e Merge 189fefc7a4 ("Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by Greg Kroah-Hartman <gregkh@google.com>

Change-Id: Ie85ea5e3c0cfe8d6ad87605bf0db4e5d8cfd4822
2021-04-19 10:52:18 +02:00
Greg Kroah-Hartman
e0e75381a9 Merge 3766fcf5d3 ("Merge tag 'rproc-v5.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I302e2016323ce85121734080a023642763058009
2021-04-19 10:41:44 +02:00
Greg Kroah-Hartman
0a449035f4 Merge 0b76088799 ("Merge tag 'for-linus-5.12b-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4f745a7d8ee0ea79e22183002dbfd963f7d98375
2021-04-19 10:39:49 +02:00
Greg Kroah-Hartman
0e89e162ad Merge ccd6c35c72 ("Merge tag 'acpi-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8bf01b27a68a38a8d798bd9adda05fbfab5ae729
2021-04-19 10:37:49 +02:00
Greg Kroah-Hartman
36828bd1b2 Merge 17e7124aad ("Merge tag '5.12-rc6-smb3' of git://git.samba.org/sfrench/cifs-2.6") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idc7308c02ab6cc94b365c8df35aa59891278e0b4
2021-04-19 10:34:16 +02:00
Linus Torvalds
bf05bf16c7 Linux 5.12-rc8 2021-04-18 14:45:32 -07:00
Linus Torvalds
5ffe04ccd6 Merge tag 'arm-fixes-5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC fixes from Arnd Bergmann:
 "Another smaller set of fixes for three of the Arm platforms:

  TI OMAP:

     Fix swapped mmc device order also for omap3 that got changed with
     the recent PROBE_PREFER_ASYNCHRONOUS changes. While eventually the
     aliases should be board specific, all the mmc device instances are
     all there in the SoC, and we do probe them by default so that PM
     runtime can idle the devices if left enabled from the bootloader.

  Qualcomm Snapdragon:

     This bypasses the recently introduced interconnect handling in
     the GENI (serial engine) driver when running off ACPI, as this
     causes the GENI probe to fail and the Lenovo Yoga C630 to boot
     without keyboard and touchpad.

  Allwinner:

     One 32kHz clock fix for the beelink gs1, a CD polarity fix for the
     SoPine, some MAINTAINERS maintainance, and a clk / reset switch to
     our headers"

* tag 'arm-fixes-5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  arm64: dts: allwinner: h6: beelink-gs1: Remove ext. 32 kHz osc reference
  MAINTAINERS: Match on allwinner keyword
  MAINTAINERS: Add our new mailing-list
  arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems
  arm64: dts: allwinner: h6: Switch to macros for RSB clock/reset indices
  ARM: OMAP2+: Fix uninitialized sr_inst
  ARM: dts: Fix swapped mmc order for omap3
  ARM: OMAP2+: Fix warning for omap_init_time_of()
  soc: qcom: geni: shield geni_icc_get() for ACPI boot
2021-04-18 13:23:26 -07:00
Linus Torvalds
f5ce0466dc Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:

 - Halve maximum number of CPUs if DEBUG_KMAP_LOCAL is enabled

 - Fix conversion for_each_membock() to for_each_mem_range()

 - Fix footbridge PCI mapping

 - Avoid uprobes hooking on thumb instructions

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 9071/1: uprobes: Don't hook on thumb instructions
  ARM: footbridge: fix PCI interrupt mapping
  ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range()
  ARM: 9063/1: mm: reduce maximum number of CPUs if DEBUG_KMAP_LOCAL is enabled
2021-04-18 11:55:31 -07:00
Fredrik Strupe
d2f7eca60b ARM: 9071/1: uprobes: Don't hook on thumb instructions
Since uprobes is not supported for thumb, check that the thumb bit is
not set when matching the uprobes instruction hooks.

The Arm UDF instructions used for uprobes triggering
(UPROBE_SWBP_ARM_INSN and UPROBE_SS_ARM_INSN) coincidentally share the
same encoding as a pair of unallocated 32-bit thumb instructions (not
UDF) when the condition code is 0b1111 (0xf). This in effect makes it
possible to trigger the uprobes functionality from thumb, and at that
using two unallocated instructions which are not permanently undefined.

Signed-off-by: Fredrik Strupe <fredrik@strupe.net>
Cc: stable@vger.kernel.org
Fixes: c7edc9e326 ("ARM: add uprobes support")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2021-04-18 19:14:45 +01:00
Greg Kroah-Hartman
aafb306e2a Merge 4fa56ad0d1 ("Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I96f60597a6ea639868a2ebe7d43765b82630bd4d
2021-04-18 15:21:27 +02:00
Greg Kroah-Hartman
61d8d6c40d Merge e0a472fffe ("Merge tag 'sound-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic42a738b12fd24a07ee69b247c59331632343238
2021-04-18 15:20:08 +02:00
Greg Kroah-Hartman
51586c6a6b Merge d381b05e86 ("Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7c94b4ef3ad349373d55fe360c83d6079531a74c
2021-04-18 15:19:02 +02:00
Greg Kroah-Hartman
f5b32d823d Merge 4ea51e0e37 ("Merge tag 'for-linus-2021-04-08' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3e01d8950c38d7ac8a734159c288daaa92966732
2021-04-18 15:18:16 +02:00
Greg Kroah-Hartman
8581d64e45 Merge 035d80695f ("Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3cd7beb6b194b27eea8150334a61470007be61b2
2021-04-18 15:17:16 +02:00
Greg Kroah-Hartman
4adef261ac Merge 454859c552 ("Merge tag 'arc-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iebe0a4f28bb8b1794a526c29c4dfb3edd8905a6e
2021-04-18 15:16:20 +02:00
Greg Kroah-Hartman
261c19f15a Merge 3a22981230 ("Merge tag 'arm-fixes-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I195f167cc8dbc2b650042342796ee69a176dc7c9
2021-04-18 15:15:14 +02:00
Greg Kroah-Hartman
c613b0a6ba Merge dbaa5d1c25 ("Merge branch 'parisc-5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9e32448117e299253703400e1c1dd2bad48bee5a
2021-04-18 15:14:32 +02:00
Greg Kroah-Hartman
8b1455531f Merge 5ba091db93 ("Merge tag 'platform-drivers-x86-v5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib49d869702643e6575d8624a8d00e4c016cd04ae
2021-04-18 15:13:06 +02:00
Greg Kroah-Hartman
aca56965ab Merge e3bb2f4f96 ("Merge tag 'regulator-fix-v5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator") into android-mainline
Steps on the way to 5.12-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I660b6221f2c87cad8487a2fa14db52fc7784f05f
2021-04-18 15:12:05 +02:00
Linus Torvalds
c98ff1d013 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
 "Two fixes: the libsas fix is for a problem that occurs when trying to
  change the cache type of an ATA device and the libiscsi one is a
  regression fix from this merge window"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: libsas: Reset num_scatter if libata marks qc as NODATA
  scsi: iscsi: Fix iSCSI cls conn state
2021-04-17 20:25:33 -07:00
Linus Torvalds
aba5970c4d Merge tag 'drm-fixes-2021-04-18' of git://anongit.freedesktop.org/drm/drm
Pull vmwgfx fixes from Dave Airlie:
 "This contains two regression fixes for vmwgfx, one due to a refactor
  which meant locks were being used before initialisation, and the other
  in fixing up some warnings from the core when destroying pinned
  buffers.

  vmwgfx:

   - fixed unpinning before destruction

   - lockdep init reordering"

* tag 'drm-fixes-2021-04-18' of git://anongit.freedesktop.org/drm/drm:
  drm/vmwgfx: Make sure bo's are unpinned before putting them back
  drm/vmwgfx: Fix the lockdep breakage
  drm/vmwgfx: Make sure we unpin no longer needed buffers
2021-04-17 20:00:36 -07:00
Dave Airlie
796b556cbf Merge tag 'vmwgfx-fixes-2021-04-14' of gitlab.freedesktop.org:zack/vmwgfx into drm-fixes
vmwgfx fixes for regressions in 5.12

Here's a set of 3 patches fixing ugly regressions
in the vmwgfx driver. We broke lock initialization
code and ended up using spinlocks before initialization
breaking lockdep.
Also there was a bit of a fallout from drm changes
which made the core validate that unreferenced buffers
have been unpinned. vmwgfx pinning code predates a lot
of the core drm and wasn't written to account for those
semantics. Fortunately changes required to fix it
are not too intrusive.
The changes have been validated by our internal ci.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f7add0a2-162e-3bd2-b1be-344a94f2acbf@vmware.com
2021-04-18 09:27:00 +10:00
Linus Torvalds
194cf48256 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fix from Wolfram Sang:
 "One more driver bugfix for I2C"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: mv64xxx: Fix random system lock caused by runtime PM
2021-04-17 12:01:51 -07:00
Linus Torvalds
0c93ac6940 readdir: make sure to verify directory entry for legacy interfaces too
This does the directory entry name verification for the legacy
"fillonedir" (and compat) interface that goes all the way back to the
dark ages before we had a proper dirent, and the readdir() system call
returned just a single entry at a time.

Nobody should use this interface unless you still have binaries from
1991, but let's do it right.

This came up during discussions about unsafe_copy_to_user() and proper
checking of all the inputs to it, as the networking layer is looking to
use it in a few new places.  So let's make sure the _old_ users do it
all right and proper, before we add new ones.

See also commit 8a23eb804c ("Make filldir[64]() verify the directory
entry filename is valid") which did the proper modern interfaces that
people actually use. It had a note:

    Note that I didn't bother adding the checks to any legacy interfaces
    that nobody uses.

which this now corrects.  Note that we really don't care about POSIX and
the presense of '/' in a directory entry, but verify_dirent_name() also
ends up doing the proper name length verification which is what the
input checking discussion was about.

[ Another option would be to remove the support for this particular very
  old interface: any binaries that use it are likely a.out binaries, and
  they will no longer run anyway since we removed a.out binftm support
  in commit eac6165570 ("x86: Deprecate a.out support").

  But I'm not sure which came first: getdents() or ELF support, so let's
  pretend somebody might still have a working binary that uses the
  legacy readdir() case.. ]

Link: https://lore.kernel.org/lkml/CAHk-=wjbvzCAhAtvG0d81W5o0-KT5PPTHhfJ5ieDFq+bGtgOYg@mail.gmail.com/
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-17 11:39:49 -07:00
Linus Torvalds
88a5af9439 Merge tag 'net-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
 "Networking fixes for 5.12-rc8, including fixes from netfilter, and
  bpf. BPF verifier changes stand out, otherwise things have slowed
  down.

  Current release - regressions:

   - gro: ensure frag0 meets IP header alignment

   - Revert "net: stmmac: re-init rx buffers when mac resume back"

   - ethernet: macb: fix the restore of cmp registers

  Previous releases - regressions:

   - ixgbe: Fix NULL pointer dereference in ethtool loopback test

   - ixgbe: fix unbalanced device enable/disable in suspend/resume

   - phy: marvell: fix detection of PHY on Topaz switches

   - make tcp_allowed_congestion_control readonly in non-init netns

   - xen-netback: Check for hotplug-status existence before watching

  Previous releases - always broken:

   - bpf: mitigate a speculative oob read of up to map value size by
     tightening the masking window

   - sctp: fix race condition in sctp_destroy_sock

   - sit, ip6_tunnel: Unregister catch-all devices

   - netfilter: nftables: clone set element expression template

   - netfilter: flowtable: fix NAT IPv6 offload mangling

   - net: geneve: check skb is large enough for IPv4/IPv6 header

   - netlink: don't call ->netlink_bind with table lock held"

* tag 'net-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits)
  netlink: don't call ->netlink_bind with table lock held
  MAINTAINERS: update my email
  bpf: Update selftests to reflect new error states
  bpf: Tighten speculative pointer arithmetic mask
  bpf: Move sanitize_val_alu out of op switch
  bpf: Refactor and streamline bounds check into helper
  bpf: Improve verifier error messages for users
  bpf: Rework ptr_limit into alu_limit and add common error path
  bpf: Ensure off_reg has no mixed signed bounds for all types
  bpf: Move off_reg into sanitize_ptr_alu
  bpf: Use correct permission flag for mixed signed bounds arithmetic
  ch_ktls: do not send snd_una update to TCB in middle
  ch_ktls: tcb close causes tls connection failure
  ch_ktls: fix device connection close
  ch_ktls: Fix kernel panic
  i40e: fix the panic when running bpf in xdpdrv mode
  net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta
  net/mlx5e: Fix setting of RS FEC mode
  net/mlx5: Fix setting of devlink traps in switchdev mode
  Revert "net: stmmac: re-init rx buffers when mac resume back"
  ...
2021-04-17 09:57:15 -07:00
Linus Torvalds
bdfd99e6d6 Merge tag 'libnvdimm-fixes-for-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams:
 "The largest change is for a regression that landed during -rc1 for
  block-device read-only handling. Vaibhav found a new use for the
  ability (originally introduced by virtio_pmem) to call back to the
  platform to flush data, but also found an original bug in that
  implementation. Lastly, Arnd cleans up some compile warnings in dax.

  This has all appeared in -next with no reported issues.

  Summary:

   - Fix a regression of read-only handling in the pmem driver

   - Fix a compile warning

   - Fix support for platform cache flush commands on powerpc/papr"

* tag 'libnvdimm-fixes-for-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC
  libnvdimm: Notify disk drivers to revalidate region read-only
  dax: avoid -Wempty-body warnings
2021-04-17 09:40:44 -07:00
Linus Torvalds
7c22677407 Merge tag 'cxl-fixes-for-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
Pull CXL memory class fixes from Dan Williams:
 "A collection of fixes for the CXL memory class driver introduced in
  this release cycle.

  The driver was primarily developed on a work-in-progress QEMU
  emulation of the interface and we have since found a couple places
  where it hid spec compliance bugs in the driver, or had a spec
  implementation bug itself.

  The biggest change here is replacing a percpu_ref with an rwsem to
  cleanup a couple bugs in the error unwind path during ioctl device
  init. Lastly there were some minor cleanups to not export the
  power-management sysfs-ABI for the ioctl device, use the proper sysfs
  helper for emitting values, and prevent subtle bugs as new
  administration commands are added to the supported list.

  The bulk of it has appeared in -next save for the top commit which was
  found today and validated on a fixed-up QEMU model.

  Summary:

   - Fix support for CXL memory devices with registers offset from the
     BAR base.

   - Fix the reporting of device capacity.

   - Fix the driver commands list definition to be disconnected from the
     UAPI command list.

   - Replace percpu_ref with rwsem to fix initialization error path.

   - Fix leaks in the driver initialization error path.

   - Drop the power/ directory from CXL device sysfs.

   - Use the recommended sysfs helper for attribute 'show'
     implementations"

* tag 'cxl-fixes-for-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
  cxl/mem: Fix memory device capacity probing
  cxl/mem: Fix register block offset calculation
  cxl/mem: Force array size of mem_commands[] to CXL_MEM_COMMAND_ID_MAX
  cxl/mem: Disable cxl device power management
  cxl/mem: Do not rely on device_add() side effects for dev_set_name() failures
  cxl/mem: Fix synchronization mechanism for device removal vs ioctl operations
  cxl/mem: Use sysfs_emit() for attribute show routines
2021-04-17 09:30:58 -07:00
Linus Torvalds
fdb5d6cab6 Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
 "12 patches.

  Subsystems affected by this patch series: mm (documentation, kasan,
  and pagemap), csky, ia64, gcov, and lib"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  lib: remove "expecting prototype" kernel-doc warnings
  gcov: clang: fix clang-11+ build
  mm: ptdump: fix build failure
  mm/mapping_dirty_helpers: guard hugepage pud's usage
  ia64: tools: remove duplicate definition of ia64_mf() on ia64
  ia64: tools: remove inclusion of ia64-specific version of errno.h header
  ia64: fix discontig.c section mismatches
  ia64: remove duplicate entries in generic_defconfig
  csky: change a Kconfig symbol name to fix e1000 build error
  kasan: remove redundant config option
  kasan: fix hwasan build for gcc
  mm: eliminate "expecting prototype" kernel-doc warnings
2021-04-17 08:38:23 -07:00
Dan Williams
fae8817ae8 cxl/mem: Fix memory device capacity probing
The CXL Identify Memory Device output payload emits capacity in 256MB
units. The driver is treating the capacity field as bytes. This was
missed because QEMU reports bytes when it should report bytes / 256MB.

Fixes: 8adaf747c9 ("cxl/mem: Find device capabilities")
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Cc: Ben Widawsky <ben.widawsky@intel.com>
Link: https://lore.kernel.org/r/161862021044.3259705.7008520073059739760.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2021-04-16 18:21:56 -07:00
Florian Westphal
f2764bd4f6 netlink: don't call ->netlink_bind with table lock held
When I added support to allow generic netlink multicast groups to be
restricted to subscribers with CAP_NET_ADMIN I was unaware that a
genl_bind implementation already existed in the past.

It was reverted due to ABBA deadlock:

1. ->netlink_bind gets called with the table lock held.
2. genetlink bind callback is invoked, it grabs the genl lock.

But when a new genl subsystem is (un)registered, these two locks are
taken in reverse order.

One solution would be to revert again and add a comment in genl
referring 1e82a62fec, "genetlink: remove genl_bind").

This would need a second change in mptcp to not expose the raw token
value anymore, e.g.  by hashing the token with a secret key so userspace
can still associate subflow events with the correct mptcp connection.

However, Paolo Abeni reminded me to double-check why the netlink table is
locked in the first place.

I can't find one.  netlink_bind() is already called without this lock
when userspace joins a group via NETLINK_ADD_MEMBERSHIP setsockopt.
Same holds for the netlink_unbind operation.

Digging through the history, commit f773608026
("netlink: access nlk groups safely in netlink bind and getname")
expanded the lock scope.

commit 3a20773bee ("net: netlink: cap max groups which will be considered in netlink_bind()")
... removed the nlk->ngroups access that the lock scope
extension was all about.

Reduce the lock scope again and always call ->netlink_bind without
the table lock.

The Fixes tag should be vs. the patch mentioned in the link below,
but that one got squash-merged into the patch that came earlier in the
series.

Fixes: 4d54cc3211 ("mptcp: avoid lock_fast usage in accept path")
Link: https://lore.kernel.org/mptcp/20210213000001.379332-8-mathew.j.martineau@linux.intel.com/T/#u
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Xin Long <lucien.xin@gmail.com>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Sean Tranchetti <stranche@codeaurora.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-04-16 17:01:04 -07:00