Commit graph

1106634 commits

Author SHA1 Message Date
Dan Carpenter
e87197fbd1 drm/i915/gvt: IS_ERR() vs NULL bug in intel_gvt_update_reg_whitelist()
The shmem_pin_map() function returns NULL, it doesn't return error
pointers.

Fixes: 97ea656521 ("drm/i915/gvt: Parse default state to update reg whitelist")
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/Ysftoia2BPUyqVcD@kili
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2022-07-11 13:05:05 +08:00
Anup Patel
be82abe6a7 RISC-V: KVM: Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
The kvm_riscv_check_vcpu_requests() is called with SRCU read lock held
and for KVM_REQ_SLEEP request it will block the VCPU without releasing
SRCU read lock. This causes KVM ioctls (such as KVM_IOEVENTFD) from
other VCPUs of the same Guest/VM to hang/deadlock if there is any
synchronize_srcu() or synchronize_srcu_expedited() in the path.

To fix the above in kvm_riscv_check_vcpu_requests(), we should do SRCU
read unlock before blocking the VCPU and do SRCU read lock after VCPU
wakeup.

Fixes: cce69aff68 ("RISC-V: KVM: Implement VCPU interrupts and requests handling")
Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
2022-07-11 09:36:32 +05:30
Alexandre Ghiti
88573389aa riscv: Fix missing PAGE_PFN_MASK
There are a bunch of functions that use the PFN from a page table entry
that end up with the svpbmt upper-bits because they are missing the newly
introduced PAGE_PFN_MASK which leads to wrong addresses conversions and
then crash: fix this by adding this mask.

Fixes: 100631b48d ("riscv: Fix accessing pfn bits in PTEs for non-32bit variants")
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
2022-07-11 09:33:35 +05:30
Linus Torvalds
32346491dd Linux 5.19-rc6 2022-07-10 14:40:51 -07:00
Linus Torvalds
24f4b40ec2 Merge branch 'hot-fixes' (fixes for rc6)
This is a collection of three fixes for small annoyances.

Two of these are already pending in other trees, but I really don't want
to release another -rc with these issues pending, so I picked up the
patches for these things directly.  We'll end up with duplicate commits
eventually, I prefer that over having these issues pending.

The third one is just me getting rid of another BUG_ON() just because it
was reported and I dislike those things so much.

* merge 'hot-fixes' branch:
  ida: don't use BUG_ON() for debugging
  drm/aperture: Run fbdev removal before internal helpers
  ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
2022-07-10 14:26:49 -07:00
Linus Torvalds
fc82bbf4de ida: don't use BUG_ON() for debugging
This is another old BUG_ON() that just shouldn't exist (see also commit
a382f8fee4: "signal handling: don't use BUG_ON() for debugging").

In fact, as Matthew Wilcox points out, this condition shouldn't really
even result in a warning, since a negative id allocation result is just
a normal allocation failure:

  "I wonder if we should even warn here -- sure, the caller is trying to
   free something that wasn't allocated, but we don't warn for
   kfree(NULL)"

and goes on to point out how that current error check is only causing
people to unnecessarily do their own index range checking before freeing
it.

This was noted by Itay Iellin, because the bluetooth HCI socket cookie
code does *not* do that range checking, and ends up just freeing the
error case too, triggering the BUG_ON().

The HCI code requires CAP_NET_RAW, and seems to just result in an ugly
splat, but there really is no reason to BUG_ON() here, and we have
generally striven for allocation models where it's always ok to just do

    free(alloc());

even if the allocation were to fail for some random reason (usually
obviously that "random" reason being some resource limit).

Fixes: 88eca0207c ("ida: simplified functions for id allocation")
Reported-by: Itay Iellin <ieitayie@gmail.com>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-07-10 13:55:49 -07:00
Linus Torvalds
952c53cd35 dmaengine fixes for v5.19
Core:
  - Revert verification of DMA_INTERRUPT capability as that was incorrect
 
 Bunch of driver fixes for:
  - ti: refcount and put_device leak
  - qcom_bam: runtime pm overflow
  - idxd: force wq context cleanup and call idxd_enable_system_pasid() on
    success
  - dw-axi-dmac: RMW on channel suspend register
  - imx-sdma: restart cyclic channel when enabled
  - at_xdma: error handling for at_xdmac_alloc_desc
  - pl330: lockdep warning
  - lgm: error handling path in probe
  - allwinner: Fix min/max typo in binding
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmLLB+oACgkQfBQHDyUj
 g0c9URAAgNrLzEJFBFRkZW3gKw0PH66a7HZjV88roGI5d9fAZ67O8A21Sn3VKQCs
 0dUOxPWT6lAMt1kPz/AOug80oiEo8dxaf/eai45eP2kyaLFEaHvulHUGQv4ZrRRq
 YaWDoLi5iXly3LYF/skMoXY4XQrbGw6mjgGbwzfn27JqiG9pL7aPx3QAHBYtHf//
 w7O/u9AUaJmSHd7FviKJ9vcun1P4dCUMt7dy2Qhctv6+CBzUmBEMFFMc7FA7ORtP
 kQz2qk5wErG5hQfwJeLPrgKOwdfbEol7crZlyRmi7DwbewA8R9iU/ms7e7498Nhi
 Lh6G+Q9BnTeM+hwRql8Eok+8Oc56xIseWdRPrXiW6EDOpgWSNhuRI7jy0iICs4Wl
 fz9ogDjr3buQI5DrB967IuxD+lD8p80J1jMxaunWrCB5y4MxRJd7n2BuYhjAngeD
 Fsb4NQItHThTiVy86SPFhNfxQbzGOJmWyrerGU+0g3Mnxh8FdGIS5gbk+IfcBcgo
 6Ef7qbypq85DAOkmNx2ZY3E3H2amatLFvJ1cBdtxZp5Nj+rvV+dqvXXFzIped8xP
 GS96uLfWZZKgG4PwyZoK8/fOmU/vxrNsPmHXHpMt9BEa5rNmB8VDB6Txrn3pJywY
 Tm0KK5tgxXYpdUmTL7cDeslJZ4r51LlXUuAbf4wPZr/cEScQwJc=
 =knzk
 -----END PGP SIGNATURE-----

Merge tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:
 "One core fix for DMA_INTERRUPT and rest driver fixes.

  Core:

   - Revert verification of DMA_INTERRUPT capability as that was
     incorrect

  Bunch of driver fixes for:

   - ti: refcount and put_device leak

   - qcom_bam: runtime pm overflow

   - idxd: force wq context cleanup and call idxd_enable_system_pasid()
     on success

   - dw-axi-dmac: RMW on channel suspend register

   - imx-sdma: restart cyclic channel when enabled

   - at_xdma: error handling for at_xdmac_alloc_desc

   - pl330: lockdep warning

   - lgm: error handling path in probe

   - allwinner: Fix min/max typo in binding"

* tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dt-bindings: dma: allwinner,sun50i-a64-dma: Fix min/max typo
  dmaengine: lgm: Fix an error handling path in intel_ldma_probe()
  dmaengine: pl330: Fix lockdep warning about non-static key
  dmaengine: idxd: Only call idxd_enable_system_pasid() if succeeded in enabling SVA feature
  dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly
  dmaengine: imx-sdma: only restart cyclic channel when enabled
  dmaengine: dw-axi-dmac: Fix RMW on channel suspend register
  dmaengine: idxd: force wq context cleanup on device disable path
  dmaengine: qcom: bam_dma: fix runtime PM underflow
  dmaengine: imx-sdma: Allow imx8m for imx7 FW revs
  dmaengine: Revert "dmaengine: add verification of DMA_INTERRUPT capability for dmatest"
  dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate
  dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate
2022-07-10 11:23:01 -07:00
Hans de Goede
b0d55983b2 platform/x86: intel_atomisp2_led: Also turn off the always-on camera LED on the Asus T100TAF
Like the Asus T100TA the Asus T100TAF has a camera LED which is always
on by default and both also use the same GPIO for the LED.

Relax the DMI match for the Asus T100TA so that it also matches
the T100TAF.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220710173658.221528-1-hdegoede@redhat.com
2022-07-10 19:46:31 +02:00
Linus Torvalds
5867f3b88b Staging driver fix for 5.19-rc6
Here is a single staging driver fix for a reported problem that showed
 up in 5.19-rc1 in the wlan-ng driver.  It has been in linux-next for a
 week with no reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYsruGg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynAQgCfXSGupNIxfeHhJAYddEBChbsXCrIAn1zzLzDc
 f8kYJqwoJiacHK0vIrBu
 =r7+w
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fix from Greg KH:
 "Here is a single staging driver fix for a reported problem that showed
  up in 5.19-rc1 in the wlan-ng driver. It has been in linux-next for a
  week with no reported problems"

* tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging/wlan-ng: get the correct struct hfa384x in work callback
2022-07-10 09:51:56 -07:00
Linus Torvalds
b41362fdf2 Char/Misc driver fixes for 5.19-rc6
Here are 4 small char/misc driver fixes for 5.19-rc6 to resolve some
 reported issues.  They only affect 2 drivers:
 	- rtsx_usb: fix for of-reported DMA warning error, the driver
 	  was handling memory buffers in odd ways, it has now been fixed
 	  up to be much simpler and correct by Shuah.
 	- at25 eeprom driver bugfix for reported problem
 
 All of these have been in linux-next for a week with no reported
 problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYsrtqw8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykJ5ACfUhLVzGk2IZYz4kddkvu1znlADdgAn2QfXNna
 zGNe/HQuoBWDjq346bGt
 =6Cx6
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are four small char/misc driver fixes for 5.19-rc6 to resolve
  some reported issues. They only affect two drivers:

   - rtsx_usb: fix for of-reported DMA warning error, the driver was
     handling memory buffers in odd ways, it has now been fixed up to be
     much simpler and correct by Shuah.

   - at25 eeprom driver bugfix for reported problem

  All of these have been in linux-next for a week with no reported
  problems"

* tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  misc: rtsx_usb: set return value in rsp_buf alloc err path
  misc: rtsx_usb: use separate command and response buffers
  misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
  eeprom: at25: Rework buggy read splitting
2022-07-10 09:45:29 -07:00
Linus Torvalds
d9919d43cb o_uring-5.19-2022-07-09
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmLJpHQQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpmHAD/9r8+hKrvYwoBVoi0r8SD/hDkOJMJAnJOBb
 IBzpDRGcZhdLqGvMkhkdk1s83TTsKysStYSsr0jTlNMtevHNUx5jalYY0x7sIJBt
 S5WEwJ8aKbCs4G7pRU/T/wtRtYFz+JmlKT3VNGjkLWVrWn77CGEWtAHCSgzIgScn
 7QzZiQIVheDr9RsqU8xre1m21+rQWvOssip82UfuTpiYOKTYyHkb91MoNdTGd3JB
 ABrr1Ind4lSbMaXXcUtUP6iV15NU95CplEr8ln4DS9/syoM7O1ZiOdJb5uo/ywyC
 +VEh2LO+UyRn7V4me743C1UGASNTYoyOjGJs0t0en2L10gTZHx3tWLkKRvk0uF0E
 MOXJ/F8QRZxtb/RTUPX2MED/U/ZERLBbF/Jrdfunwj4NuF6mxOhM0MhFb+DCyxK0
 BmEfTIdmYzHkyKgp46OeaoJ+8cuyoHKC2DlZMoCl+mw6Fmv1XjVnnDag0Oxl2rv4
 ANCPZNGHvi5kC2t5fHu7zgOBgbb1IAkLLwcUA8SQ27dRQPfmsB6sm7YUAabuTu8N
 zc937WxpXw9FsjtmFb7JQR5yLsTIG4BYHSZFM1FF8YX6nFptm4OhKFevgYH8r3sg
 sj4qUZFVVc60xTnFR7Yr+ccBbNPQPzy1tRG70OZvMYtkPFqn+IrfxrBzZTxl6/bl
 5dWh6Y8L+A==
 =ZK3Q
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block

Pull io_uring fix from Jens Axboe:
 "A single fix for an issue that came up yesterday that we should plug
  for -rc6.

  This is a regression introduced in this cycle"

* tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block:
  io_uring: check that we have a file table when allocating update slots
2022-07-10 09:14:54 -07:00
Linus Torvalds
2fbd36dfae Kbuild fixes for v5.19 (3rd)
- Adjust gen_compile_commands.py to the format change of *.mod files
 
  - Remove unused macro in scripts/Makefile.modinst
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmLKxggVHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGb7kP/2eio4+sPt3aCPULfV22DEX9z6Ki
 BbdODt8yr/K9WnVvXfOvVszZKukTVyROPkixztUSDNuHGCpiuGeYvOFK3v0Eb8lz
 Sq3NscWw1Z+t8JF8RlFyopdgQ17pTiPDTjaYedPkL/zictRgHrVB4Jma/80kI3N4
 wmKsvUdnD2waj8aaEJ2AoGm4fmNBMR3inT6I2BnDq0jB40DNFHgCMVZQKQpgOxv8
 ACxL0jPm9PjmWS4vy/gWN10/3C4WHkFvqjQREXMNcmJEZPWYEcvZ1VIfmjBD+2mu
 NdxL0YyJOhsylhPPsWyaPVP8oUTSwisjU9GPQqnJ0YLxYFCnQLcGPuDs4CAkVYkH
 FD8au6KIQsBRu26F2qPR7YkbK7pLIcM/CkKNW34PweaC2uw0WVkSYnbhVPXe8yK0
 n2m9m9ovEAiJ0sAz8RLHRdLdD8dnaF7Y4frJAWPKsP785keicGN+kZ9/dDc/KULt
 OXrG7yU+eLp4vROWjj8UqFWsTvX2gBwSMTZY0l87twudodyURcnV1WWd7QsnoWZh
 cuNcLa6U2bSiauNrYlIo85gWDtMqGFbfI9sFJYhU/wsM0JaeXY7EW4Bosd5RFTHA
 fKtEARzl4QNiNrCtUsWNvdPiQ1H/c1a9eYsxpciz/GUm3emBNIFQVcqpkdUPUe5o
 07SxCZDhPJvCwIb6
 =Uoq2
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Adjust gen_compile_commands.py to the format change of *.mod files

 - Remove unused macro in scripts/Makefile.modinst

* tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: remove unused cmd_none in scripts/Makefile.modinst
  gen_compile_commands: handle multiple lines per .mod file
2022-07-10 08:59:02 -07:00
Linus Torvalds
2b9b31cedb IRQ urgent fixes by way of Marc Zygnier:
- Gracefully handle failure to request MMIO resources in the GICv3 driver
 
  - Make a static key static in the Apple AIC driver
 
  - Fix the Xilinx intc driver dependency on OF_ADDRESS
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmLKsgMACgkQEsHwGGHe
 VUo3hBAAl+01wmvn1AnCPbuF85f/q4P1gUMvXQNkEohiYpJ84KE9Xo/aCZV0LPKj
 tHf4+jECswy17v8XPdqYLTmhaQsjnZcGNMwTEmkUIKx1miiEhWYQmXWyn60fEpLL
 0xUeUVGCSMwRTOOKkctcetLvhcnHvdDAc0QlWDXgN1n9AcH+DQXl7AxGfTQwdBuq
 WiE+tBANx8ymJgY2m8v9stU32AG9NOAim39t0SgGmqJl7D0Irf142f3KIBhDgNel
 0Ol3AKnf9Vb74mXxifNB6hm4meaKCmqmMuSl2FK5SjPvGStqYI+ytKq5kxvsXu91
 jIlP+tBQFzYJUmdYlZmQ1uSreMYBWfUlGSozm5WJvGQBX5LVK1OpzI6z5G2YNmqC
 LPtbJub/c5eCIFZDsQ/pfzpLGhpWHoqhyUY6WxwK7Z3WyePlRrqaxS9gNFdtl1Sz
 7BtN6gWaERVVdGnM06duNWJ+8ZUuRUT0rTaTSrIoiq8zLMjMxIctxemy4vzhnY8I
 CuCq9l22TPu4fY30bUuWEMNUpdCAlUIDM3I2cGMmpjGE1P1arKr4oE9u6MJVd2iH
 rkua5FVKElM8wGvxwsWlkEwx5zGaEpSR1KMb2r/QegpG55LrnI7h+hGidQ9sXj3N
 1te7mqlLpWxORRmD/TUV2hLGnw2ovMJJ/yrzKMl0UXAYvMNmfnw=
 =zRMB
 -----END PGP SIGNATURE-----

Merge tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Borislav Petkov:

 - Gracefully handle failure to request MMIO resources in the GICv3
   driver

 - Make a static key static in the Apple AIC driver

 - Fix the Xilinx intc driver dependency on OF_ADDRESS

* tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/apple-aic: Make symbol 'use_fast_ipi' static
  irqchip/xilinx: Add explicit dependency on OF_ADDRESS
  irqchip/gicv3: Handle resource request failure consistently
2022-07-10 08:52:12 -07:00
Linus Torvalds
74a0032b85 - Prepare for and clear .brk early in order to address XenPV guests
failures where the hypervisor verifies page tables and uninitialized
 data in that range leads to bogus failures in those checks
 
 - Add any potential setup_data entries supplied at boot to the identity
 pagetable mappings to prevent kexec kernel boot failures. Usually, this
 is not a problem for the normal kernel as those mappings are part of
 the initially mapped 2M pages but if kexec gets to allocate the second
 kernel somewhere else, those setup_data entries need to be mapped there
 too.
 
 - Fix objtool not to discard text references from the __tracepoints
 section so that ENDBR validation still works
 
 - Correct the setup_data types limit as it is user-visible, before 5.19
 releases
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmLKpf8ACgkQEsHwGGHe
 VUrc5w/8DIVLQ8w+Balf2TGfp5Sl3mPkg+eoARH29qtXhvVBs5KJB9sbT1IGnxao
 nE4yNeiIKhH5SEd17l11E7eWuUtNgZENLsUb3aiAdsItNS+MzOWQuEOPbnAwgJmk
 oKdxiI1SHiVoPy5KVXOcyAS90PSJIkhhxwgR5MInGdmpSUzEFsx5SY82ZfOjOkZU
 L7zCsJzeDfhJdWiR4N0MXWRaFbIvRxI1uXyqgv+Lo6JK5l8dyUUSEdWyLUqZ7E4M
 GFo6LwR3lskQM2bE9vBWS0h1X00d5oDMzfono8kZzRGA/11plZHRI007PCez8yZh
 4sUnnxsfCy2YF8/8hs4IhrHZdcWW9XoN4gTUsjD0wekGTHhOEqu5qpAnVSrXbvvM
 ZfPF8vM+DLPTWQqAT0a4aj1vd1RflDIQPSXKDzJDjeF49zouAj1ae/3KSOYJDzN9
 V6NGiKBnzj1rbtm0+8jOsTQusmh/oDage7uLlmel3hTfNOc2Ay0LXrJWcvqhj66V
 4CtCd12sLeavin+mGptni6lXbsue61EolRtH44RvZJsXLVY8iclM4onl728xOrxj
 CBtJo6bd3oQYy0SQsysXGDVR7BSXtwAYfArYR8BrMTtgHxuyULt/BDoew4r7XADB
 Xxz7ADJZ3DI3Gqza5H6r89Tj6Oi3yXiBWUVUNXFCMYc6ZrqvZc0=
 =tOvF
 -----END PGP SIGNATURE-----

Merge tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

 - Prepare for and clear .brk early in order to address XenPV guests
   failures where the hypervisor verifies page tables and uninitialized
   data in that range leads to bogus failures in those checks

 - Add any potential setup_data entries supplied at boot to the identity
   pagetable mappings to prevent kexec kernel boot failures. Usually,
   this is not a problem for the normal kernel as those mappings are
   part of the initially mapped 2M pages but if kexec gets to allocate
   the second kernel somewhere else, those setup_data entries need to be
   mapped there too.

 - Fix objtool not to discard text references from the __tracepoints
   section so that ENDBR validation still works

 - Correct the setup_data types limit as it is user-visible, before 5.19
   releases

* tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Fix the setup data types max limit
  x86/ibt, objtool: Don't discard text references from tracepoint section
  x86/compressed/64: Add identity mappings for setup_data entries
  x86: Fix .brk attribute in linker script
  x86: Clear .brk area at early boot
  x86/xen: Use clear_bss() for Xen PV guests
2022-07-10 08:43:52 -07:00
Hans de Goede
c483e7ea10 platform/x86/intel/ifs: Mark as BROKEN
A recent suggested change to the IFS code has shown that the userspace
API needs a bit more work, see:
https://lore.kernel.org/platform-driver-x86/20220708151938.986530-1-jithu.joseph@intel.com/

Mark it as BROKEN before 5.19 ships, to give ourselves one more
kernel-devel cycle to get the userspace API right.

Link: https://lore.kernel.org/platform-driver-x86/20220708151938.986530-1-jithu.joseph@intel.com/
Cc: Jithu Joseph <jithu.joseph@intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Suggested-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220710140736.6492-1-hdegoede@redhat.com
2022-07-10 17:41:06 +02:00
Misaka19465
f56e676a7f platform/x86: asus-wmi: Add key mappings
On laptops like ASUS TUF Gaming A15, which have hotkeys to start Armoury
Crate or AURA Sync, these hotkeys are unavailable. This patch add
mappings for them.

Signed-off-by: Misaka19465 <misaka19465@olddoctor.net>
Link: https://lore.kernel.org/r/20220710113727.281634-1-misaka19465@olddoctor.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-07-10 17:41:06 +02:00
Hans de Goede
d40908f262 efi: Fix efi_power_off() not being run before acpi_power_off() when necessary
Commit 98f30d0ecf ("ACPI: power: Switch to sys-off handler API")
switched the ACPI sleep code from directly setting the old global
pm_power_off handler to using the new register_sys_off_handler()
mechanism with a priority of SYS_OFF_PRIO_FIRMWARE.

This is a problem when the old global pm_power_off handler would later
be overwritten, such as done by the late_initcall(efi_shutdown_init):

	if (efi_poweroff_required())
		pm_power_off = efi_power_off;

The old global pm_power_off handler gets run with a priority of
SYS_OFF_PRIO_DEFAULT which is lower then SYS_OFF_PRIO_FIRMWARE, causing
acpi_power_off() to run first, changing the behavior from before
the ACPI sleep code switched to the new register_sys_off_handler().

Switch the registering of efi_power_off over to register_sys_off_handler()
with a priority of SYS_OFF_PRIO_FIRMWARE + 1 so that it will run before
acpi_power_off() as before.

Note since the new sys-off-handler code will try all handlers in
priority order, there is no more need for the EFI code to store and
call the original pm_power_off handler.

Fixes: 98f30d0ecf ("ACPI: power: Switch to sys-off handler API")
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220708131412.81078-3-hdegoede@redhat.com
2022-07-10 17:41:06 +02:00
Hans de Goede
4ce8f4c202 platform/x86: x86-android-tablets: Fix Lenovo Yoga Tablet 2 830/1050 poweroff again
Commit 98f30d0ecf ("ACPI: power: Switch to sys-off handler API")
switched the ACPI sleep code from directly setting the old global
pm_power_off handler to using the new register_sys_off_handler()
mechanism with a priority of SYS_OFF_PRIO_FIRMWARE.

This is a problem in special cases where the old global pm_power_off
handler later gets overwritten, such as the Lenovo Tab2 poweroff bugfix
in x86-android-tablets. The old global pm_power_off handler gets run
with a priority of SYS_OFF_PRIO_DEFAULT which is lower then
SYS_OFF_PRIO_FIRMWARE, causing the troublesome ACPI poweroff (which
freezes the system) to run first.

Switch the registering of lenovo_yoga_tab2_830_1050_power_off over to
register_sys_off_handler() with a priority of SYS_OFF_PRIO_FIRMWARE + 1
so that it will run before acpi_power_off() to fix this.

Fixes: 98f30d0ecf ("ACPI: power: Switch to sys-off handler API")
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220708131412.81078-2-hdegoede@redhat.com
2022-07-10 17:41:05 +02:00
Pär Eriksson
5d62261a65 platform/x86: gigabyte-wmi: add support for B660I AORUS PRO DDR4
Add support for the B660I AORUS PRO DDR4.

