Commit Graph

1324647 Commits

Author SHA1 Message Date
Linus Torvalds
ccb98ccef0 platform-drivers-x86 for v6.13-4
Fixes and new HW support:
 
  - hp-wmi: Add HP OMEN 8 to thermal profile list and use timer quirk
 
  - mlx-platform: Fix PCI device refcount leaks
 
  - thinkpad-acpi: Support a new platform profile toggle hotkey
 
 The following is an automated shortlog grouped by driver:
 
 hp-wmi:
  -  mark 8A15 board for timed OMEN thermal profile
 
 mlx-platform:
  -  call pci_dev_put() to balance the refcount
 
 thinkpad-acpi:
  -  Add support for hotkey 0x1401
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCZ3LkMAAKCRBZrE9hU+XO
 MYibAQCuGx8LrrUNL6dyiQgAMsEbHCK2HmmmS7VyiKBGW6cLPgD/aVGPJ/rmsIe9
 BjKm/HzwPzbaND4Ru0QWnAd+1hRDRwE=
 =mWbU
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers fixes from Ilpo Järvinen:
 "hp-wmi:
   - mark 8A15 board for timed OMEN thermal profile

  mlx-platform:
   - call pci_dev_put() to balance the refcount

  thinkpad-acpi:
   - Add support for hotkey 0x1401"

* tag 'platform-drivers-x86-v6.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: thinkpad-acpi: Add support for hotkey 0x1401
  platform/x86: hp-wmi: mark 8A15 board for timed OMEN thermal profile
  platform/x86: mlx-platform: call pci_dev_put() to balance the refcount
2024-12-30 11:20:42 -08:00
Linus Torvalds
fc033cf25e Linux 6.13-rc5 2024-12-29 13:15:45 -08:00
Linus Torvalds
4099a71718 Fix a procfs task state reporting regression when freezing sleeping tasks.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmdxEyoRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1howA/8C8dsikI/S+GWRRnMStBuRyjlh602xJA4
 ehIjRiLm84Ue71hcRNwPwuW6rJrxDsMG1k1vBcDMhqsZrZt3ldvONpLWZod1sK9v
 wpiPBVsl+V5KR37fVkCa7bb2SDN8z46WjAbYG9bQCLWMv5QmrVa3tIVdPma0nz6I
 7H+UR5LfQyg9C2VqkYo2S/gosoLHg3MX9/ULJFkz6BLzHvfV0htTIlzJNYwBY0qU
 OG9KqMAFN5l0t12sx7IEPAnYlm0RJYcXeOfjiMwWj4sarRfOAFa8s1HuriSQsC7O
 Ypkd2Uj6jtpdoIgkBKvSKKohkxxL7zPZtotiBo7aeQf+Bt6yByQzveF77kYWtnLP
 dmRwZAYPnAMWiajUWukc3bXTVx9zIXER6+5/yWwcLLTVkM8PUxrKW5xmP+oXkMul
 Hp6Kp/Hf5lqjKC0kgHX8O7sZeBmsC1x9SiNM4xx0r+NvnQNdztqbzRFXwGaa5vnA
 fRDQhCFW1BgIapc4340X/HyrSfqNMJZtFwVHFe6B9VUQKfIAocrwAvd6HxVx0YKX
 5/YDddNI/+jzHmGhZHPPQ8GDVHTtzXuBhzBSISj3x6AgIjCiAKu2KtOdzL+YEMw/
 aM6Il/cg1gtijkwhgRcK7b0AJ+8yfFMfri/1tQjJNDnDUYN0mEJsaXqT/KKceDVQ
 DDxPkSIR7aI=
 =p+tV
 -----END PGP SIGNATURE-----

Merge tag 'sched-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Ingo Molnar:
 "Fix a procfs task state reporting regression when freezing sleeping
  tasks"

* tag 'sched-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  freezer, sched: Report frozen tasks as 'D' instead of 'R'
2024-12-29 10:19:54 -08:00
Linus Torvalds
6cbc4b29eb Misc fixes:
- Fix a hang in the "kernel IBT no ENDBR" self-test that may trigger
    on FRED systems, caused by incomplete FRED state cleanup in the
    #CP fault handler.
 
  - Improve TDX (Coco VM) guest unrecoverable error handling to not
    potentially leak decrypted memory.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmdxFegRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1g7ug//R9ot2VD/Bd5VaU5OdIkqSbKO5szR3bRz
 DU2GmA27wVBDFjmQdJzWqvPs8mIQiDF6bkxxoVFS6KjdDK4dj2BzwfBQ3+v3dweo
 OX1+s7wDg3RZtt8ch4yHNk66phimVnBTkg0aWPtgVO0GXE/eE6oTJVe9zw6aB3D8
 4vgQSPzgfuIcyPTcmlFDA4LkOpXKVxwhqy/IeZOHaG/zMrMPaY+KZ6hFN/F4Gp3q
 46bdPtyM2eFi709bnYDczyneu3osrPhoRkXZQ4xo2+OaH9PUPWWtoVd7mR2GCYuL
 gqPerhf06oWzB+sHhrP7i23+LnhUEx1yjEfhtNNkvdCr/YYFVorO+R+2zZvmZjwx
 1/FewQKBpQzdJqkHc63h5/wCo8szETejkoTohRvx0QUDJz6UJqASNObQDSdZ/x3j
 REtt1ULqg4dKY/NgI0FvpWwTBxfESE7GEldPQ6M0iT9PX6O97DbBq2eObguw/sbT
 MYA6yBBD6zGtf/T/ZDCCeGv9qm47H8ZSAPdeWuN2c5Xz+CC+OBiaqZ9VykGmGmsI
 L1pmWoo7jU+VpEM0jbHQpRJ2YMHy+fu4wbte2i7pHPVGM5zjcYaNU3GOKa4J/zlh
 vXX9q3JLylXQtus4NVLtUqopU3W0M6Me1G9n3FBvFm2E08NYWzHSAOYenz3SioBQ
 2lV+098mP4I=
 =9Vad
 -----END PGP SIGNATURE-----

Merge tag 'x86-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:

 - Fix a hang in the "kernel IBT no ENDBR" self-test that may trigger
   on FRED systems, caused by incomplete FRED state cleanup in the
   #CP fault handler

 - Improve TDX (Coco VM) guest unrecoverable error handling to not
   potentially leak decrypted memory

* tag 'x86-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  virt: tdx-guest: Just leak decrypted memory on unrecoverable errors
  x86/fred: Clear WFE in missing-ENDBRANCH #CPs
2024-12-29 10:16:41 -08:00
Linus Torvalds
f65832a32f Miscelaneous fixes:
- Fix Intel Lunar Lake build-in event definitions
 
  - Fall back to (compatible) legacy features on new Intel PEBS
    format v6 hardware
 
  - Enable uncore support on Intel Clearwater Forest CPUs, which is the same
    as the existing Sierra Forest uncore driver.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmdxD+ARHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1hYKQ//bFPzPsWKeObYGEE1Pak80Evkw9jkcbiz
 89ALflvJXG2neCGScUxVbgfh6a8hw/+FEjkVtKBcsrQRiFDn8LzF0oD5OzJhbbAA
 oyhe3JYiIswaAFvmRt+R0Xte7i9UHHF9+LM69DajvhuA4ISGGEfbEOhgAUdp2PZu
 1w8S1Tmk960jXeCHTMDncKqEIwwr+tandKPmQuAMmlDC04yGkVLMEF6kxzwLX6Q8
 09TLWoABoGmn32iTGHn0JQ/zW9HCFeCOzwRsYhHQKEpUYgJUl3Tienc+1gfyABM9
 0osYyQrBXU49HwcRhAbx0ajkQ95S9Xt7JuTWcV89OyWg7+g2UxeIletER7oNrV6g
 YvQc+G3axrsQLySondK9Zj0QPdX3cGniHXLE7VAm5Y761rypLcvbGrZWMvgfuLO8
 uFAb+7YyxX87hqjCqY7l8ICBtrMrUw6BX/G1oOhERKzvlzoU7rBtq9him2P7TgBz
 ++sfullezocqhD2UnPrcJCxkHz2InE0LWLq5rOcM2xpo83OlcQaWzK/f4zsVobUJ
 XRYgbRi95KkZPsLxpRA8w9aozWmvTe38bso8JM/ys5JPUHxRNqJsv40AzOaevgzG
 Xpa5GBxjPeLfDVmAZ2RQD2jSnruZEWIRFIctFEP+HrWwrnFVrERKO9nFT6b0TjVy
 AQu8jy/6rns=
 =os4o
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 perf fixes from Ingo Molnar:

 - Fix Intel Lunar Lake build-in event definitions

 - Fall back to (compatible) legacy features on new Intel PEBS format v6
   hardware

 - Enable uncore support on Intel Clearwater Forest CPUs, which is the
   same as the existing Sierra Forest uncore driver

* tag 'perf-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: Fix bitmask of OCR and FRONTEND events for LNC
  perf/x86/intel/ds: Add PEBS format 6
  perf/x86/intel/uncore: Add Clearwater Forest support