Signed-off-by: Pär Eriksson <parherman@gmail.com>
Link: https://lore.kernel.org/r/20220705184407.14181-1-parherman@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-07-10 17:41:05 +02:00
Shyam Sundar S K
4ddef52f26 platform/x86/amd/pmc: Add new platform support
PMC driver can be supported on a new upcoming platform.
Add this information to the support list.

Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20220630050324.3780654-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-07-10 17:40:43 +02:00
Shyam Sundar S K
1968f2be5c platform/x86/amd/pmc: Add new acpi id for PMC controller
New version of PMC controller will have a separate ACPI id, add that
to the support list.

Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20220630050324.3780654-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-07-10 17:40:26 +02:00
Masahiro Yamada
f5a4618587 kbuild: remove unused cmd_none in scripts/Makefile.modinst
Commit 65ce9c3832 ("kbuild: move module strip/compression code into
scripts/Makefile.modinst") added this unused code.

Perhaps, I thought cmd_none was useful for CONFIG_MODULE_COMPRESS_NONE,
but I did not use it after all.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2022-07-10 21:25:15 +09:00
Borislav Petkov
cb8a4beac3 x86/boot: Fix the setup data types max limit
Commit in Fixes forgot to change the SETUP_TYPE_MAX definition which
contains the highest valid setup data type.

Correct that.

Fixes: 5ea98e01ab ("x86/boot: Add Confidential Computing type to setup_data")
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/ddba81dd-cc92-699c-5274-785396a17fb5@zytor.com
2022-07-10 11:17:40 +02:00
Linus Torvalds
b1c428b6c3 Two I2C driver bugfixes preventing resource leaks
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmLJwtgACgkQFA3kzBSg
 KbYUWw//Vmbr/juumYEqQ0L62zNU1TBFJNZe8tD5+tIP2a3bivUWLWoJkcEuvmmP
 No3c0Bq6384CE91xcO2rFKgoZWhg86C4b++8i98eckUA5QJjHguXemCxUqm1yJWS
 qEbpeEhWYAVnY8ptWRD8ov9d5PT6aPQta1WYT7T3wYLFl5h1kCZy/lTKmZDluh3u
 zMJQQg1SLoI0zfbK7unl9AHDtMpcc/9NwhXii7TCWEJmrmFnsGAi0JoEwWXsHsTL
 bLM8qsRsnVI25yX1T+5dR05RSc0a1bBrDctRgFs0aqun9ZoL12c9MzZUg0UQ1ETh
 zm7TuB97kYxNhnD8rU0JniqqqcP+dMHRmQFyRXPr5BH+XtgHP3inkDvO5Ju1MhiC
 dqSlsGvqCi1TlgbpU0or3kzkz3CQBawzsUnmrYRJ3tPRAY+4Z48Qj+Fdin7Hitz/
 gEm1Qf/vKv9uHOqUHQLaBTRQuVYKZVvpioX6hasZLoaIsKGxm/0UYqdd+7MviPZv
 hXck4kOKqBMaOQtBIQUTiryM51bkRxn4X/Nm6TMOZBHWJKfnJHdvG0N4yjdtXRjy
 0NDrEHLMK0p4BfRoUtWSFgNWWgjryNpCfne3CsXBFuSxsLE0OmZWVb7KwPydsH6s
 iVooxoB1LDGVWzGMK1fudnSScgE+ByDn9x/8q6zgx6ybXKKpdQo=
 =4AoP
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Two I2C driver bugfixes preventing resource leaks"

* tag 'i2c-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: cadence: Unregister the clk notifier in error path
  i2c: piix4: Fix a memory leak in the EFCH MMIO support
2022-07-09 11:20:15 -07:00
Thomas Zimmermann
84499c5d22 drm/aperture: Run fbdev removal before internal helpers
Always run fbdev removal first to remove simpledrm via sysfb_disable().
This clears the internal state.

The later call to drm_aperture_detach_drivers() then does nothing.
Otherwise, with drm_aperture_detach_drivers() running first, the call to
sysfb_disable() uses inconsistent state.

Example backtrace show below:

  BUG: KASAN: use-after-free in device_del+0x79/0x5f0
  Read of size 8 at addr ffff888108185050 by task systemd-udevd/311
  CPU: 0 PID: 311 Comm: systemd-udevd Tainted: G            E     5.19.0-rc2-1-default+ #1689
  Hardware name: HP ProLiant DL120 G7, BIOS J01 04/21/2011
  Call Trace:
    device_del+0x79/0x5f0
    platform_device_del.part.0+0x19/0xe0
    platform_device_unregister+0x1c/0x30
    sysfb_disable+0x2d/0x70
    remove_conflicting_framebuffers+0x1c/0xf0
    remove_conflicting_pci_framebuffers+0x130/0x1a0
    drm_aperture_remove_conflicting_pci_framebuffers+0x86/0xb0
    mgag200_pci_probe+0x2d/0x140 [mgag200]

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 873eb3b118 ("fbdev: Disable sysfb device registration when removing conflicting FBs")
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Changcheng Deng <deng.changcheng@zte.com.cn>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-07-09 11:12:05 -07:00
Sven Schnelle
de2a34771f ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
CI reported the following splat while running the strace testsuite:

  WARNING: CPU: 1 PID: 3570031 at kernel/ptrace.c:272 ptrace_check_attach+0x12e/0x178
  CPU: 1 PID: 3570031 Comm: strace Tainted: G           OE     5.19.0-20220624.rc3.git0.ee819a77d4e7.300.fc36.s390x #1
  Hardware name: IBM 3906 M04 704 (z/VM 7.1.0)
  Call Trace:
   [<00000000ab4b645a>] ptrace_check_attach+0x132/0x178
  ([<00000000ab4b6450>] ptrace_check_attach+0x128/0x178)
   [<00000000ab4b6cde>] __s390x_sys_ptrace+0x86/0x160
   [<00000000ac03fcec>] __do_syscall+0x1d4/0x200
   [<00000000ac04e312>] system_call+0x82/0xb0
  Last Breaking-Event-Address:
   [<00000000ab4ea3c8>] wait_task_inactive+0x98/0x190

This is because JOBCTL_TRACED is set, but the task is not in TASK_TRACED
state. Caused by ptrace_unfreeze_traced() which does:

	task->jobctl &= ~TASK_TRACED

but it should be:

	task->jobctl &= ~JOBCTL_TRACED

Fixes: 31cae1eaae ("sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-07-09 11:06:19 -07:00
Linus Torvalds
d9cdc3b125 powerpc fixes for 5.19 #5
- On Power8 bare metal, fix creation of RNG platform devices, which are needed
    for the /dev/hwrng driver to probe correctly.
 
 Thanks to: Jason A. Donenfeld, Sachin Sant.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEJFGtCPCthwEv2Y/bUevqPMjhpYAFAmLJSdATHG1wZUBlbGxl
 cm1hbi5pZC5hdQAKCRBR6+o8yOGlgDIzEACy0D2CLdJq1YSvjVfuTbon6WpzUkBq
 5ld1cIst+tLkmq9ixpwaGe+x0/7eELRL5/yfdp1/cFTLirKX1fJOlM2/P52Q+ehN
 DOJfSlDLBHP+os4klKw1g3HrbyP5IBLL0Up6fiebd83SpRHHQ8gmANlfb0KZH5MD
 mUH33cE0egSqkZmTIeMW5cCOq9tnppaM/2CFl5ijxXs5xdJodZAR1HV6uhfxhf0N
 Gqj2O44VVHyckMEVrdd2NmqXeOufWCObGAI/4WYVAijMyyewMnJDnTpso5ZBcgGv
 Y2cX5kCdN1D6rfBEKqTVkECt+Q340KbB86kIJqnPuc7T7ay7Ky4mfVOTRF2EXDQs
 mc0+MUTn1W0ydEuktO2A8lXN/3y/Y4S3SzkPDPKCLJ0+iKMx5Hij6aBqyV+gxyBp
 oc7XC4VCMNChnpxgqVzEuweTUf/3YiEDI0pQqG7pt2E/SLFoi98r4T3OH23PjdWM
 13HjilUFKVD4DNWSLCtdS9+TksvYirL7SiRhqL6x1e1qHKsvWaNwP346kEmKG5Gl
 sls152oyiNrLLiIZucuzLsJthlqJIWH+r5GNBtvxx/TO8i7O82c24wyohJm+U4lt
 liwyPQtudDTnPkA4fbTevNqQlPRMXv1/w5B2LMfJiLmbbh0fVHWaU7beHwyDji73
 xF4zYtzEp4zmIQ==
 =rqGK
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-5.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:

 - On Power8 bare metal, fix creation of RNG platform devices, which are
   needed for the /dev/hwrng driver to probe correctly.

Thanks to Jason A. Donenfeld, and Sachin Sant.

* tag 'powerpc-5.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/powernv: delay rng platform device creation until later in boot
2022-07-09 10:34:08 -07:00
Takashi Iwai
a4bd9358d5 ASoC: Fixes for v5.19
Quite a large batch due to things building up for a couple of weeks but
 all driver specific apart from Marek's documentation fix.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLHDQcACgkQJNaLcl1U
 h9DaoAf+LjanLg76KbeHMQg/IaG2dhvKJvSAjixMdLlNixMDpSOVr/2UR4lzLCpw
 gfoJk9liujPjtKMsIlQT/OiVdsMROc8vfb10PdmV7rntaBwCN01aqyr4NMauOmby
 ccdZlsoj7D0k3iTtP0nlZ+Xvm+L0zTEfI66bSB9UU+/h8PDSoK/RHMCjNBtqenAd
 4QMQWxQTvqt3xfgrWxiZeFPUJrLFjDypEDqG8qx8roIcbzEhVYInGq52XZw3ST9o
 mvC/LIFK96WvDGgiOj2UNmSuWpe3lF7cMPmomwyYkdUMcMwbSdVfDOsnAdnyqONi
 RiWIr7g5NOPkYa4mSNhB9Ia1PTzf0Q==
 =V5ia
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v5.19-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.19

Quite a large batch due to things building up for a couple of weeks but
all driver specific apart from Marek's documentation fix.
2022-07-09 18:23:54 +02:00
Pablo Neira Ayuso
c39ba4de6b netfilter: nf_tables: replace BUG_ON by element length check
BUG_ON can be triggered from userspace with an element with a large
userdata area. Replace it by length check and return EINVAL instead.
Over time extensions have been growing in size.

Pick a sufficiently old Fixes: tag to propagate this fix.

Fixes: 7d7402642e ("netfilter: nf_tables: variable sized set element keys / data")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2022-07-09 16:25:09 +02:00
Jens Axboe
d785a773be io_uring: check that we have a file table when allocating update slots
If IORING_FILE_INDEX_ALLOC is set asking for an allocated slot, the
helper doesn't check if we actually have a file table or not. The non
alloc path does do that correctly, and returns -ENXIO if we haven't set
one up.

Do the same for the allocated path, avoiding a NULL pointer dereference
when trying to find a free bit.

Fixes: a7c41b4687 ("io_uring: let IORING_OP_FILES_UPDATE support choosing fixed file slots")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-09 07:02:10 -06:00
Eric Dumazet
72a0b32911 vlan: fix memory leak in vlan_newlink()
Blamed commit added back a bug I fixed in commit 9bbd917e0b
("vlan: fix memory leak in vlan_dev_set_egress_priority")

If a memory allocation fails in vlan_changelink() after other allocations
succeeded, we need to call vlan_dev_free_egress_priority()
to free all allocated memory because after a failed ->newlink()
we do not call any methods like ndo_uninit() or dev->priv_destructor().

In following example, if the allocation for last element 2000:2001 fails,
we need to free eight prior allocations:

ip link add link dummy0 dummy0.100 type vlan id 100 \
	egress-qos-map 1:2 2:3 3:4 4:5 5:6 6:7 7:8 8:9 2000:2001

syzbot report was:

BUG: memory leak
unreferenced object 0xffff888117bd1060 (size 32):
comm "syz-executor408", pid 3759, jiffies 4294956555 (age 34.090s)
hex dump (first 32 bytes):
09 00 00 00 00 a0 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff83fc60ad>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff83fc60ad>] vlan_dev_set_egress_priority+0xed/0x170 net/8021q/vlan_dev.c:193
[<ffffffff83fc6628>] vlan_changelink+0x178/0x1d0 net/8021q/vlan_netlink.c:128
[<ffffffff83fc67c8>] vlan_newlink+0x148/0x260 net/8021q/vlan_netlink.c:185
[<ffffffff838b1278>] rtnl_newlink_create net/core/rtnetlink.c:3363 [inline]
[<ffffffff838b1278>] __rtnl_newlink+0xa58/0xdc0 net/core/rtnetlink.c:3580
[<ffffffff838b1629>] rtnl_newlink+0x49/0x70 net/core/rtnetlink.c:3593
[<ffffffff838ac66c>] rtnetlink_rcv_msg+0x21c/0x5c0 net/core/rtnetlink.c:6089
[<ffffffff839f9c37>] netlink_rcv_skb+0x87/0x1d0 net/netlink/af_netlink.c:2501
[<ffffffff839f8da7>] netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
[<ffffffff839f8da7>] netlink_unicast+0x397/0x4c0 net/netlink/af_netlink.c:1345
[<ffffffff839f9266>] netlink_sendmsg+0x396/0x710 net/netlink/af_netlink.c:1921
[<ffffffff8384dbf6>] sock_sendmsg_nosec net/socket.c:714 [inline]
[<ffffffff8384dbf6>] sock_sendmsg+0x56/0x80 net/socket.c:734
[<ffffffff8384e15c>] ____sys_sendmsg+0x36c/0x390 net/socket.c:2488
[<ffffffff838523cb>] ___sys_sendmsg+0x8b/0xd0 net/socket.c:2542
[<ffffffff838525b8>] __sys_sendmsg net/socket.c:2571 [inline]
[<ffffffff838525b8>] __do_sys_sendmsg net/socket.c:2580 [inline]
[<ffffffff838525b8>] __se_sys_sendmsg net/socket.c:2578 [inline]
[<ffffffff838525b8>] __x64_sys_sendmsg+0x78/0xf0 net/socket.c:2578
[<ffffffff845ad8d5>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff845ad8d5>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff8460006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0

Fixes: 37aa50c539 ("vlan: introduce vlan_dev_free_egress_priority")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-07-09 12:26:59 +01:00
Baowen Zheng
9c840d5f9a nfp: fix issue of skb segments exceeds descriptor limitation
TCP packets will be dropped if the segments number in the tx skb
exceeds limitation when sending iperf3 traffic with --zerocopy option.

we make the following changes:

Get nr_frags in nfp_nfdk_tx_maybe_close_block instead of passing from
outside because it will be changed after skb_linearize operation.

Fill maximum dma_len in first tx descriptor to make sure the whole
head is included in the first descriptor.

Fixes: c10d12e3dc ("nfp: add support for NFDK data path")
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-07-09 12:25:02 +01:00
Pawan Gupta
4ad3278df6 x86/speculation: Disable RRSBA behavior
Some Intel processors may use alternate predictors for RETs on
RSB-underflow. This condition may be vulnerable to Branch History
Injection (BHI) and intramode-BTI.

Kernel earlier added spectre_v2 mitigation modes (eIBRS+Retpolines,
eIBRS+LFENCE, Retpolines) which protect indirect CALLs and JMPs against
such attacks. However, on RSB-underflow, RET target prediction may
fallback to alternate predictors. As a result, RET's predicted target
may get influenced by branch history.

A new MSR_IA32_SPEC_CTRL bit (RRSBA_DIS_S) controls this fallback
behavior when in kernel mode. When set, RETs will not take predictions
from alternate predictors, hence mitigating RETs as well. Support for
this is enumerated by CPUID.7.2.EDX[RRSBA_CTRL] (bit2).

For spectre v2 mitigation, when a user selects a mitigation that
protects indirect CALLs and JMPs against BHI and intramode-BTI, set
RRSBA_DIS_S also to protect RETs for RSB-underflow case.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
2022-07-09 13:12:45 +02:00
Konrad Rzeszutek Wilk
697977d841 x86/kexec: Disable RET on kexec
All the invocations unroll to __x86_return_thunk and this file
must be PIC independent.

This fixes kexec on 64-bit AMD boxes.

  [ bp: Fix 32-bit build. ]

Reported-by: Edward Tran <edward.tran@oracle.com>
Reported-by: Awais Tanveer <awais.tanveer@oracle.com>
Suggested-by: Ankur Arora <ankur.a.arora@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
2022-07-09 13:12:32 +02:00
Pablo Neira Ayuso
7a847c00ee netfilter: nf_log: incorrect offset to network header
NFPROTO_ARP is expecting to find the ARP header at the network offset.

In the particular case of ARP, HTYPE= field shows the initial bytes of
the ethernet header destination MAC address.

 netdev out: IN= OUT=bridge0 MACSRC=c2:76:e5:71:e1:de MACDST=36:b0:4a:e2:72:ea MACPROTO=0806 ARP HTYPE=14000 PTYPE=0x4ae2 OPCODE=49782

NFPROTO_NETDEV egress hook is also expecting to find the IP headers at
the network offset.

Fixes: 35b9395104 ("netfilter: add generic ARP packet logger")
Reported-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2022-07-09 09:55:43 +02:00
Jakub Kicinski
6676d7270c Merge branch 'selftests-forwarding-install-two-missing-tests'
Martin Blumenstingl says:

====================
selftests: forwarding: Install two missing tests

For some distributions (e.g. OpenWrt) we don't want to rely on rsync
to copy the tests to the target as some extra dependencies need to be
installed. The Makefile in tools/testing/selftests/net/forwarding
already installs most of the tests.

This series adds the two missing tests to the list of installed tests.
That way a downstream distribution can build a package using this
Makefile (and add dependencies there as needed).
====================

Link: https://lore.kernel.org/r/20220707135532.1783925-1-martin.blumenstingl@googlemail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-08 20:31:03 -07:00
Martin Blumenstingl
cfbba7b46a selftests: forwarding: Install no_forwarding.sh
When using the Makefile from tools/testing/selftests/net/forwarding/
all tests should be installed. Add no_forwarding.sh to the list of
"to be installed tests" where it has been missing so far.

Fixes: 476a4f05d9 ("selftests: forwarding: add a no_forwarding.sh test")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-08 20:30:57 -07:00
Martin Blumenstingl
437ac2592c selftests: forwarding: Install local_termination.sh
When using the Makefile from tools/testing/selftests/net/forwarding/
all tests should be installed. Add local_termination.sh to the list of
"to be installed tests" where it has been missing so far.

Fixes: 90b9566aa5 ("selftests: forwarding: add a test for local_termination.sh")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-08 20:30:57 -07:00
Linus Torvalds
e5524c2a1f fscache fixes
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEqG5UsNXhtOCrfGQP+7dXa6fLC2sFAmLInYwACgkQ+7dXa6fL
 C2tbmxAAlBkMvoIeyOlkMeAB3l1aK5CAYmgddjWOxY6UHNIGgXqWlGJCoxYngTmy
 j+5Uz1mMNh7TamSJpCTXUBbiLWxzoHI34oie+NT9VUXTTVw0/GQ//jQPlvE+HeJG
 Hmi0HR4lby1O6X9r63obzvDctJPhsVLdgJFtZ3UidwzgY2zYnScxwyCuwSfLUVnF
 YJACZWPFj1oWxOiS2bQZgnvCJpfJ6J0I5asmO0lI1tQDS0o4RoiRvDPTx8Z6K3KO
 8CSm5tvu+vYrbZ5aNCN9f0MZfNl+YZiNQyxEiIP9Phu9iZFRe9UgXvDrE9346uQM
 /Vxa5nvyj+D0Hg+l1jBFXvwoKxLHTZ/BaK74h2/QzRKgxKrHTAyYOgxqt7U/YCsa
 S489eHOGNwbqIKACljBcMX9YZeCdeixt4aK/VIRr+d1f2Ui30Z05ExuYOfGn4wBq
 VcSsBgAALwcyqrpi61URYvKduHTa2D8ATKNKXNM/i1Wv6KQDeom5jyKj3mE7UNsI
 WAgWE2xy74kjYs1Lc0izsfieyZrt1MqZiyYFjS86Cnt0wVmdAQYrQ3wciN5D9IJN
 MiUYuienGRf1MNM2tmFK+N7e+pa/waKcl15/d3Zal94rlATpR2bFOI1zJ9qJ8rpi
 k8B/eydAZx+oUthxWvfIdLwIREJzA49jzBHgfAy/CMjqPCj7gZ8=
 =FDkz
 -----END PGP SIGNATURE-----

Merge tag 'fscache-fixes-20220708' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs

Pull fscache fixes from David Howells:

 - Fix a check in fscache_wait_on_volume_collision() in which the
   polarity is reversed. It should complain if a volume is still marked
   acquisition-pending after 20s, but instead complains if the mark has
   been cleared (ie. the condition has cleared).

   Also switch an open-coded test of the ACQUIRE_PENDING volume flag to
   use the helper function for consistency.

 - Not a fix per se, but neaten the code by using a helper to check for
   the DROPPED state.

 - Fix cachefiles's support for erofs to only flush requests associated
   with a released control file, not all requests.

 - Fix a race between one process invalidating an object in the cache
   and another process trying to look it up.

* tag 'fscache-fixes-20220708' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
  fscache: Fix invalidation/lookup race
  cachefiles: narrow the scope of flushed requests when releasing fd
  fscache: Introduce fscache_cookie_is_dropped()
  fscache: Fix if condition in fscache_wait_on_volume_collision()
2022-07-08 16:08:48 -07:00
Jakub Kicinski
7c895ef884 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says:

====================
bpf 2022-07-08

We've added 3 non-merge commits during the last 2 day(s) which contain
a total of 7 files changed, 40 insertions(+), 24 deletions(-).

The main changes are:

1) Fix cBPF splat triggered by skb not having a mac header, from Eric Dumazet.

2) Fix spurious packet loss in generic XDP when pushing packets out (note
   that native XDP is not affected by the issue), from Johan Almbladh.

3) Fix bpf_dynptr_{read,write}() helper signatures with flag argument before
   its set in stone as UAPI, from Joanne Koong.

* https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
  bpf: Add flags arg to bpf_dynptr_read and bpf_dynptr_write APIs
  bpf: Make sure mac_header was set before using it
  xdp: Fix spurious packet loss in generic XDP TX path
====================

Link: https://lore.kernel.org/r/20220708213418.19626-1-daniel@iogearbox.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-08 15:24:16 -07:00
Sven Schnelle
3418357a32 ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
CI reported the following splat while running the strace testsuite:

[ 3976.640309] WARNING: CPU: 1 PID: 3570031 at kernel/ptrace.c:272 ptrace_check_attach+0x12e/0x178
[ 3976.640391] CPU: 1 PID: 3570031 Comm: strace Tainted: G           OE     5.19.0-20220624.rc3.git0.ee819a77d4e7.300.fc36.s390x #1
[ 3976.640410] Hardware name: IBM 3906 M04 704 (z/VM 7.1.0)
[ 3976.640452] Call Trace:
[ 3976.640454]  [<00000000ab4b645a>] ptrace_check_attach+0x132/0x178
[ 3976.640457] ([<00000000ab4b6450>] ptrace_check_attach+0x128/0x178)
[ 3976.640460]  [<00000000ab4b6cde>] __s390x_sys_ptrace+0x86/0x160
[ 3976.640463]  [<00000000ac03fcec>] __do_syscall+0x1d4/0x200
[ 3976.640468]  [<00000000ac04e312>] system_call+0x82/0xb0
[ 3976.640470] Last Breaking-Event-Address:
[ 3976.640471]  [<00000000ab4ea3c8>] wait_task_inactive+0x98/0x190