2024-12-29 10:14:08 -08:00
Linus Torvalds
bcfac5530a Fix false positive objtool build warning related to a noreturn function
in the bcachefs code.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmdxDi8RHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1gMFBAApjX98qQFWnnUwTRgpoXCPG8HscVsVIRf
 WqIC3eFkECROHX3Di8+f9Rr7bMnupairiPQ6pUB8e7eTYfeyYHTB/zjW7hQt54+y
 YpZiama+OF++cPHd8TVUd5iSyz8/q0rlCtuebY/v3Pk7pBd8MbbaAz08AgUcNWfK
 /wc/e0NbS16ruhNDcmNgfVhyMkUxf0V92E78HQUjAnr/SaTCPI8xcFG6UQD1ZAYg
 KvRusEWCY7YwxT9qrCINUPn10hRoYicxskGPqFLb/28Yav25+W+sUttI9gmIrls3
 pBzCF22DSHU83RZn3/3u3laQOkS/HDEGmLnapd/4NI57Ykc2tVuBbsZYuogQwCNj
 KKq6AbnicZryfd7nR146JffvlKhTBJx52nFEFGukgxLdx4NhxjGKgyH3JMASjFrA
 ZdPz2DuZwTRmXX7A/riT6h16HGxbwBamiO6pphTw4EiOc3f5QTV9k4OQfwJ/IG6H
 jxMDipAAHdB6wBBMr0Tn5DN38tNrvO7ocyhOjfq3cWewWNswwBJrkFGnR+KlEp65
 /QubxicgK31hr4fuLmypyhjH/4ME2VkRmGQ5QAHM5SRkGmcPzvrM8cecVNR2ee8Q
 PYJEQwCOyRyA8OrDu359Ayw9cEs8HblwQrs+pfHtuhwHZ91dDzCXos/ZnO/mG+Vw
 EX6OBCZ+fhM=
 =k02K
 -----END PGP SIGNATURE-----

Merge tag 'objtool-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool fix from Ingo Molnar:
 "Fix false positive objtool build warning related to a noreturn
  function in the bcachefs code"

* tag 'objtool-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Add bch2_trans_unlocked_error() to bcachefs noreturns
2024-12-29 10:07:40 -08:00
Linus Torvalds
bf7a281b80 Fix missed rtmutex wakeups causing sporadic boot hangs
and other misbehavior.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmdxC+ERHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1jvDw/+Kl24Gjai6hy7yFukGRFRkAezx3YRyK8F
 SM/vg2GzNaottkUSO3ywD//SMoG3qqkBOIukrS8kJXjLNlx1TI6AqGLVA9g9LpMw
 KFgqvIb4llstsAh7s8coCSJIVOCGcNC306EPfqvrhlU16YqFHRggQUqSiycRXQEd
 SDSAiNsiez0g0a0x1qI0lbFtF7l/Xht1CxOmpc0NQe8OXZcOXJI1z92DbzDsY+r4
 g77sJ3jHT9j3rpz7MPdh4xS8RJnT/E3wAKn5dnS0pSJ58UFOndIgncKoeEpPC3gW
 1hFWx+3IC2n0/t4m5TQhtpSFv0W4tkhwWOMI7JlRw2Sx2z0T/gnJsYH7E+DSu138
 XYmRCuW+BHrFjG+Pns4bpndf8Gy2HSHjvp0AB9iUqzfIkWVkQNjBdonfdvY5pey0
 EwkxCZPcWT8j0HehM9MhntYojfgy/Au/Z+EOZQSDDHKLAvkkE5ai1FPCjvhBxrCe
 FGko03zS77O+yayTFwXdtbn0StM1Bfa8WcCKxAKErsYqOOB4AP1bJWAknBKw0O4b
 Kj2nVSf7etDcue6sey9HWd1+pNzUsAlsuRM+bsa/dp2rxHxbbHVVHV1Yy0jTgHTL
 RkK8C3FyZbya4nhl0qY7kYudes37S8aT8AQEvyJ9/Y0aLURuESzdxiX1Knk0W2zs
 WsRnDI85Yq0=
 =0Vde
 -----END PGP SIGNATURE-----

Merge tag 'locking-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Ingo Molnar:
 "Fix missed rtmutex wakeups causing sporadic boot hangs and other
  misbehavior"

* tag 'locking-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/rtmutex: Make sure we wake anything on the wake_q when we release the lock->wait_lock
2024-12-29 10:04:47 -08:00
Linus Torvalds
feffd35a03 Fix bogus MSI IRQ setup warning on RISC-V.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmdxCpYRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1ivVA//YII6d9TjaEVcADmGnuM6wo4/QGkVmjqW
 q5sQUrzsk9Y7uOkru5OfzMpH1/SlXy/LxGTjPb8V4u8d77EK1lwudWyqfubB3MRo
 F/x34lybF7JE8w0sp3a1DIXQ807oPEs85onGEbNMSMiG8XU/l5xBSSX0IZYevgU/
 y0MEfFwV6fU8Wo9MFji8O7K1gW3hbWKfuKL7VlB7Ej3/QgpCAS1adpndysFLc5EE
 3b/bpjX6pEGW4BHUKGPSyJm0yuOKFbdZDg7c8whsix7PNsKI1kgQAxg2FxW9nLHj
 NDDReTw0A9eZUTh4d9OLy55+eGM1BevusEf5gomE5cR5b/4HZmmmC4SjE+k7pszN
 Qos+OfdaA2teRJWzBKnIxgqOPCc/h9CCS9ta89K9W4z4QrbpHHv5vYReE9ooQ9o/
 hH909mDhKQ/fdwIjJESkz3MVIxnqlXAqTA+VWEH1qXistGqQU4Tb2ywhPLzi1JUW
 vc/dANwef/7CQwfQf0RnPVK20+FATkOHwhw9a8Jwe/aPyrfAQShJi+1N0GUhlAYn
 n868CGMCJ+yk+RSgsqcxq3r7M4vtbnn7YxKPqlwkz9IOsnCpAUebYxm28SMo0RPH
 Xkbp4SwO5A7CIad1JF+U3am0DxTnpRj84ItftleYFfKfGmVhDnqxKfSs25mwdnee
 w46Edap72F0=
 =EuZb
 -----END PGP SIGNATURE-----

Merge tag 'irq-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Ingo Molnar:
 "Fix bogus MSI IRQ setup warning on RISC-V"

* tag 'irq-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  PCI/MSI: Handle lack of irqdomain gracefully
2024-12-29 10:03:01 -08:00
Linus Torvalds
c059361673 for-6.13-rc4-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmdw8AgACgkQxWXV+ddt
 WDsL4w/+Ib5WGmd2Rjn1+1X9U5dzrEb+/072UBAhwwaqOOUTlBofeyRSdYqFB0oZ
 aucRMXdXPpVe1xrXsj0WsOZmPsuZT46Eh2ALqqZP5fO1sgBkJ2WmQF0Ei7uypfb+
 abQwiEO2IaMMwt2XgDNzbpZS7oVNGEXHzoHF0R/deL4FoBDNMsbCfRnW+L9++tWU
 dUSpafLhgMMwivJN07VJYwU4ZVXsBhmKv2qI8WpJ5w9kJb1ssN692CvBOVjhuSYd
 A8IMV84dW2KO37fmPqN36QAWotz4mKpv8yrhjJvrix7nAOcXe3TXFUhaFBh1Vmzg
 G5bhkqYcNP6UHT7CIcLZE1mdv6ZAKTp0zSNCh2Uu51+MJL2tIQVjTaUQhbkYLnLN
 9DS2dXz4ksm9ISrjr2tmPe4kgyNQIrp5TCdwXu3CYs+AaU7yKeEBukZ7mXcp/e/W
 TdLKvzPRLMED8mGlFBwg2QbOvcJJ663UW2esyv6DvC61F3tXyiV2RXSC/1qF+RyZ
 FBJvvEevensQlASn1NScuQV+iEQpMo2lMURnRjSG8dGhwMmHpW3wifa2TJDyBzWS
 AH0MriQA9nsYQTkPGPnqr46/BAhFG2vEfVlX20Sk9S0PTBLu8YRy/o2evcV67J8v
 zGaa5pa7fQPbEjRv4Rthdb4R2VIFkZTOtIZSZfjHkPDjtvS7ahU=
 =NwGH
 -----END PGP SIGNATURE-----

Merge tag 'for-6.13-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
 "A few more fixes that accumulated over the last two weeks, fixing some
  user reported problems:

   - swapfile fixes:
       - conditional reschedule in the activation loop
       - fix race with memory mapped file when activating
       - make activation loop interruptible
       - rework and fix extent sharing checks

   - folio fixes:
       - in send, recheck folio mapping after unlock
       - in relocation, recheck folio mapping after unlock

   - fix waiting for encoded read io_uring requests

   - fix transaction atomicity when enabling simple quotas

   - move COW block trace point before the block gets freed

   - print various sizes in sysfs with correct endianity"

* tag 'for-6.13-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: sysfs: fix direct super block member reads
  btrfs: fix transaction atomicity bug when enabling simple quotas
  btrfs: avoid monopolizing a core when activating a swap file
  btrfs: allow swap activation to be interruptible
  btrfs: fix swap file activation failure due to extents that used to be shared
  btrfs: fix race with memory mapped writes when activating swap file
  btrfs: check folio mapping after unlock in put_file_data()
  btrfs: check folio mapping after unlock in relocate_one_folio()
  btrfs: fix use-after-free when COWing tree bock and tracing is enabled
  btrfs: fix use-after-free waiting for encoded read endios