This is because JOBCTL_TRACED is set, but the task is not in TASK_TRACED
state. Caused by ptrace_unfreeze_traced() which does:

task->jobctl &= ~TASK_TRACED

but it should be:

task->jobctl &= ~JOBCTL_TRACED

Fixes: 31cae1eaae ("sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Link: https://lkml.kernel.org/r/20220706101625.2100298-1-svens@linux.ibm.com
Link: https://lkml.kernel.org/r/YrHA5UkJLornOdCz@li-4a3a4a4c-28e5-11b2-a85c-a8d192c6f089.ibm.com
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2101641
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Tested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2022-07-08 16:08:24 -05:00
Arnd Bergmann
3f231ccb38 - Fix SPI NOR compatible on Orange Pi Zero
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYsh4ZAAKCRB0Ba7+DO8k
 k2wHAQCgDrPOs+oJfBQF28gAHVbszMrnKkI/nFjf0cyqlWK3ewD+IA67A6v2ixkg
 B9pmopWV/LhycJcxQW0aHE6FdAlBtAk=
 =lKEE
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLIl+YACgkQmmx57+YA
 GNmFYg/+OKGkSCDPQ8GKrUwkBbjassT1NEKkadggzvEIMT644Md9sfH5M6m3gQ/2
 idAyryuUAAm3PZ+eghln1+13famUwrKG0wkz9nEjP6Q9LxteN2WlxGVjgAGfa5WS
 n1tyC3bLNm0n7llOy861d+MSn40SMVq4Svp2wOO0AjY8yP884Wl72IvX6yyTMBVH
 9UrTtac7Ou2n3xbvvcu5h8oSiNTbgRxcOkwOuCSBmGr7i14AFii/leoZnbFowUHw
 myied5bPZNeo2fh32v0twUbQquakg2Kf/qVtk+2Kp6FvNVpPIjz3v9xEKyOJ5adR
 9Vb68w2OvTpGszqQVQoyY+53+48tURc+ZD0hVYt6DZXckNvr5QKVcYv03t7/0BRh
 H4yo7ww/mKLm+k3wDY8I2W53EQ+pfBG/bcoOzIOriRLXOtl+OcWe19KGPReuZhdS
 2pnxAIrnk226DjA8W4GiuSsWtOhvjlMeheepHh4VpTljCrSnYuMYduTB3uhq6rge
 qF1Rn4ut+0gdDDtqEb4ZNPDqwnhNk+/CD8xkQFAFQUK32H6k4r9yG718r7AoV/ZH
 +yqgaZxH+tY59lDghr1LitpjUkYvRFVA2p5MhdFjI14Kk+0haK0Ok23E1WXhQiHA
 OqJByW0cyNfCwhpO1+tpZ11Bc9mCsR2f0pAI7TXHrg8ZCC7+pFA=
 =L0iK
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes

- Fix SPI NOR compatible on Orange Pi Zero

* tag 'sunxi-fixes-for-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero

Link: https://lore.kernel.org/r/Ysh44qUmdmF6TWS6@kista.localdomain
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-08 22:47:34 +02:00
Arnd Bergmann
5b7925988d - fix binding for D1 display pipeline
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYshh0wAKCRB0Ba7+DO8k
 k3NSAP9pk2hJssHsLD8OAgdHqcitZBL5KqxJoupO1leb4ZP6yAEA3uEly8Y5df/P
 UQnnf0VeRRPhyKZUIF/vUCsFXg885QQ=
 =dfDa
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLIl00ACgkQmmx57+YA
 GNmD9g//eMyzZyswoGqNf8Dch6zJYtGUgko+x8p4VG6frjz09Tgci/k4qPDTOQfP
 iKKhiO+UKRgFOQpgYMS+qi4ha9JLIrPpaZqUiiOqoExknLVkp8iKf30GRnsxOO/t
 /B6R9jMUp+RJWOevtImP+NUKWHXV/TLMiOrcLdLNc95NpbutOXKPifdCfVmQ5ZM+
 DEFJE3VBHuDQKUhp1F38JT1ZpUOXaCW3euZSacqOCxujkASoYE4Qi68LbduEY8U8
 ouTLZKetBOWYaB+xb75xvKO1MoPu0eEG2JUJP9+U0SugaL1NFgsXLsmNImbuTYjf
 94C4nubZhlJAjl/dNcR/94n3GDRdhw9Lo/xVCZplyVa9K+WMYdLYACrNyVegSHRS
 ZQsAWJAJmdr0zBFYdGFsuHKmJz/8Z3YeEYEcTHBBBnvZHSj9eh6I2Af3kfe4dobK
 ETcEHej5Vpewj57T30EYt+QHDDh/ZCkvJAHlN4cP1mFda1RA7I8Myn+Rf/fxyjXS
 xLvPa1SUyixPYotJJvQfrt0q5DBfGdOR9sMBaqJ33GGDmvdkJxwDeqyH43o7ZcAX
 K8UD5yTpo4FJ4cQHf/FTTWrqCjhHmpbFR1g1ODpejDTpr6Nh0t3p05fKfklDYxoX
 Eft4g1mFLjJjpb5MDambB5WHcrM0zVI/g3Ufs6JlpPnjRaZUUto=
 =p/lf
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes

- fix binding for D1 display pipeline

* tag 'sunxi-fixes-for-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  dt-bindings: display: sun4i: Fix D1 pipeline count

Link: https://lore.kernel.org/r/YshiPKZRq6NHxPzO@kista.localdomain
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-08 22:45:00 +02:00
Arnd Bergmann
5e7230a4da AT91 fixes for 5.19 #2
It contains 2 DT fixes:
 - one for SAMA5D2 to fix the i2s1 assigned-clock-parents property
 - one for kswitch-d10 (LAN966 based) enforcing proper settings
   on GPIO pins
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCYshFHwAKCRCejrg/N2X7
 /QoJAP9BIE1tDoMkzB1c2+qsxzka8rksFfCnjGcF9vQYo4iSQAD+OkYXta2U+njj
 UvpNgbOtLpPxswJsMpXCqhI71fpQ9gM=
 =jbPC
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLIlxEACgkQmmx57+YA
 GNlOMxAAglnDTs6WBcQ0qxG32wQkqbld5qCWjQtDUzQnfxOoBbtGGIcWpMzkE2XS
 VqkBMvVHKZdUkcV6L1OwfPYW+jMEWSz45S26EToo+gxa97NZ6kODcvIvOlGYf4ax
 LDX5fCreGyyO5+kBKdVFBRcyEKn9+NWeqtWNI0P4D31x+enr28rwbG31s7y8myy+
 oseywlLytGArCEe2cC4nvcrRDGZCqgWbT+swpM4P8Qvk/BDsmOBI8CQ8QIZWWalI
 YOoE3+nNZ2uAWKy6CUiuoBTUx+Psdfd8bRSjcJpqOpcAmQXa4F7ncFLzIfCnqHRf
 UsD5GaTDViNzGODaBKRfok3DFo/8Oa2Dq8T/T5ssCrsc4e35OjoasyZt3rvfh3Av
 nrRaBylXgITjS3dumY+Yiq6RNT/jfKCVZwwrKXKijige008CkRRkn/j8n2tw8oD1
 28cQEgkPD7XpjnKlAWg6re1aLCKHlPj7cS0axSG/GA+Mc7eFgTPPkHcjC4b6LWlY
 eCOnNghI1ferrOhNcFYy+O2w8fk7lvvIe+DeTnqKDJkI/rQaJNl/3UTzsTslmZBP
 4EwdYHYCWN7kVi9vrJ1v+iUx9QjlclOpeZqQidyhK4k10ebBpFR0ICT3MjY5GUus
 4KSKZM+CvkZmS/R5QLU9V8PDn+qbfZI5vnoaKeUdcqRwrP/P584=
 =6AX7
 -----END PGP SIGNATURE-----

Merge tag 'at91-fixes-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes

AT91 fixes for 5.19 #2

It contains 2 DT fixes:
- one for SAMA5D2 to fix the i2s1 assigned-clock-parents property
- one for kswitch-d10 (LAN966 based) enforcing proper settings
  on GPIO pins

* tag 'at91-fixes-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: dts: at91: sama5d2: Fix typo in i2s1 node
  ARM: dts: kswitch-d10: use open drain mode for coma-mode pins

Link: https://lore.kernel.org/r/20220708151621.860339-1-claudiu.beznea@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-08 22:44:01 +02:00
Linus Torvalds
525496a030 ACPI fixes for 5.19-rc6
- Prevent _CPC from being used if the platform firmware does not
    confirm CPPC v2 support via _OSC (Mario Limonciello).
 
  - Allow systems with X86_FEATURE_CPPC set to use _CPC even if CPPC
    support cannot be agreed on via _OSC (Mario Limonciello).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmLIgTwSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxmDAP/1OEgChbdJNvhg7no4BHEwSyuArAVcRD
 +D5bCiPq8x5dSNke3BrN4n789fhsHphXucqI5yTq7lX1AonyO1EHkc+oG+EGrZ+8
 dyw+6Nx4WdJkOLKrEwQm3QQYuBK/k4pCUwhWBBg5FEsn4QldBE2pzEC8aP7gNgN6
 gAxs+6nC7r/9fMoRo8+SG9Xrr1FH1mddru4WTp6croLNrlLVXTaoAHwXMB4qk8in
 JC8bvfnWSWXn05fvJ+nYf8wb93tjBsuyx/Om7kmP7V1WT30fidv+BdP50x6kFq9/
 nE0iTAAgqiO1SpRpUHfYc63GUvBC9d9ZUsbSyT7fMEqZCqLRsKukUA5xFxgQORBi
 fKWVVSjOaQUFk0eeivdqWTgpaIRkjxVCmLFxGN/vY3T1pqAmJIdoY5x7ZzxuOrBW
 6h1zOT0Qm9LURrlnXhcFHXALXFAGVpYCoP4X0PhNi9fZCSrjraG77dar0fj5KgHv
 pUnLTL1qHxrzX/Ax7LJ/Usc+mKO8s/Wd790CvtFElHIsH5p7Bx/l3BDdQHbGK2l2
 ToO9WQQCumccXs6SHCVYQJIH1pr0UIB2X15FNrmLVem8WkEBFJ7DwrZ/nitenOV3
 c9BsQr+rJ3s9S9aSYvIAadurPzC6x5lKu0GKMUfM2GUl/vVcFrzkzlAATD467/IC
 Z7gsfL1UtOwx
 =yWsx
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These fix two recent regressions related to CPPC support.

  Specifics:

   - Prevent _CPC from being used if the platform firmware does not
     confirm CPPC v2 support via _OSC (Mario Limonciello)

   - Allow systems with X86_FEATURE_CPPC set to use _CPC even if CPPC
     support cannot be agreed on via _OSC (Mario Limonciello)"

* tag 'acpi-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: CPPC: Don't require _OSC if X86_FEATURE_CPPC is supported
  ACPI: CPPC: Only probe for _CPC if CPPC v2 is acked
2022-07-08 13:05:56 -07:00
Linus Torvalds
3784fad934 Power management fixes for 5.19-rc6
- Fix NULL pointer dereference related to printing a diagnostic
    message in the exynos-bus devfreq driver (Christian Marangi).
 
  - Fix race condition in the runtime PM framework which in some
    cases may cause a supplier device to be suspended when its
    consumer is still active (Rafael Wysocki).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmLIgKMSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxNgAP/R4t7jx+LyeQbX9JzdY/bA6NTGIdkMbJ
 RhA9Nc3Sbsb+KXulsccq108O4CZwjiCEngvZHkOJJtzgRzLL7jxV6J63tNfLLS60
 oJS4EAOAZ0c1JiO/Fh9G/c6stKdPAajs4PNSHpGcsq8m1e8CktmWPqW40OPD6kDk
 YbkdMkO/7KJtOBX4IwzF67lYMQsulUGi2TAsq6sxsC00KA2A1CoXTWzoamDKtOD3
 8y5JKKRCg7nYhZ7/qxy1zlnhHFJGzVppWbSv98DdZdvsKyizAkk7agBOP4Ld3iPT
 ZtA1L0Pgjx6qUoQ7D7rUgNrmnHGCk77aluAkg/gtS2GI61bvbtT3apyYusJVC0jg
 IKI3MHZZTwqdsEyoBxxWXuRciv1HXXrcwSMB3S9pBAwZEES+GwDFO9MwStkAv8zi
 acceNirUiawODs6qNZjS8Ycsaz56DHCjcsBBCvmP5NnNA8kFdqxB4muz1SRmqubE
 N9BPNDLFCoZArUkwg35QL9EZZLYjLjf5YtF9Xe3lPCaQdbPaIc+4MfXkEp4HHYC3
 V1vvbyZbkq/xSNNCjXRoF4n1x2IZvz7SpsdPjxqADpVNxpL/d/dET8/NBXGxAwJE
 KLh/iElyuIL17mgqH/fXpYNI6bqphxhe+sasH/nFpKOewdEQDtnYqmz6GQQGH469
 /42eiBC4saNB
 =iyaY
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These fix a NULL pointer dereference in a devfreq driver and a runtime
  PM framework issue that may cause a supplier device to be suspended
  before its consumer.

  Specifics:

   - Fix NULL pointer dereference related to printing a diagnostic
     message in the exynos-bus devfreq driver (Christian Marangi)

   - Fix race condition in the runtime PM framework which in some cases
     may cause a supplier device to be suspended when its consumer is
     still active (Rafael Wysocki)"

* tag 'pm-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / devfreq: exynos-bus: Fix NULL pointer dereference
  PM: runtime: Fix supplier device management during consumer probe
  PM: runtime: Redefine pm_runtime_release_supplier()
2022-07-08 13:01:04 -07:00
Linus Torvalds
483e4a1d83 cxl fixes for 5.19-rc6
- Update MAINTAINERS for Ben's email
 
 - Fix cleanup of port devices on failure to probe driver
 
 - Fix endianness in get/set LSA mailbox command structures
 
 - Fix memregion_free() fallback definition
 
 - Fix missing variable payload checks in CXL cmd size validation
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQT9vPEBxh63bwxRYEEPzq5USduLdgUCYsiAcQAKCRAPzq5USduL
 duFHAP9Szd4QqD4hrqjkUeAHqwm6Sa9xgReB+Pbk3VuMbR25YwD9FhLA5fy9UL7Q
 oG8srdh0SqTB/kdOs2hnHUTEnonBGAw=
 =fso6
 -----END PGP SIGNATURE-----

Merge tag 'cxl-fixes-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

Pull cxl fixes from Vishal Verma:

 - Update MAINTAINERS for Ben's email

 - Fix cleanup of port devices on failure to probe driver

 - Fix endianness in get/set LSA mailbox command structures

 - Fix memregion_free() fallback definition

 - Fix missing variable payload checks in CXL cmd size validation

* tag 'cxl-fixes-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
  cxl/mbox: Fix missing variable payload checks in cmd size validation
  memregion: Fix memregion_free() fallback definition
  cxl/mbox: Use __le32 in get,set_lsa mailbox structures
  cxl/core: Use is_endpoint_decoder
  cxl: Fix cleanup of port devices on failure to probe driver.
  MAINTAINERS: Update Ben's email address
2022-07-08 12:55:25 -07:00
Linus Torvalds
f5645edf6c IOMMU Fixes for Linux v5.19-rc5
Including:
 
 	- Patch for the Intel VT-d driver to fix device setup failures
 	  when the PASID table is shared
 
 	- Fix for Intel VT-d device hot-add failure due to wrong device
 	  notifier order
 
 	- Remove the old IOMMU mailing list from the MAINTAINERS file
 	  now that it has been retired
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAmLIUbYACgkQK/BELZcB
 GuPSYBAAo5HfhNcdBaecojN/bPxvOpZBm00Tta1XQ6KnEKGiD+qgE3EhZZgmeaEq
 yrpomHhGzb6Der+eq0mdKSYGTY4RTPFbwTpmZh/VtCm5aLnhjeyjgk5y3fFDlsiU
 wZfKr1BrBZvJ+yAgpAdvIKsZEjsNyK+2cwvLz36WlMHqzMtNtqaU0OF3oxF+DC08
 CzFOlRSqOiyp2Ct4FP9yEXU8sVwvqnHQbuekn8L+loQB5zm5SgIOVy7ttb4idPEn
 Q2Kg6imxRVSA8MXvMR8OleQrnOTZrMZVr5OuMbsFPQ2H9RxX7Bq92AMPSReYGRhi
 ep6WOVaAq14PxlL4y4HyEd6RYkiNYyz0hdnoXgezJF3k0hoG6hZLdG/SSK5l7zGY
 +hrMmKgnF7uPz1M7YFenoy5p5EudzRBafIRgXrOZNZoXUdwNhh8hqJfjRev4op/y
 t8Mt1j6goX9icUonPK5SN8MrDo8EaQj0BgC0d2ihScA3uOhVGSfCzLfhNDkGg5Jy
 b936bgBzwv8Q7kBORPMmzK1+sNu28/NJnSmURGeSGGwZnsSOEd/GRjZkf7iGc9u7
 RrRpW4dH3RlwcUY/ug6UcGqq7xaQPSS//PIVQ/dmjCjX32Xk95jurt1v/hLf0Cm8
 eXSp1Q69kQAiNsu4uvZMfYRsVzh9Z2+UgdpoVXQH20ct94M92vA=
 =KPue
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v5.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:

 - fix device setup failures in the Intel VT-d driver when the PASID
   table is shared

 - fix Intel VT-d device hot-add failure due to wrong device notifier
   order

 - remove the old IOMMU mailing list from the MAINTAINERS file now that
   it has been retired

* tag 'iommu-fixes-v5.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  MAINTAINERS: Remove iommu@lists.linux-foundation.org
  iommu/vt-d: Fix RID2PASID setup/teardown failure
  iommu/vt-d: Fix PCI bus rescan device hot add
2022-07-08 12:49:00 -07:00
William Zhang
8bd582ae9a arm64: dts: broadcom: bcm4908: Fix cpu node for smp boot
Add spin-table enable-method and cpu-release-addr properties for
cpu0 node. This is required by all ARMv8 SoC. Otherwise some
bootloader like u-boot can not update cpu-release-addr and linux
fails to start up secondary cpus.

Fixes: 2961f69f15 ("arm64: dts: broadcom: add BCM4908 and Asus GT-AC5300 early DTS files")
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-08 12:47:25 -07:00
William Zhang
b4a544e415 arm64: dts: broadcom: bcm4908: Fix timer node for BCM4906 SoC
The cpu mask value in interrupt property inherits from bcm4908.dtsi
which sets to four cpus. Correct the value to two cpus for dual core
BCM4906 SoC.

Fixes: c8b404fb05 ("arm64: dts: broadcom: bcm4908: add BCM4906 Netgear R8000P DTS files")
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-08 12:47:06 -07:00