2024-12-29 09:34:34 -08:00
Linus Torvalds
e1d9326608 i2c-for-6.13-rc5
i2c-host-fixes (Andi)
 
 - IMX: fixed stop condition in single master mode and added
   compatible string for errata adherence.
 - Microchip: Added support for proper repeated sends and fixed
   unnecessary NAKs on empty messages, which caused false bus
   detection.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmdwchgACgkQFA3kzBSg
 Kbb9CBAAqD028+v6e6MeQEzu3YuHKY80hJUi19VvCXh1BE3+Dw0dbzs+iKa2FOIm
 dxCJfivUbijHv6mzKxDrePW3DH023eHOG/qgHdYy4J2XkCnGFbdre0hf1GF3FDPw
 Xa5TvAXXdujyPADY+5Dm0qfAYxKJvSt+WI8kNcVR3IUI9FdA6/6YvON7q261+j+k
 cRzQpkeeTXbvZfe/X9ZpnREtUhpAPhB43+BMo2HAddr/GUW2JFxOEfTDdNhxpycz
 wsYQz/J/C2BLZczk+Phl3iT9n4bSxiucDD+vWDY1oXQJ3NzYC2PbKHWn0KTg9koC
 N1/gNUqCwLN+LL3h+Ke4duxWPunCR6+BOag9pZPPG6gkiEu5140PEovDF+QuKiPZ
 VySMxMVIadgC4TZfcLjxjLI0Rhus91Xq+RiKnUADKNzPRrqMyFtW9pjMjpJxBrnD
 MxaWRw2RcpZnnsGlEmnVpiwKFHAprzfygbGAnVXSL8QBeksx6MGlyvyxnI5Ykv5v
 h5dfrYvygj823+Jayu56Sk6bJXP3lyBgruzTMaxMKPZLdoTXu4c5CKin2qoUvBD4
 GH50XZjJzwR4oqnn0YAolzUlBdSKejIOPe20PafXvILqpSGCxnZA2aQMI1AcXbKJ
 VyRvr1MkJ7TbXBalerXaXOA0WQ6H3oVFCrHj+H6xEex7y2ywcdo=
 =GIRt
 -----END PGP SIGNATURE-----

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

Pull i2c fixes from Wolfram Sang:

 - IMX: fix stop condition in single master mode and add compatible
   string for errata adherence

 - Microchip: Add support for proper repeated sends and fix unnecessary
   NAKs on empty messages, which caused false bus detection

* tag 'i2c-for-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: microchip-core: fix "ghost" detections
  i2c: microchip-core: actually use repeated sends
  i2c: imx: add imx7d compatible string for applying erratum ERR007805
  i2c: imx: fix missing stop condition in single-master mode
2024-12-29 09:31:55 -08:00
Vishnu Sankar
7e16ae558a
platform/x86: thinkpad-acpi: Add support for hotkey 0x1401
F8 mode key on Lenovo 2025 platforms use a different key code.
Adding support for the new keycode 0x1401.

Tested on X1 Carbon Gen 13 and X1 2-in-1 Gen 10.

Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20241227231840.21334-1-vishnuocv@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2024-12-29 16:55:10 +02:00
Mingcong Bai
032fe9b051
platform/x86: hp-wmi: mark 8A15 board for timed OMEN thermal profile
The HP OMEN 8 (2022), corresponding to a board ID of 8A15, supports OMEN
thermal profile and requires the timed profile quirk.

Upon adding this ID to both the omen_thermal_profile_boards and
omen_timed_thermal_profile_boards, significant bump in performance can be
observed. For instance, SilverBench (https://silver.urih.com/) results
improved from ~56,000 to ~69,000, as a result of higher power draws (and
thus core frequencies) whilst under load:

Package Power:

- Before the patch: ~65W (dropping to about 55W under sustained load).
- After the patch: ~115W (dropping to about 105W under sustained load).

Core Power:

- Before: ~60W (ditto above).
- After: ~108W (ditto above).

Add 8A15 to omen_thermal_profile_boards and
omen_timed_thermal_profile_boards to improve performance.

Signed-off-by: Xi Xiao <1577912515@qq.com>
Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
Link: https://lore.kernel.org/r/20241226062207.3352629-1-jeffbai@aosc.io
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2024-12-29 16:48:53 +02:00
Li RongQing
27834971f6 virt: tdx-guest: Just leak decrypted memory on unrecoverable errors
In CoCo VMs it is possible for the untrusted host to cause
set_memory_decrypted() to fail such that an error is returned
and the resulting memory is shared. Callers need to take care
to handle these errors to avoid returning decrypted (shared)
memory to the page allocator, which could lead to functional
or security issues.

Leak the decrypted memory when set_memory_decrypted() fails,
and don't need to print an error since set_memory_decrypted()
will call WARN_ONCE().

Fixes: f4738f56d1 ("virt: tdx-guest: Add Quote generation support using TSM_REPORTS")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20240619111801.25630-1-lirongqing%40baidu.com
2024-12-29 10:18:44 +01:00
Xin Li (Intel)
dc81e556f2 x86/fred: Clear WFE in missing-ENDBRANCH #CPs
An indirect branch instruction sets the CPU indirect branch tracker
(IBT) into WAIT_FOR_ENDBRANCH (WFE) state and WFE stays asserted
across the instruction boundary.  When the decoder finds an
inappropriate instruction while WFE is set ENDBR, the CPU raises a #CP
fault.

For the "kernel IBT no ENDBR" selftest where #CPs are deliberately
triggered, the WFE state of the interrupted context needs to be
cleared to let execution continue.  Otherwise when the CPU resumes
from the instruction that just caused the previous #CP, another
missing-ENDBRANCH #CP is raised and the CPU enters a dead loop.

This is not a problem with IDT because it doesn't preserve WFE and
IRET doesn't set WFE.  But FRED provides space on the entry stack
(in an expanded CS area) to save and restore the WFE state, thus the
WFE state is no longer clobbered, so software must clear it.

Clear WFE to avoid dead looping in ibt_clear_fred_wfe() and the
!ibt_fatal code path when execution is allowed to continue.

Clobbering WFE in any other circumstance is a security-relevant bug.

[ dhansen: changelog rewording ]

Fixes: a5f6c2ace9 ("x86/shstk: Add user control-protection fault handler")
Signed-off-by: Xin Li (Intel) <xin@zytor.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20241113175934.3897541-1-xin%40zytor.com
2024-12-29 10:18:10 +01:00
Chen Ridong
f718faf394 freezer, sched: Report frozen tasks as 'D' instead of 'R'
Before commit:

  f5d39b0208 ("freezer,sched: Rewrite core freezer logic")

the frozen task stat was reported as 'D' in cgroup v1.

However, after rewriting the core freezer logic, the frozen task stat is
reported as 'R'. This is confusing, especially when a task with stat of
'S' is frozen.

This bug can be reproduced with these steps:

	$ cd /sys/fs/cgroup/freezer/
	$ mkdir test
	$ sleep 1000 &
	[1] 739         // task whose stat is 'S'
	$ echo 739 > test/cgroup.procs
	$ echo FROZEN > test/freezer.state
	$ ps -aux | grep 739
	root     739  0.1  0.0   8376  1812 pts/0    R    10:56   0:00 sleep 1000

As shown above, a task whose stat is 'S' was changed to 'R' when it was
frozen.

To solve this regression, simply maintain the same reported state as
before the rewrite.

[ mingo: Enhanced the changelog and comments ]

Fixes: f5d39b0208 ("freezer,sched: Rewrite core freezer logic")
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Michal Koutný <mkoutny@suse.com>
Link: https://lore.kernel.org/r/20241217004818.3200515-1-chenridong@huaweicloud.com
2024-12-29 10:14:20 +01:00
chenchangcheng
31ad36a271 objtool: Add bch2_trans_unlocked_error() to bcachefs noreturns
Fix the following objtool warning during build time:

    fs/bcachefs/btree_trans_commit.o: warning: objtool: bch2_trans_commit_write_locked.isra.0() falls through to next function do_bch2_trans_commit.isra.0()
    fs/bcachefs/btree_trans_commit.o: warning: objtool: .text: unexpected end of section
......
    fs/bcachefs/btree_update.o: warning: objtool: bch2_trans_update_get_key_cache() falls through to next function flush_new_cached_update()
    fs/bcachefs/btree_update.o: warning: objtool: flush_new_cached_update() falls through to next function bch2_trans_update_by_path()

bch2_trans_unlocked_error() is an Obviously Correct (tm) panic() wrapper,
add it to the list of known noreturns.

[ mingo: Improved the changelog ]

Fixes: fd104e2967 ("bcachefs: bch2_trans_verify_not_unlocked()")
Signed-off-by: chenchangcheng <chenchangcheng@kylinos.cn>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20241220074847.3418134-1-ccc194101@163.com
2024-12-29 09:52:21 +01:00
Linus Torvalds
059dd502b2 block-6.13-20241228
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmdwJ8UQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpokHD/wN0fLwLNKF2WFCI/8VXxJ8wAQ4q61hrgKD
 PhqfIY+wsz8RnPnoma7aduVzh+JeDK2FurlMFDUXx/hSQI2CxFZHVFjdpAEcTu2z
 MHJ4xnRHR/XbfsmN3rfLgiKson15cQ7wC9IFUoM1fIDhosfWyt5vu7kvLTbLScql
 bfcoW3iBipLHOb7J272ZDjdD8QgLMtCOZ/o7/GTWZfw0ocei2xloCjg1Gxq6qCu0
 P+POptLQvqMrRwu+hG3Ff/svUM1zu36DfIXrJCrxsi1jV2kFTcXytTtNo6x7DsHR
 2gpKPs/v1TJQSMg7CHtTdPAK7o/7mjZxjTlRDMR95l+F4EEC7nVvi0D+ZaAcCznA
 d9oJ9QMGlB99blYN838o17v0K3shy1BhPJt9NO7jqbls/tD/i4U+wJfMWDjhK6oA
 xmNifLb4ecSTiCnGmOfLnCky4ELSpUoQMPg9vu/FtYd09dxHiUhx+8ZBkTQ7TXLT
 I5MDE+5fh36NaLzlyjJM1jxv5KNQSAd5Ow47zCejvjgvAtFJoEXpfQV7/2n3YYm7
 XVxBHhY/e/mXYCYAQ7hwTfQjIto7NurET0QX0LYpOHBpRLADf3okV0VA4jScwcRK
 SbMe5puCADCFEv1AUBVgs7HSUIo5yiXmBGko7MvHBIC3o7qedGc1YDEW4tYwQWDJ
 czYf97xi1Q==
 =HcC5
 -----END PGP SIGNATURE-----

Merge tag 'block-6.13-20241228' of git://git.kernel.dk/linux

Pull block fix from Jens Axboe:
 "Just a single fix for ublk setup error handling"

* tag 'block-6.13-20241228' of git://git.kernel.dk/linux:
  ublk: detach gendisk from ublk device if add_disk() fails
2024-12-28 11:02:35 -08:00
Linus Torvalds
d19a3ee573 io_uring-6.13-20241228
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmdwJ2QQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpjCzD/49vb6zpF1lhY9i5HTzAPTX2pmGGhKqsZWz
 a6hMCE2PGVmKfsEyypkJgcqj10en8e9OF/n8T/Bnh2VKOXKnUpDac5tLzLgDivvG
 a6GbwzIbX18VLL07XyeRDz8iN+Bac9N1B9xFcWdYweRuRc4vDPNaxpDZjxk4KnfU
 CloCItMSz3KK6CBQXD6UDsRvlgdvH0lEKQi9VzxGs7Zcfv+vv2n+WjN2dDJDoXFd
 UXpMm4JfeLZPhD+OHqic7jRvIx7ZoYQrtaBTJdQOzpyyrSCogmfDAD8QXVFGrf/i
 SWQsNJlLKCEcgRRZuI8NaXTM51UtA4J0Ikvi8/XOaJAgAgeBi+e03AC5X1uksali
 BwFpXMCNICYhYXsqV3Egj1fdAwpgwnfeZ24dt5DZxe4DU3zzaz3zq1qydTS+ZjSx
 +TWa7HcwELOghG8e7qhYBB63T4PvyX5JQlV+CPLEGarsmB1gsnWtTmVedm5h2+g6
 8RVi1NQy/BHTtQCsQtVY2pYfugvU+HrwU3C8kEo1/q5M5LVJJOWNfgK1DWWFjKs/
 PrgFbTnLuKmaCwwzdc92O2RLrdaJ0Lz5bTTqdHTXEPShsGj0ZvjnA13wDOPlAFY+
 FyQTRXKOE8IZDeMmi06aKSjHWdrYDmg1DTWIftTUaXrWfwAbEFe5z6xvcSdfh+hK
 N9uDor8wbw==
 =UkND
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-6.13-20241228' of git://git.kernel.dk/linux

Pull io_uring fix from Jens Axboe:
 "Just a single fix for a theoretical issue with SQPOLL setup"

* tag 'io_uring-6.13-20241228' of git://git.kernel.dk/linux:
  io_uring/sqpoll: fix sqpoll error handling races
2024-12-28 11:00:29 -08:00
Linus Torvalds
e51da4a232 two smb3 client fixes
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmdvFZoACgkQiiy9cAdy
 T1G8Dwv7BTbNyC3nm0ntzHmZ++s44tJ6F+sagXZ3iBHlkK5lSRMys0dMH5DY8JPl
 WnzJZeN99E70vzLlOnsYeIl9ZyJxyEf2jWRFVK6fgnaNVl0OquTpdGp1yC0lJpQ+
 AFGhIb+zZaYd3YEgMlm/9gnuzJ9u1+xnI7wGXw/MSnvsbolFf9iwYrgUveAuNDhH
 3ztvcBoC8lI9TFTFXG1aDjhh0yCfY1Fk3heS1Lc1p7xj3uA11XOFSI4N0PlDsdGz
 Irs1ypRQDDjFI3Hazi8+hjrQA9P3Qg88AT0nsRWEy1XkoDh8rMZ48bOGeF3EjtFI
 rlB1IUDHqgIc0M9aZw06TL59fJPinWFCcYT7jq9AoNquebFKhXwyFkx4kqNBNa7s
 vp+ttUo3idfMwESWVWdPftD8KFdEkzzTQnQJMwbRKRWJ25WA/ysCadqb+DRMA3Lj
 qL1yWpwtAT1kU1noTKBpzPjZn17vLJd91auHZ2PkamgFcQmAyMV3A/BpQis6BGDM
 32WE9Rag
 =y/jk
 -----END PGP SIGNATURE-----

Merge tag '6.13-rc4-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - fix caching of files that will be reused for write

 - minor cleanup

* tag '6.13-rc4-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Remove unused is_server_using_iface()
  smb: enable reuse of deferred file handles for write operations
2024-12-28 10:58:01 -08:00
Linus Torvalds
fd0584d220 tooling fixes for v6.13:
- Fix rtla divide by zero when the count is zero in histograms
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCZ27/phQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qq0bAQDAo1edYG0QGG2cbee1dM0gWiOZqmgZ
 y2/FzV64Nq5UfQD9HPXVTv+fF0fHs4DEj3BQI5mSLi5tu7g2zer5FKVSiw0=
 =Q2ZB
 -----END PGP SIGNATURE-----

Merge tag 'trace-tools-v6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing tool fix from Steven Rostedt:

 - Fix rtla divide by zero when the count is zero in histograms

* tag 'trace-tools-v6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  rtla/timerlat: Fix histogram ALL for zero samples
2024-12-27 15:31:52 -08:00
Wolfram Sang
f802f11b23 i2c-host-fixes for v6.13-rc5
- IMX: fixed stop condition in single master mode and added
   compatible string for errata adherence.
 - Microchip: Added support for proper repeated sends and fixed
   unnecessary NAKs on empty messages, which caused false bus
   detection.
 -----BEGIN PGP SIGNATURE-----
 
 iIwEABYIADQWIQScDfrjQa34uOld1VLaeAVmJtMtbgUCZ28dsRYcYW5kaS5zaHl0
 aUBrZXJuZWwub3JnAAoJENp4BWYm0y1umIwBAPxk3gjuopIhvcer2XrO2Nwgmqhf
 DGOnYzMB2NglNGktAP9gN2iLugshkKGpPHZ+hWb63x/vVvFSXRtaVXJtgildBg==
 =enai
 -----END PGP SIGNATURE-----

Merge tag 'i2c-host-fixes-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current

i2c-host-fixes for v6.13-rc5

- IMX: fixed stop condition in single master mode and added
  compatible string for errata adherence.
- Microchip: Added support for proper repeated sends and fixed
  unnecessary NAKs on empty messages, which caused false bus
  detection.
2024-12-28 00:25:04 +01:00
Linus Torvalds
8379578b11 Power Supply Fixes for 6.13 cycle
* gpio-charger: fix potential array out of bounds access
 * cros_charge-control: fix concurrent sysfs access
 * cros_charge-control: allow start_threshold == end_threshold
 * cros_charge-control: workaround limited v2 charge threshold API
 * bq24296: fix vbus regulator handling
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmduuvwACgkQ2O7X88g7
 +pqhUQ/+L1yIOlX6CCqUOCTBVw15raepucxUZiY2prqDlDVPjxTsdvB307uPKeLI
 uWIajYGIuZoOfabHZovhTouDb1ygYZX55Ud3Egzbqjhdkqyl/aXfel0bjh1nOyaO
 22Ga2keBXUp4ySs2iyfkvadpugTeXcq7jBc2WMkW6yuWGvd8NQ9my9E1aAAlpwCt
 fyjvQ43U/8UMecVSAK2rfisVAy2hZnKBdf5b9bmPOgiAC04ncTBXgR+8j4bxNGDA
 xU+xk96lQROxpa3d7qg5MDYV5uxmZhsw09d7cfpMKm2268EmCzrmVSJm6TPLQW7E
 04ijngTVA4Zcj4lWi2TuLQtQDGXZkKirNk76PdP4Kz9yf9KNMfDLFFOjaDJbR0rY
 3dFGDHMsuiDMesw9LbHz+H69/RbrI0RdK/HtttoQJS0VobmQjulFxP1GKwzyt/r3
 XlTiaur9ip2MAPPZViYeBSbXZsnvMOnlEY6SBsDrviq1s379FOXxEI/uongmFQY9
 4jawFfDqxq9UvOrjB1MqVJXcEYYYBqLP4oBt+izb2AWrXj3MKT5AECHV4RTjbql0
 eXE5V5fXY3wljggoWyarvYW9dLWfDeD3D3b1QYoCyGX8agXHRGoIWi6T+dZWUy5M
 i+c1/B/2WgRfMErbc5hdScLztTsLH0XVdKLZAVe1jIxdocpLc/8=
 =Nj7G
 -----END PGP SIGNATURE-----

Merge tag 'for-v6.13-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply fixes from Sebastian Reichel:

 - fix potential array out of bounds access in gpio-charger

 - cros_charge-control:
    - fix concurrent sysfs access
    - allow start_threshold == end_threshold
    - workaround limited v2 charge threshold API

 - bq24296: fix vbus regulator handling

* tag 'for-v6.13-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  power: supply: bq24190: Fix BQ24296 Vbus regulator support
  power: supply: cros_charge-control: hide start threshold on v2 cmd
  power: supply: cros_charge-control: allow start_threshold == end_threshold
  power: supply: cros_charge-control: add mutex for driver data
  power: supply: gpio-charger: Fix set charge current limits
2024-12-27 11:10:56 -08:00
Linus Torvalds
eff4f67583 powerpc fixes for 6.13 #3
- Add close() callback in vas_vm_ops struct for proper cleanup
 
 Thanks to: Haren Myneni
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEqX2DNAOgU8sBX3pRpnEsdPSHZJQFAmduTGMACgkQpnEsdPSH
 ZJSpGRAAgrC9bSMEarUY6S1vezEAgt9B6po8ONRF0HMHUQnpADLnkRjLGzVxg0aD
 NGB43bmo/RJqrr7xN9sTFoK5K3dAxADDibbVJ8N5euWXmu4AD49LCydE7z0qU4Qg
 hSpWS/vZyNnlx20W0eZI6cAhcANvHswLR4GeDsDd1QT6MoH+w9ojoelIKWkfFMAY
 gIFESHKUsC+qLOLlv/PXrIC5c6mOe/CYZLcLLAuC+zcan7wKd37S80LxLbgLnJgv
 PPf/sqeZr75rS1YZ+BKdAGrXEfDOaxiY0Y0fHT9I7EDST+nM0AaIREjJw+kqLIB/
 8UC030PJk7w6peEVqzK1CdqNW5vifd+htqXLXGc7o16VZp9JQc/tySMqtxCqLiMT
 Fc6Nlo2LBk8RP3gNgGykZZrubsVS+91jzZMosZzv31JR4atuVfNaa1X1vvgtif09
 Qvg/hQgno5sjKhyRLsulMrEzAQqipfCKbUuHVqo4MaPJW2sTQ15W6/F6lm8s9TKr
 xN4bjuhAKTSviXRc9EgC2h9xQdtp0/yivHyrUgd/rrx1I5ieW91YsipfACjtK0V3
 rx/JI2H27Fy74yMc93CHenn81OTZ5EDZhVIzMWqD4LPs3UV1daR/elLdy0fUso81
 vc2BpePkwCcK6cc41Nnciml6aYwsyDELaE+ghky/qlBIx/NXG9Y=
 =grGb
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-6.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Madhavan Srinivasan:

 - Add close() callback in vas_vm_ops struct for proper cleanup

Thanks to Haren Myneni.

* tag 'powerpc-6.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/pseries/vas: Add close() callback in vas_vm_ops struct
2024-12-27 11:06:29 -08:00
Linus Torvalds
411a678d30 Probes fixes for v6.13-rc4:
- tracing/kprobes: Change the priority of the module callback of kprobe
   events so that it is called after the jump label list on the module is
   updated. This ensures the kprobe can check whether it is not on the
   jump label address correctly.
 -----BEGIN PGP SIGNATURE-----
 
 iQFPBAABCgA5FiEEh7BulGwFlgAOi5DV2/sHvwUrPxsFAmduAMgbHG1hc2FtaS5o
 aXJhbWF0c3VAZ21haWwuY29tAAoJENv7B78FKz8bJ6YH/2QBkWNTe3qjxdPsTxJ2
 MyL2PO8tMwZbNSyYZ1yGnbguWUUKVkuiheS/qWhLNpuVEyb6Q9/Zuifh5rFqDbf0
 Ug3YvsP7gQurmqDm1NGlnMic3zlmZaYDtXCKB+kiA3HO3iP92zesTJlasiok3aSd
 sQphxUzmG41BQUDN5/LktGjVb5juf3Xq6i6bdCd6wunUbGWCEE+XmFrg1oVnutES
 GTckUGswUBGbgkcVPc07UfKZpNzZdyZlmbVfOISCdYIAddUKftATN7SaUrM29oqC
 /lkUcxeXSVXBIUkbA1p50nfjYzTWNeXG92WrvMrRZjNivyMf/nUJnxrlHsv5h2Dy
 gtI=
 =d3Zj
 -----END PGP SIGNATURE-----

Merge tag 'probes-fixes-v6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull probes fix from Masami Hiramatsu:
 "Change the priority of the module callback of kprobe events so that it
  is called after the jump label list on the module is updated.

  This ensures the kprobe can check whether it is not on the jump label
  address correctly"

* tag 'probes-fixes-v6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing/kprobe: Make trace_kprobe's module callback called after jump_label update
2024-12-27 11:03:15 -08:00
Linus Torvalds
f0bc704f46 hardening fix for v6.13-rc5
- stddef: make __struct_group() UAPI C++-friendly (Alexander Lobakin)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRSPkdeREjth1dHnSE2KwveOeQkuwUCZ22gpwAKCRA2KwveOeQk
 u/ZvAQC87Bvl4tYtP2MxUPLMnxDNitRVBXKDC4Bfx2d0L8AYAAEAqJRPIdMi6Pxe
 nb+bI/2H9asWC3DXDXNJeHDnX/VyzQI=
 =f4uG
 -----END PGP SIGNATURE-----

Merge tag 'hardening-v6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull hardening fix from Kees Cook:

 - stddef: make __struct_group() UAPI C++-friendly (Alexander Lobakin)

* tag 'hardening-v6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  stddef: make __struct_group() UAPI C++-friendly
2024-12-27 10:39:05 -08:00
Linus Torvalds
2c2b3d906c Two minor tracing fixes for 6.13:
- Add "const" to "char *" in event structure field that gets assigned
   literals.
 
 - Check size of input passed into the tracing cpumask file.
 
   If a too large of an input gets passed into the cpumask file, it could
   trigger a warning in the bitmask parsing code.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCZ21olxQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qnslAQDnmQWF3nNa209A9FOvyZmXxDYE/Ymc
 YEAMsuD2ehGu4gEA/LnVBkN0fsm5f5+eUWBgnmYy3C1nW6oiwYamjFU5cAQ=
 =u2Fh
 -----END PGP SIGNATURE-----

Merge tag 'trace-v6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:
 "Two minor tracing fixes:

   - Add "const" to "char *" in event structure field that gets assigned
     literals.

   - Check size of input passed into the tracing cpumask file.

     If a too large of an input gets passed into the cpumask file, it
     could trigger a warning in the bitmask parsing code"

* tag 'trace-v6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing: Prevent bad count for tracing_cpumask_write
  tracing: Constify string literal data member in struct trace_event_call
2024-12-27 10:33:21 -08:00
Tomas Glozar
6cc45f8c1f rtla/timerlat: Fix histogram ALL for zero samples
rtla timerlat hist currently computers the minimum, maximum and average
latency even in cases when there are zero samples. This leads to
nonsensical values being calculated for maximum and minimum, and to
divide by zero for average.

A similar bug is fixed by 01b05fc0e5 ("rtla/timerlat: Fix histogram
report when a cpu count is 0") but the bug still remains for printing
the sum over all CPUs in timerlat_print_stats_all.

The issue can be reproduced with this command:

$ rtla timerlat hist -U -d 1s
Index
over:
count:
min:
avg:
max:
Floating point exception (core dumped)

(There are always no samples with -U unless the user workload is
created.)

Fix the bug by omitting max/min/avg when sample count is zero,
displaying a dash instead, just like we already do for the individual
CPUs. The logic is moved into a new function called
format_summary_value, which is used for both the individual CPUs
and for the overall summary.

Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/20241127134130.51171-1-tglozar@redhat.com
Fixes: 1462501c7a ("rtla/timerlat: Add a summary for hist mode")
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2024-12-27 11:21:46 -05:00
Linus Torvalds
d6ef8b40d0 sound fixes for 6.13-rc5
A collection of small fixes.  Nothing really stands out, fortunately.
 
 - Follow-up fixes for the new compress offload API extension
 - A few ASoC SOF, AMD and Mediatek quirks and fixes
 - A regression fix in legacy SH driver cleanup
 - Fix DMA mapping error handling in the helper code
 - Fix kselftest dependency
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmdtgNMOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE/hcA//faV801EX6Dp42M19SEm4LLQrWrkqYkg9h+ra
 dGlgcJWQwJrxX6kyFefBiAhu99DuwDuNpUgRZgtPfdGgA2jQaKjwbP+/TMifheh8
 y9ljr1TBZ90IGBcIGa6GhKVkRK/3kRj61FBRXlev3HfXn1PqMY7092wzGjL1lHoc
 c/qxnHdRGlPSdFdXHeXm8VNJ3QYCZlK0nf6wljKTDlCZSj/NdjFttEhSQHQ5Rbg6
 NMglvBuX6GUwJm1M/SiNNJ+8NBigxs4MF1Rgy1nuuC4gndozjDXPWjSIxHsSZCm7
 jpk7giqU1D9nBjxG/7wN2sE42GHKx61oEvJVVS+53zRetXuBFSNbEgGNCJPsjWwS
 TUKMuUfyBfNwV9WKJ8/8IS50Vqdbgf+t1VLHUuGFMq7NkFFpnW+KGnfJL4ZSHyce
 9bAVwkA26mX1YhBhsHq1R4DGOVIVmeIIKH6f6uazN7YNB2y5VFSJIiMUK6ih8OwQ
 NWqCdn5i3qfco/Gi/IZd5kAbT6xWsLViGEJ0rTCsjHJI3zu54i8Xyl5Fp0e8lLJj
 /rr/QzBwIiBLMlj+WcrEc0a+P0izqur/OhYJIeVJbtfVrJLtFv67NRjnaqeyJK1M
 5UevtxAC0r5NrYmQpURW8GGTkMiu/litNiIbHrcCCCWYZhMz6ST4UdqBNW73bOMK
 bHaNyqk=
 =3ZF7
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes. Nothing really stands out, fortunately.

   - Follow-up fixes for the new compress offload API extension

   - A few ASoC SOF, AMD and Mediatek quirks and fixes

   - A regression fix in legacy SH driver cleanup

   - Fix DMA mapping error handling in the helper code

   - Fix kselftest dependency"

* tag 'sound-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: sh: Fix wrong argument order for copy_from_iter()
  selftests/alsa: Fix circular dependency involving global-timer
  ALSA: memalloc: prefer dma_mapping_error() over explicit address checking
  ALSA: compress_offload: improve file descriptors installation for dma-buf
  ALSA: compress_offload: use safe list iteration in snd_compr_task_seq()
  ALSA: compress_offload: avoid 64-bit get_user()
  ALSA: compress_offload: import DMA_BUF namespace
  ASoC: mediatek: disable buffer pre-allocation
  ASoC: rt722: add delay time to wait for the calibration procedure
  ASoC: SOF: Intel: hda-dai: Do not release the link DMA on STOP
  ASoC: dt-bindings: realtek,rt5645: Fix CPVDD voltage comment
  ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 21QA and 21QB
  ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 21Q6 and 21Q7
  ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry
2024-12-26 10:49:02 -08:00
Linus Torvalds
23db0ed34f dmaengine fixes for v6.13
Driver fixes for:
  - Kernel doc warning documentation fixes
  - apple driver fix for register access
  - amd driver dropping private dma_ops
  - freescale cleanup path fix
  - refcount fix for mv_xor driver
  - null pointer deref fix for at_xdmac driver
  - GENMASK to GENMASK_ULL fix for loongson2 apb driver
  - Tegra driver fix for correcting dma status
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmdtW8IACgkQfBQHDyUj
 g0fWEQ/5AddE/OIlxBai1K+diRcTxrgHJ6rMl2+4gF3Odhf3+bCnGS8rnYxwzIzO
 eRgovAhJsR5zc519KIPvdm9nj/MlxzCCUktQX/5smLvLrlGqdlPor14/SMsm5ePS
 w1BX550Ho2YoI1mvlcW4Kj4Kvy6e2KAgBZs0gKsHLyS90KLsi9mENmt12RmYtPns
 DKkzy+R8q8Xf5GKAwPGFutbBsCzXocJmodcEbKNnYut9+Wcn3wao1ZUscrXEfT7X
 0AvAT+9rOTIItSHD4NSRqUmcqvcQqIY9ESJtntEABqes3/CBtr0dovZBoJvbpnu2
 iVAkQBeBi0Le9Wprs6q5ODr5BZsHYqjskstMXS48m3CUkShLORtwTJh+4fVDFPFE
 AuGn55nSfXQn/pbFbIoCbU8HzJmNlhFTtuvPji5PgLDi5st2aU3AjZcqdW+zGg9l
 Cwc+1A7AQ+SaZ3iY9aeNeckaeSefyDQiMH5P/1a/SLois8tGLaXJfi/t6vGDiuXp
 NlJJZ5GrMDlN3eKajDU2+qj0rBv8j6tYaL9VeQ3h/5UP1tlhm9gOMionri2do/hF
 XRioKQo8aFW5WadmPVBRhC65x83b3TUDf/KOgDhDh53VjZLNp+c2yAlzkFaUJofb
 EQblwTuASWnA7QnqqUT9juPLBBylbuNaxa0CiB8NCUUkx+vVTfA=
 =1jRj
 -----END PGP SIGNATURE-----

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

Pull dmaengine fixes from Vinod Koul:
 "Bunch of minor driver fixes for drivers in this cycle:

   - Kernel doc warning documentation fixes

   - apple driver fix for register access

   - amd driver dropping private dma_ops

   - freescale cleanup path fix

   - refcount fix for mv_xor driver

   - null pointer deref fix for at_xdmac driver

   - GENMASK to GENMASK_ULL fix for loongson2 apb driver

   - Tegra driver fix for correcting dma status"

* tag 'dmaengine-fix-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dmaengine: tegra: Return correct DMA status when paused
  dmaengine: mv_xor: fix child node refcount handling in early exit
  dmaengine: fsl-edma: implement the cleanup path of fsl_edma3_attach_pd()
  dmaengine: amd: qdma: Remove using the private get and set dma_ops APIs
  dmaengine: apple-admac: Avoid accessing registers in probe
  linux/dmaengine.h: fix a few kernel-doc warnings
  dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL
  dmaengine: dw: Select only supported masters for ACPI devices
  dmaengine: at_xdmac: avoid null_prt_deref in at_xdmac_prep_dma_memset
2024-12-26 10:43:25 -08:00
Linus Torvalds
6fcb22ef50 phy fixes for 6.13
- devm_phy_xxx fixes for few APIs in the phy core
  - qmp driver register name config
  - init sequence fix for usb driver
  - rockchip driver setting drvdata correctly in samsung hdptx and reset
    fix for naneng combophy
  - regulator dependency fix for mediatek hdmi driver
  - overflow assertion fix for stm32 driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmdtV8cACgkQfBQHDyUj
 g0f7/BAApmyGATxMukoP1JPVoL7zTsoqFqzyX5RIz4rlrLMdPTFsF2luldVyslZq
 YXWUVROGZdrZ3vAv5Tu9UZLpX4P5gBidKA7mcRWP9oqgtICF97ChTU9sH6jmLX/B
 s3pY8DtzP51xpplDyMyj/iIAtMNurLj23Z1O+PflrXzL2XSxNNUBoH3BKohP4GGp
 bd1qdFg+nnDWdmD3pxYrGSDX74m49Ww7JHWtzH/VxASL0je9qmCPaS1IwNnSbeuR
 wnLjDE92X5wV70q1ZlWTsiaQoTmS2RyOMD+Xeh1d7Rw8cLvx0zXYOY2MsYn1ywcG
 Z2F0vtOxEUjXXwRGDAy0InmDZGTw4y7oncLI7D9LwAoWEoYHD43SYPyTQT2zHpew
 /ezT1As0l8K5O0XpYWslqviR6tMuLy3SPQFxU2LfPCPDj6pI05BldiMhVXXCEY90
 OPaNjcSyTn9/tznUbx6ftH7mqJp01enMQfbdKs9ozKgHF02Nj69LcD10UQ8lDUUM
 sXID7nQKmwbC3YIPjvTjcyNIhkdySRtZtyMgRLebooL7fXdm+qbieR6P5gT584x3
 Y9CehUySMt/KMh3knRJA4O3j9tV84Zyf5GvgBTQu/SSHCSUA1UlqtL08yEmg2IMk
 vQMoua5S5qDlhHDY1JICm58Lzfl8BNfWQy+10SheIb2pEw5J48Q=
 =W42y
 -----END PGP SIGNATURE-----

Merge tag 'phy-fixes-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy

Pull phy fixes from Vinod Koul:
 "A few core API fixes for devm calls and bunch of driver fixes as
  usual:

   - devm_phy_xxx fixes for few APIs in the phy core

   - qmp driver register name config

   - init sequence fix for usb driver

   - rockchip driver setting drvdata correctly in samsung hdptx and
     reset fix for naneng combophy

   - regulator dependency fix for mediatek hdmi driver

   - overflow assertion fix for stm32 driver"

* tag 'phy-fixes-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: mediatek: phy-mtk-hdmi: add regulator dependency
  phy: freescale: fsl-samsung-hdmi: Fix 64-by-32 division cocci warnings
  phy: core: Fix an OF node refcount leakage in of_phy_provider_lookup()
  phy: core: Fix an OF node refcount leakage in _of_phy_get()
  phy: core: Fix that API devm_phy_destroy() fails to destroy the phy
  phy: core: Fix that API devm_of_phy_provider_unregister() fails to unregister the phy provider
  phy: core: Fix that API devm_phy_put() fails to release the phy
  phy: rockchip: samsung-hdptx: Set drvdata before enabling runtime PM
  phy: stm32: work around constant-value overflow assertion
  phy: qcom-qmp: Fix register name in RX Lane config of SC8280XP
  phy: rockchip: naneng-combphy: fix phy reset
  phy: usb: Toggle the PHY power during init
2024-12-26 10:39:57 -08:00
Linus Torvalds
ab8beb2047 chrome platform changes for 6.13-rc5
* Fixes
 
   - Fix wrong product names for early Framework Laptops.
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYIADEWIQS0yQeDP3cjLyifNRUrxTEGBto89AUCZ2tngRMcdHp1bmdiaUBr
 ZXJuZWwub3JnAAoJECvFMQYG2jz0Gm0BANRe42/WvkEN3VgSLGrPbw4ldqGGZmcC
 xBj9A8Pr/ik/AQCNA5q++YW5gN1iVuS3p5X0lUHQTisqRUMWQphwTy26Ag==
 =G2JQ
 -----END PGP SIGNATURE-----

Merge tag 'chrome-platform-for-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform fix from Tzung-Bi Shih:

 - Fix wrong product names for early Framework Laptops

* tag 'chrome-platform-for-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  platform/chrome: cros_ec_lpc: fix product identity for early Framework Laptops
2024-12-26 10:35:13 -08:00
Pavel Begunkov
e33ac68e5e io_uring/sqpoll: fix sqpoll error handling races
BUG: KASAN: slab-use-after-free in __lock_acquire+0x370b/0x4a10 kernel/locking/lockdep.c:5089
Call Trace:
<TASK>
...
_raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162
class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline]
try_to_wake_up+0xb5/0x23c0 kernel/sched/core.c:4205
io_sq_thread_park+0xac/0xe0 io_uring/sqpoll.c:55
io_sq_thread_finish+0x6b/0x310 io_uring/sqpoll.c:96
io_sq_offload_create+0x162/0x11d0 io_uring/sqpoll.c:497
io_uring_create io_uring/io_uring.c:3724 [inline]
io_uring_setup+0x1728/0x3230 io_uring/io_uring.c:3806
...

Kun Hu reports that the SQPOLL creating error path has UAF, which
happens if io_uring_alloc_task_context() fails and then io_sq_thread()
manages to run and complete before the rest of error handling code,
which means io_sq_thread_finish() is looking at already killed task.

Note that this is mostly theoretical, requiring fault injection on
the allocation side to trigger in practice.

Cc: stable@vger.kernel.org
Reported-by: Kun Hu <huk23@m.fudan.edu.cn>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/0f2f1aa5729332612bd01fe0f2f385fd1f06ce7c.1735231717.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-12-26 10:02:40 -07:00
Ming Lei
75cd4005da ublk: detach gendisk from ublk device if add_disk() fails
Inside ublk_abort_requests(), gendisk is grabbed for aborting all
inflight requests. And ublk_abort_requests() is called when exiting
the uring context or handling timeout.

If add_disk() fails, the gendisk may have been freed when calling
ublk_abort_requests(), so use-after-free can be caused when getting
disk's reference in ublk_abort_requests().

Fixes the bug by detaching gendisk from ublk device if add_disk() fails.

Fixes: bd23f6c2c2 ("ublk: quiesce request queue when aborting queue")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20241225110640.351531-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-12-26 06:42:55 -07:00
Conor Dooley
49e1f0fd0d i2c: microchip-core: fix "ghost" detections
Running i2c-detect currently produces an output akin to:
    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         08 -- 0a -- 0c -- 0e --
10: 10 -- 12 -- 14 -- 16 -- UU 19 -- 1b -- 1d -- 1f
20: -- 21 -- 23 -- 25 -- 27 -- 29 -- 2b -- 2d -- 2f
30: -- -- -- -- -- -- -- -- 38 -- 3a -- 3c -- 3e --
40: 40 -- 42 -- 44 -- 46 -- 48 -- 4a -- 4c -- 4e --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- 62 -- 64 -- 66 -- 68 -- 6a -- 6c -- 6e --
70: 70 -- 72 -- 74 -- 76 --

This happens because for an i2c_msg with a len of 0 the driver will
mark the transmission of the message as a success once the START has
been sent, without waiting for the devices on the bus to respond with an
ACK/NAK. Since i2cdetect seems to run in a tight loop over all addresses
the NAK is treated as part of the next test for the next address.

Delete the fast path that marks a message as complete when idev->msg_len
is zero after sending a START/RESTART since this isn't a valid scenario.

CC: stable@vger.kernel.org
Fixes: 64a6f1c498 ("i2c: add support for microchip fpga i2c controllers")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20241218-outbid-encounter-b2e78b1cc707@spud
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2024-12-26 01:54:47 +01:00
Conor Dooley
9a8f9320d6 i2c: microchip-core: actually use repeated sends
At present, where repeated sends are intended to be used, the
i2c-microchip-core driver sends a stop followed by a start. Lots of i2c
devices must not malfunction in the face of this behaviour, because the
driver has operated like this for years! Try to keep track of whether or
not a repeated send is required, and suppress sending a stop in these
cases.

CC: stable@vger.kernel.org
Fixes: 64a6f1c498 ("i2c: add support for microchip fpga i2c controllers")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20241218-football-composure-e56df2461461@spud
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2024-12-26 01:54:47 +01:00
Carlos Song
e0cec36319 i2c: imx: add imx7d compatible string for applying erratum ERR007805
Compatible string "fsl,imx7d-i2c" is not exited at i2c-imx driver
compatible string table, at the result, "fsl,imx21-i2c" will be
matched, but it will cause erratum ERR007805 not be applied in fact.

So Add "fsl,imx7d-i2c" compatible string in i2c-imx driver to apply
the erratum ERR007805(https://www.nxp.com/docs/en/errata/IMX7DS_3N09P.pdf).

"
ERR007805 I2C: When the I2C clock speed is configured for 400 kHz,
the SCL low period violates the I2C spec of 1.3 uS min

Description: When the I2C module is programmed to operate at the
maximum clock speed of 400 kHz (as defined by the I2C spec), the SCL
clock low period violates the I2C spec of 1.3 uS min. The user must
reduce the clock speed to obtain the SCL low time to meet the 1.3us
I2C minimum required. This behavior means the SoC is not compliant
to the I2C spec at 400kHz.

Workaround: To meet the clock low period requirement in fast speed
mode, SCL must be configured to 384KHz or less.
"

"fsl,imx7d-i2c" already is documented in binding doc. This erratum
fix has been included in imx6_i2c_hwdata and it is the same in all
I.MX6/7/8, so just reuse it.

Fixes: 39c025721d ("i2c: imx: Implement errata ERR007805 or e7805 bus frequency limit")
Cc: stable@vger.kernel.org # v5.18+
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Fixes: 39c025721d ("i2c: imx: Implement errata ERR007805 or e7805 bus frequency limit")
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20241218044238.143414-1-carlos.song@nxp.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2024-12-25 23:45:05 +01:00
Stefan Eichenberger
768776dd4e i2c: imx: fix missing stop condition in single-master mode
A regression was introduced with the implementation of single-master
mode, preventing proper stop conditions from being generated. Devices
that require a valid stop condition, such as EEPROMs, fail to function
correctly as a result.

The issue only affects devices with the single-master property enabled.

This commit resolves the issue by re-enabling I2C bus busy bit (IBB)
polling for single-master mode when generating a stop condition. The fix
further ensures that the i2c_imx->stopped flag is cleared at the start
of each transfer, allowing the stop condition to be correctly generated
in i2c_imx_stop().

According to the reference manual (IMX8MMRM, Rev. 2, 09/2019, page
5270), polling the IBB bit to determine if the bus is free is only
necessary in multi-master mode. Consequently, the IBB bit is not polled
for the start condition in single-master mode.

Fixes: 6692694aca ("i2c: imx: do not poll for bus busy in single master mode")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20241216151829.74056-1-eichest@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2024-12-25 23:45:04 +01:00
Dustin L. Howett
dcd59d0d7d platform/chrome: cros_ec_lpc: fix product identity for early Framework Laptops
The product names for the Framework Laptop (12th and 13th Generation
Intel Core) are incorrect as of 62be134abf.

Fixes: 62be134abf ("platform/chrome: cros_ec_lpc: switch primary DMI data for Framework Laptop")
Cc: stable@vger.kernel.org # 6.12.x
Signed-off-by: Dustin L. Howett <dustin@howett.net>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20241224-platform-chrome-cros_ec_lpc-fix-product-identity-for-early-framework-laptops-v1-1-0d31d6e1d22c@howett.net
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2024-12-25 01:47:35 +00:00
Linus Torvalds
9b2ffa6148 Four minor fixes for NAND controller drivers (cleanup path, double
actions, and W=1 warning) as well as a cast to avoid overflows in an mtd
 device driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEE9HuaYnbmDhq/XIDIJWrqGEe9VoQFAmdq2NcACgkQJWrqGEe9
 VoSb7Qf9GxZ6/Eao4ziJD+N35en9TPd3XrQlI29JBfncX/+2eA2MyrJUo0PBLAkg
 M750h0JTRAa7qIMcgKN56wJ5BLSM25ob2y85HqBswBM44QlJb4bdAxTgj5w/uU26
 gYV2cOgzAnh7TwHtjovuaTAH12O+yEYr1fhtDEdPdYgJDSetK3MPBIHyFr7Cy4z/
 eXrEMpYRAU9Y1J/Af3UZFoZ79EhOaenZJ+VI2mtho+y+jgefGTYv7ABFl81pPVlW
 ezy7p5tF5esGzz8qELavT1J60jL15gDAVQ2VQ94flb7o7QN+nFjA+55xSriLCmKF
 co4S7r9KmysVykD3D3HsVTTfHXHDUg==
 =YZbm
 -----END PGP SIGNATURE-----

Merge tag 'mtd/fixes-for-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull mtd fixes from Miquel Raynal:
 "Four minor fixes for NAND controller drivers (cleanup path, double
  actions, and W=1 warning) as well as a cast to avoid overflows in an
  mtd device driver"

* tag 'mtd/fixes-for-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: rawnand: omap2: Fix build warnings with W=1
  mtd: rawnand: arasan: Fix missing de-registration of NAND
  mtd: rawnand: arasan: Fix double assertion of chip-select
  mtd: diskonchip: Cast an operand to prevent potential overflow
  mtd: rawnand: fix double free in atmel_pmecc_create_user()
2024-12-24 09:08:45 -08:00
Arnd Bergmann
17194c2998 phy: mediatek: phy-mtk-hdmi: add regulator dependency
The driver no longer builds when regulator support is unavailable:

arm-linux-gnueabi-ld: drivers/phy/mediatek/phy-mtk-hdmi.o: in function `mtk_hdmi_phy_register_regulators':
phy-mtk-hdmi.c:(.text.unlikely+0x3e): undefined reference to `devm_regulator_register'
arm-linux-gnueabi-ld: drivers/phy/mediatek/phy-mtk-hdmi-mt8195.o: in function `mtk_hdmi_phy_pwr5v_is_enabled':
phy-mtk-hdmi-mt8195.c:(.text+0x326): undefined reference to `rdev_get_drvdata'
arm-linux-gnueabi-ld: drivers/phy/mediatek/phy-mtk-hdmi-mt8195.o: in function `mtk_hdmi_phy_pwr5v_disable':
phy-mtk-hdmi-mt8195.c:(.text+0x346): undefined reference to `rdev_get_drvdata'
arm-linux-gnueabi-ld: drivers/phy/mediatek/phy-mtk-hdmi-mt8195.o: in function `mtk_hdmi_phy_pwr5v_enable':

Fixes: 49393b2da1cd ("phy: mediatek: phy-mtk-hdmi: Register PHY provided regulator")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20241213083056.2596499-1-arnd@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 20:38:53 +05:30
Adam Ford
739214dd1c phy: freescale: fsl-samsung-hdmi: Fix 64-by-32 division cocci warnings
The Kernel test robot returns the following warning:
 do_div() does a 64-by-32 division, please consider using div64_ul instead.

To prevent the 64-by-32 divsion, consolidate both the multiplication
and the do_div into one line which explicitly uses u64 sizes.

Fixes: 1951dbb41d ("phy: freescale: fsl-samsung-hdmi: Support dynamic integer")
Signed-off-by: Adam Ford <aford173@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412091243.fSObwwPi-lkp@intel.com/

Link: https://lore.kernel.org/r/20241215220555.99113-1-aford173@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 20:37:56 +05:30
Zijun Hu
a2d633cb14 phy: core: Fix an OF node refcount leakage in of_phy_provider_lookup()
For macro for_each_child_of_node(parent, child), refcount of @child has
been increased before entering its loop body, so normally needs to call
of_node_put(@child) before returning from the loop body to avoid refcount
leakage.

of_phy_provider_lookup() has such usage but does not call of_node_put()
before returning, so cause leakage of the OF node refcount.

Fix by simply calling of_node_put() before returning from the loop body.

The APIs affected by this issue are shown below since they indirectly
invoke problematic of_phy_provider_lookup().
phy_get()
of_phy_get()
devm_phy_get()
devm_of_phy_get()
devm_of_phy_get_by_index()

Fixes: 2a4c37016c ("phy: core: Fix of_phy_provider_lookup to return PHY provider for sub node")
Cc: stable@vger.kernel.org
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241213-phy_core_fix-v6-5-40ae28f5015a@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 19:55:37 +05:30
Zijun Hu
5ebdc6be16 phy: core: Fix an OF node refcount leakage in _of_phy_get()
_of_phy_get() will directly return when suffers of_device_is_compatible()
error, but it forgets to decrease refcount of OF node @args.np before error
return, the refcount was increased by previous of_parse_phandle_with_args()
so causes the OF node's refcount leakage.

Fix by decreasing the refcount via of_node_put() before the error return.

Fixes: b7563e2796 ("phy: work around 'phys' references to usb-nop-xceiv devices")
Cc: stable@vger.kernel.org
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241213-phy_core_fix-v6-4-40ae28f5015a@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 19:55:37 +05:30
Zijun Hu
4dc48c88fc phy: core: Fix that API devm_phy_destroy() fails to destroy the phy
For devm_phy_destroy(), its comment says it needs to invoke phy_destroy()
to destroy the phy, but it will not actually invoke the function since
devres_destroy() does not call devm_phy_consume(), and the missing
phy_destroy() call will cause that the phy fails to be destroyed.

Fortunately, the faulty API has not been used by current kernel tree.
Fix by using devres_release() instead of devres_destroy() within the API.

Fixes: ff76496347 ("drivers: phy: add generic PHY framework")
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241213-phy_core_fix-v6-3-40ae28f5015a@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 19:55:37 +05:30
Zijun Hu
c0b82ab95b phy: core: Fix that API devm_of_phy_provider_unregister() fails to unregister the phy provider
For devm_of_phy_provider_unregister(), its comment says it needs to invoke
of_phy_provider_unregister() to unregister the phy provider, but it will
not actually invoke the function since devres_destroy() does not call
devm_phy_provider_release(), and the missing of_phy_provider_unregister()
call will cause:

- The phy provider fails to be unregistered.
- Leak both memory and the OF node refcount.

Fortunately, the faulty API has not been used by current kernel tree.
Fix by using devres_release() instead of devres_destroy() within the API.

Fixes: ff76496347 ("drivers: phy: add generic PHY framework")
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/stable/20241213-phy_core_fix-v6-2-40ae28f5015a%40quicinc.com
Link: https://lore.kernel.org/r/20241213-phy_core_fix-v6-2-40ae28f5015a@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 19:55:37 +05:30
Zijun Hu
fe4bfa9b6d phy: core: Fix that API devm_phy_put() fails to release the phy
For devm_phy_put(), its comment says it needs to invoke phy_put() to
release the phy, but it will not actually invoke the function since
devres_destroy() does not call devm_phy_release(), and the missing
phy_put() call will cause:

- The phy fails to be released.
- devm_phy_put() can not fully undo what API devm_phy_get() does.
- Leak refcount of both the module and device for below typical usage:

  devm_phy_get(); // or its variant
  ...
  err = do_something();
  if (err)
      goto err_out;
  ...
  err_out:
  devm_phy_put(); // leak refcount here

  The file(s) affected by this issue are shown below since they have such
  typical usage.
  drivers/pci/controller/cadence/pcie-cadence.c
  drivers/net/ethernet/ti/am65-cpsw-nuss.c

Fix by using devres_release() instead of devres_destroy() within the API.

Fixes: ff76496347 ("drivers: phy: add generic PHY framework")
Cc: stable@vger.kernel.org
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Krzysztof Wilczyński <kw@linux.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241213-phy_core_fix-v6-1-40ae28f5015a@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 19:55:37 +05:30
Akhil R
ebc008699f dmaengine: tegra: Return correct DMA status when paused
Currently, the driver does not return the correct DMA status when a DMA
pause is issued by the client drivers. This causes GPCDMA users to
assume that DMA is still running, while in reality, the DMA is paused.

Return DMA_PAUSED for tx_status() if the channel is paused in the middle
of a transfer.

Fixes: ee17028009 ("dmaengine: tegra: Add tegra gpcdma driver")
Cc: stable@vger.kernel.org
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Link: https://lore.kernel.org/r/20241212124412.5650-1-kkartik@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 15:49:30 +05:30
Javier Carrasco
362f1bf98a dmaengine: mv_xor: fix child node refcount handling in early exit
The for_each_child_of_node() loop requires explicit calls to
of_node_put() to decrement the child's refcount upon early exits (break,
goto, return).

Add the missing calls in the two early exits before the goto
instructions.

Cc: stable@vger.kernel.org
Fixes: f7d12ef53d ("dma: mv_xor: add Device Tree binding")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20241011-dma_mv_xor_of_node_put-v1-1-3c2de819f463@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 15:45:01 +05:30
Joe Hattori
ccfa3131d4 dmaengine: fsl-edma: implement the cleanup path of fsl_edma3_attach_pd()
Current implementation of fsl_edma3_attach_pd() does not provide a
cleanup path, resulting in a memory leak. For example,
dev_pm_domain_detach() is not called after dev_pm_domain_attach_by_id(),
and the device link created with the DL_FLAG_STATELESS is not released
explicitly.

Therefore, provide a cleanup function fsl_edma3_detach_pd() and call it
upon failure. Also add a devm_add_action_or_reset() call with this
function after a successful fsl_edma3_attach_pd().

Fixes: 72f5801a4e ("dmaengine: fsl-edma: integrate v3 support")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20241221075712.3297200-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-12-24 14:55:57 +05:30
Lizhi Xu
98feccbf32 tracing: Prevent bad count for tracing_cpumask_write
If a large count is provided, it will trigger a warning in bitmap_parse_user.
Also check zero for it.

Cc: stable@vger.kernel.org
Fixes: 9e01c1b74c ("cpumask: convert kernel trace functions")
Link: https://lore.kernel.org/20241216073238.2573704-1-lizhi.xu@windriver.com
Reported-by: syzbot+0aecfd34fb878546f3fd@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=0aecfd34fb878546f3fd
Tested-by: syzbot+0aecfd34fb878546f3fd@syzkaller.appspotmail.com
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2024-12-23 21:59:15 -05:00