Commit graph

1382981 commits

Author SHA1 Message Date
Linus Torvalds
76eeb9b8de Linux 6.17-rc5 2025-09-07 14:22:57 -07:00
Linus Torvalds
bd8f3bff4a i2c-for-6.17-rc5
- i801: drop superfluous WDT entry for Birch
 - rtl9300:
   - fix channel number check in probe
   - check data length boundaries in xfer
   - drop broken SMBus quick operation
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmi9ZK8ACgkQFA3kzBSg
 KbabcxAArF63fF63kaIYqAqWswnwuWX5i9PefOAuOxwRzwmEN8KMLHQd6yHm4PQ0
 r91FHHQrDhJz95ZGm8Bj5lkrE8j/9z3uXmavwXQl5sUH9rFZUXUK3zuIntNAC2FM
 ty9eFeNd+Y48ZpmxbedCFxNeo/hF6y9htNGXuv922yhtzLi57m1srMD1shbxKFNB
 cAQ9VqJRjBXOD2LEg6icwugWdUQOSpIbuDv+PmgQY47pUqaRsIJLYzyfEayJo3iI
 oKIvLT9NgIpUZwQOG6puCDcLAh74xcpjNCQE0lrYTo0U3gIwjTi+H3KipTiAE3Ov
 fzwz4bDO8iWgfqh6PTaoYBSvJBJv0NAYooRZ5YuvCWXq/aETL7t9eE/5tLg6y6oR
 kLQuhQa+n44rw8io/nNdfrmG548FHjLQ0Gk71tofwjMmAKauGTP4aeGkiM0gGlDk
 xAne6ftNRZTvkqbmj4deSabQHbOdvVOr24qlB4PRNNKWg2D7DYcgEpGXMwhMJXJj
 3tZoRIaCOJ5CTqZ7OT8i72h2RyQny6ia5IL2xII8bcToByVs8/CBRMESUPzd34QT
 8oAUiclOfSuhymK/LjYlOSk64UdJ54LTn4b7NUTSbdz0iMbf5D1FqFiXCw3GPw6d
 6CizqGXP00147eXyVicnxrzz5+JInoHL2hcE0a5+0EUJNOidHyM=
 =tRuZ
 -----END PGP SIGNATURE-----

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

Pull i2c fixes from Wolfram Sang:

 - i801: drop superfluous WDT entry for Birch

 - rtl9300:
    - fix channel number check in probe
    - check data length boundaries in xfer
    - drop broken SMBus quick operation

* tag 'i2c-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: rtl9300: remove broken SMBus Quick operation support
  i2c: rtl9300: ensure data length is within supported range
  i2c: rtl9300: fix channel number bound check
  i2c: i801: Hide Intel Birch Stream SoC TCO WDT
2025-09-07 12:30:31 -07:00
Linus Torvalds
2c3bac6085 - Remove a misplaced dma_free_coherent() call in altera_edac
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmi9b38ACgkQEsHwGGHe
 VUpQxQ/7BvyUXvvOaYJynom7ajT35wk/C83+03sB9Sli8UyihM9b5IbvPm/xr31W
 q/5xQKY7EbqSfD8pbPYAU1WHQb/mGxGwueqPxKUG7IJVsNaD93XRJlLRy97UarQ4
 5pQQYtlG9wlAp0T/+INMsTF8OyKnkCTPzoUCtw0Yhpfgr15HWF1TctggjqR1zAkH
 CtlT33WP/X92U+lReLVTORtmD1+tHs6VV08BRBLhEVVT1rplLoDKdMJkwoCIQ2Ef
 62blEblJQKzGF09YbTWKbxgXtgO3mKU8bznzxssbFoqtpzNDx9EWS5RGYg0wwnAn
 CC8Yspu5JkDVZY9G9K98EUMZko9pJwUb/FVtsrL4h9INVxT3Ug0+H0ua5EiQlfBt
 IIvvI2qyGw4RJbv6DwZJedS7kBRIJptloAXIOHoLXSbwwiTvIxvdFF6SfyAd4g4L
 TTztHFl9u1QDf7j3myMcG117KfqCK+yHA+9B9u6eIwCWyML8eSiljY0sb3hWmQyT
 qRj3GZAHB2JyBm7ytgQEv6pH4+Wi9gpKcG0U3Hz9YWdv4EJyAw/0m8YiylGTI2VS
 ULXtbGWpj/VvZnIZqNJEklQWVyJIh6Snv5tvn4H+5Fe/p5enyL/hfB3ZX4AbesTm
 I+Trr5CYPJB1tG1srgE7ngMhF/p9lTagtxAE+O/aqzEtUquZVF4=
 =xGtK
 -----END PGP SIGNATURE-----

Merge tag 'edac_urgent_for_v6.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras

Pull EDAC fix from Borislav Petkov:

 - Remove a misplaced dma_free_coherent() call in altera_edac

* tag 'edac_urgent_for_v6.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  EDAC/altera: Delete an inappropriate dma_free_coherent() call
2025-09-07 08:41:32 -07:00
Linus Torvalds
6ab41fca2e Fix a severe slowdown regression in the timer vDSO code related
to the while() loop in __iter_div_u64_rem(), when the AUX-clock
 is enabled.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmi9XZURHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1gVzg/+N3T4qL8Vi3HwOzN862EqmVdaEauAVkQU
 vlIxFbUX26KHmwoSYpsVlaswhONMa6tkNEz3zeOfECrK6SAIg/9SGuk/1bRqERCc
 4KX3g0S0b7qfC7VJmjsmswXmxM9MrXLY5dx/XzhbACpGVoTJAMLlXL0OVwS361fP
 VOH4zSRCPUl+IbTJ6CkVQKZYWZAXxDuxBaSAsMaUz2QMZck6ikGOKP7CT9se0Fk5
 Rve7bC0Wy2vuUfchCIagSE9U28rf7HDawqJVEOygtRQm/Hl7yKSUxaHO5LdSI7c/
 k7mCoZkdyqj3Pdbe26CFSyvGdNJ+gHIhOSzaO43kHTf+bpgW/WBWm6DLjGWl8eKP
 EAW7QMkFoQaNWhSUbPwOR68R7fR3CsvmU1SOXufIRVKjuDy+246gu6y1nvJFr3RS
 BQyBPUh3qAJUoJj00nvjxtLB9p0pI2C+0ml7GTWEX3Ao8Y7rPPKh8yR2CvIhdmI4
 Oo4/vRtcs9NGYKzSu7gknYSkxITsjfEInCkmdsDVQ503QuUAgL653z8rjUIfTIti
 72fJ3pqVUyJuv9xyRkzQcavyZtU/l8uSfMNzgmHen8zmPjKA6rXg+BiuhP4uQ10W
 Wxw2s0cP3RgvuL3+y9oQHq3VHJ4JfdNVOKVssd97zCvmwFKCOXxi+0eKCy9ELQPq
 nNpuOC/9API=
 =5NRx
 -----END PGP SIGNATURE-----

Merge tag 'timers-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "Fix a severe slowdown regression in the timer vDSO code related to the
  while() loop in __iter_div_u64_rem(), when the AUX-clock is enabled"

* tag 'timers-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  vdso/vsyscall: Avoid slow division loop in auxiliary clock update
2025-09-07 08:29:44 -07:00
Linus Torvalds
b7369eb731 Fix an 'allocation from atomic context' regression in the futex vmalloc
variant.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmi9WmkRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1h4ww/9FnZ2elqxUG2kfzmDMwMCEA+KDyVIfqLI
 DzNqB0oFOgHO1xcWx/DLWItWIycH/+XhwcQUpCRcBlrG1pzaRqrbD0ioYw0SZRFo
 JbNRIQVjPBKa72vcPUd5et1cJB0iB7irUEhEPDPxkQ5BeIQOwayLF/DSz4IsKvde
 os9W9D2QcXk/YlOvbT+eRMmkDCSrAeAufz7RzcoPgzBvtGAWZEyCaBBjWXiuE2Au
 T05aXf6y35/QPB+pq7+aLxaqP97Auj2ebmCSB7iKGq1XCYXqCFmo4vQzAU6zZgkK
 hriO3+YL1wgN524bWaGXPRm87zcCmLVOXFJXe0wbTm/9w3CWmMUE+LEhfEAM+9n9
 IZpoAEL540P3/ijYFxpie4GAz+ZjttUwLvh8f5xaM/2jPUq8bUXakR6dt5U5h3YA
 n4FG2/K215R3s9+wYV2KpNQ0gUqZn7EmqfMAkQ1N09rsW571ExUKWdrEr61TUOnx
 BTwC0nOti/M97sOHjajG/ylBmRaswc6mwiLVlVy3Gvi/kzAqjAVe+cRJnNKSd7hd
 kIUKUiPWrI4eSWi+0gmW0Xo5RcyEbMNf4iVGvlZ6aM5zoKjZo72TGPcqapxbaW6m
 hRRsFJdlXmBBOxKhB+Ne0EZIqQzk9ZK8tknN5voXp1UsupanubwS7H3YYppljCxg
 VdlccxGizuI=
 =rQLp
 -----END PGP SIGNATURE-----

Merge tag 'locking-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Ingo Molnar:
 "Fix an 'allocation from atomic context' regression in the futex
  vmalloc variant"

* tag 'locking-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Move futex_hash_free() back to __mmput()
2025-09-07 08:26:28 -07:00
Linus Torvalds
6a8a34a56a Fix regression where PERF_EVENT_IOC_REFRESH counters
miss a PMU-stop.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmi9T3QRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1gkjhAAljiQ9y7DBlxWonRPstqKy1AYY7ndn+Jl
 CMgvflxE5NzI2IKqu7k642KCeb1UcL3Jpuqx+ywZCn5TZGgQ1haGhU7B8aufbMPc
 tcUx1LyrANhnRc0baBo5mPly9a1muV+bKNeA6Qa7fOQlI6R8dkFw2NQ+veN0bXCl
 2tarzNcnwCjUu0zat8xlgxTo94P49reW/A/SgTlXBBFmHCezzDh348FYgWzFJ9iw
 3Ki0BDd53z6p9uvTVSIxvPSVjhKAGVCX+zYJNcIOlBHnEe2yV0FYuGJGlEM7Vr2z
 jCd7MuUQ+kxtUmRLQGMZntSHjweseuOyJvx04rpVvX4I7tC7BgAZqeepw6pYV9ay
 OBIx1w+mYgI9gKHQUbYagETUBBPkofEABotQ46QD3Ih5zT/lwUbHy3JPj7bXt0nm
 qrpEognULUlJkwULzUcnBRs03nf72U1yZYNKL/gYw3rEM+EKek5UburmBXcOJa8S
 33FK9vyEWnkZaSJZ//KoMIirjZqwAK1s/nxuxTp6ZjN0vh3VQld1GLmOKgtYJNEK
 g8/yUa0EXGEjsRZccPoJkRqoX4tHdEj6cOBFDuTvT+Ps6Wj4S30QTkfWyDltcyWT
 ziaP9fWxPkXS68DSHlx3Em0yIVU76f2dhZDZnJ2sODkuSLi+c0yBcy1lXeYJrkOj
 m9XlTj72KkY=
 =p8YX
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf event fix from Ingo Molnar:
 "Fix regression where PERF_EVENT_IOC_REFRESH counters miss a PMU-stop"

* tag 'perf-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix the POLL_HUP delivery breakage
2025-09-07 08:24:20 -07:00
Linus Torvalds
00e6982822 Several RISC-V fixes for v6.17-rc5:
- An LTO fix for clang when building with CONFIG_CMODEL_MEDLOW
 
 - A fix for ACPI CPPC CSR read/write return values
 
 - Several fixes for incorrect access widths in thread_info.cpu reads
 
 - A fix for an issue in __put_user_nocheck() that was causing the glibc
   tst-socket-timestamp test to fail
 
 - A fix to initialize struct kexec_buf records in several kexec-related
   functions, which were generating UBSAN warnings
 
 - Two fixes for sparse warnings
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEElRDoIDdEz9/svf2Kx4+xDQu9KksFAmi7X/YACgkQx4+xDQu9
 KkvvqRAAnZwgWgOJYPSrlpoxZ/uk/J8tU5ULsdkEs/l79Yl1geCk/Jh7xGJo4ROI
 HvSZPC4s4D7MPtXkV7VFwqAVl1betNAvTB13eIkmLrMHuDoh9EqBbG3CBvPeKY+l
 I0eRp5uSGGIccdLFaTqmO+IHp6SiCj6xTshUme8TT5+UuDdDiducucDtNUSveYNI
 ehRyuNR6Kw7vATnQHOqwnbHgAxA8mtzFjJVvd/C89C79B6D965+urN+tPhGoYBe0
 R9zEhxKPdtsnE0KZfE2sNt7q9V59O7Nsl9Q2YjXY3q3t7xPeEyhDMnYrK7XJ3cRj
 VRy0UkF233WKbmD8jne6p/BVw1nC/ktK8a/j6ZiXK61WhuJviv52LZIbhswq4/R/
 ssI55ne0WkDS2VtmiNibGRP8tBuiajqmjMiE83o620Q5zHt4fA0fQN2SbBj5P441
 CprhRCCxOLdczQIZWnZx8aYJuPYKbFaoVz+YCGZD9hN1TzKKO1K3eshVym/Jr6K4
 Ez2CMJXVCycy5vlwOeQqIEEVsnZ43tvXS+O0wc9bFVP27JVXNmN0geU79S0acw8z
 3XOP8LtlY37Uxz0O2cakygVL859WpDbTJe5ECi2L+m57XXXFOVqa1yIF8+/kG8+B
 lB3dOwWjCiR1hwNHRxon8CWvCmUBaHRwYmCTmMpSRs53mHhyRpE=
 =o1+b
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:

 - LTO fix for clang when building with CONFIG_CMODEL_MEDLOW

 - Fix for ACPI CPPC CSR read/write return values

 - Several fixes for incorrect access widths in thread_info.cpu reads

 - Fix an issue in __put_user_nocheck() that was causing the glibc
   tst-socket-timestamp test to fail

 - Initialize struct kexec_buf records in several kexec-related
   functions, which were generating UBSAN warnings

 - Two fixes for sparse warnings

* tag 'riscv-for-linus-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: Fix sparse warning about different address spaces
  riscv: Fix sparse warning in __get_user_error()
  riscv: kexec: Initialize kexec_buf struct
  riscv: use lw when reading int cpu in asm_per_cpu
  riscv, bpf: use lw when reading int cpu in bpf_get_smp_processor_id
  riscv, bpf: use lw when reading int cpu in BPF_MOV64_PERCPU_REG
  riscv: uaccess: fix __put_user_nocheck for unaligned accesses
  riscv: use lw when reading int cpu in new_vmalloc_check
  ACPI: RISC-V: Fix FFH_CPPC_CSR error handling
  riscv: Only allow LTO with CMODEL_MEDANY
2025-09-07 08:15:56 -07:00
Linus Torvalds
b236920731 Rust fixes for v6.17 (2nd)
Toolchain and infrastructure:
 
  - Two changes to prepare for the future Rust 1.91.0 release (expected
    2025-10-30, currently in nightly): a target specification format
    change and a renamed, soon-to-be-stabilized 'core' function.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAmi8ciYACgkQGXyLc2ht
 IW3Bdg/9G07hHjmW0TR+V7AExNTqaZKdCxY//1lFeIuiIIew/tasqqbMCzv6KPi0
 UL/yk4f4bBp5oklRGxzvu5DKG31XCe5i1izML3zQ2Y04Klkj3lcfAG3u05OEhPZm
 woelfv/s3Umy1Gl5xV2QfiVrocRfWlZvsTP/K+ho05FKhM476XjErn8p8U1U3tjA
 KbB+EBKV5reZ14gMDwjCN5BnMpddMQleifaEX/4oRwNfw3zzKDcqB34ojOXjVcrS
 0GfapPCx64FNHxSeHADQ2O9mzOSxT5cTEzcH9JBFU+p8owmjOImvvcPoYKFOn4My
 btQeVzoCxeDwmLBrV8peR3nQHEwjxFuWvyhBg0SQy+51DIzhPJZdy/Z8RsrSywnH
 qoirudXd/rchvUTk/dNxQC6NORuY1IGGi2uJAs4ZRrmC6UqbxjUdB08cyVY4gFj0
 H3VMVaWlVWIGsPATrA2Oh0D1wsJBDYynf1oyG8R1NyYu4vCpYKMBAyJlVGlrGgq6
 H+fU8BqV+LmXH9ogtk0vhT7sK2dHGSA64JR3q1ralOlQip1CsXVeaN9/B+wfjo+i
 dL1qwJXkii0yxyVElHTbnugxI60hR2cgkXRnDMgJu5fBPGDdebOGtB1xxDwLnCjH
 3yNiU1Eyyer/NbsqxO9ylYPvHeg4RXETHoK0gk+/jyyR0ryfbtE=
 =j/MW
 -----END PGP SIGNATURE-----

Merge tag 'rust-fixes-6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull rust fixes from Miguel Ojeda:

 - Two changes to prepare for the future Rust 1.91.0 release (expected
   2025-10-30, currently in nightly): a target specification format
   change and a renamed, soon-to-be-stabilized 'core' function.

* tag 'rust-fixes-6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  rust: support Rust >= 1.91.0 target spec
  rust: use the new name Location::file_as_c_str() in Rust >= 1.91.0
2025-09-06 12:33:09 -07:00
Wolfram Sang
d035b4baeb i2c-host-fixes for v6.17-rc5
- i801: fix device IDs
 - in rtl9300:
   - fix channel number check in probe
   - check data length boundaries in xfer
   - drop unsupported SMBus quick operation
 -----BEGIN PGP SIGNATURE-----
 
 iIwEABYKADQWIQScDfrjQa34uOld1VLaeAVmJtMtbgUCaLuKDhYcYW5kaS5zaHl0
 aUBrZXJuZWwub3JnAAoJENp4BWYm0y1uWmkA/jMAbFFw08uYemeR7iM8rEfVHP1y
 gsGZ5QUoXnBx5YlDAP4qOQ7YUJaquMwg+/USrXlAcVWI4AvVnhJacFoB5m4BBg==
 =5bas
 -----END PGP SIGNATURE-----

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

i2c-host-fixes for v6.17-rc5

- i801: fix device IDs
- in rtl9300:
  - fix channel number check in probe
  - check data length boundaries in xfer
  - drop unsupported SMBus quick operation
2025-09-06 10:17:35 +02:00
Linus Torvalds
d1d10cea08 perf-tools fixes for v6.17-rc5
This series contains fixes for use-after-free resulted in segfaults
 after merging the bpf tree.  Also a couple of build and test fixes.
 
 Signed-off-by: Namhyung Kim <namhyung@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSo2x5BnqMqsoHtzsmMstVUGiXMgwUCaLtFZAAKCRCMstVUGiXM
 g7OFAP9F6M4Cpri9cxmbDyr188w85n+l6QC/Rjabardgn6NoEAEAovtNCO/0jEQ0
 pUpYgMX3OCn+ARZGOR6vuJTSIlzj8gg=
 =G7Fh
 -----END PGP SIGNATURE-----

Merge tag 'perf-tools-fixes-for-v6.17-2025-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools fixes from Namhyung Kim:
 "Fixes for use-after-free that resulted in segfaults after merging the
  bpf tree.

  Also a couple of build and test fixes"

* tag 'perf-tools-fixes-for-v6.17-2025-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
  perf symbol-elf: Add support for the block argument for libbfd
  perf test: Checking BPF metadata collection fails on version string
  perf tests: Fix "PE file support" test build
  perf bpf-utils: Harden get_bpf_prog_info_linear
  perf bpf-utils: Constify bpil_array_desc
  perf bpf-event: Fix use-after-free in synthesis
2025-09-05 15:01:46 -07:00
Alexandre Ghiti
a03ee11b8f riscv: Fix sparse warning about different address spaces
We did not propagate the __user attribute of the pointers in
__get_kernel_nofault() and __put_kernel_nofault(), which results in
sparse complaining:

>> mm/maccess.c:41:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got unsigned long long [usertype] * @@
   mm/maccess.c:41:17: sparse:     expected void const [noderef] __user *from
   mm/maccess.c:41:17: sparse:     got unsigned long long [usertype] *

So fix this by correctly casting those pointers.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508161713.RWu30Lv1-lkp@intel.com/
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: f6bff7827a ("riscv: uaccess: use 'asm_goto_output' for get_user()")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Cyril Bur <cyrilbur@tenstorrent.com>
Link: https://lore.kernel.org/r/20250903-dev-alex-sparse_warnings_v1-v1-2-7e6350beb700@rivosinc.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:33:52 -06:00
Alexandre Ghiti
fef7ded169 riscv: Fix sparse warning in __get_user_error()
We used to assign 0 to x without an appropriate cast which results in
sparse complaining when x is a pointer:

>> block/ioctl.c:72:39: sparse: sparse: Using plain integer as NULL pointer

So fix this by casting 0 to the correct type of x.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508062321.gHv4kvuY-lkp@intel.com/
Fixes: f6bff7827a ("riscv: uaccess: use 'asm_goto_output' for get_user()")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Cyril Bur <cyrilbur@tenstorrent.com>
Link: https://lore.kernel.org/r/20250903-dev-alex-sparse_warnings_v1-v1-1-7e6350beb700@rivosinc.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:33:44 -06:00
Breno Leitao
95c54cd9c7 riscv: kexec: Initialize kexec_buf struct
The kexec_buf structure was previously declared without initialization.
commit bf454ec31a ("kexec_file: allow to place kexec_buf randomly")
added a field that is always read but not consistently populated by all
architectures. This un-initialized field will contain garbage.

This is also triggering a UBSAN warning when the uninitialized data was
accessed:

	------------[ cut here ]------------
	UBSAN: invalid-load in ./include/linux/kexec.h:210:10
	load of value 252 is not a valid value for type '_Bool'

Zero-initializing kexec_buf at declaration ensures all fields are
cleanly set, preventing future instances of uninitialized memory being
used.

Fixes: bf454ec31a ("kexec_file: allow to place kexec_buf randomly")
Signed-off-by: Breno Leitao <leitao@debian.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250827-kbuf_all-v1-2-1df9882bb01a@debian.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:31:28 -06:00
Radim Krčmář
f4ea67a722 riscv: use lw when reading int cpu in asm_per_cpu
REG_L is wrong, because thread_info.cpu is 32-bit, not xlen-bit wide.
The struct currently has a hole after cpu, so little endian accesses
seemed fine.

Fixes: be97d0db5f ("riscv: VMAP_STACK overflow detection thread-safe")
Cc: stable@vger.kernel.org
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Link: https://lore.kernel.org/r/20250725165410.2896641-5-rkrcmar@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:31:24 -06:00
Radim Krčmář
8a16586fa7 riscv, bpf: use lw when reading int cpu in bpf_get_smp_processor_id
emit_ld is wrong, because thread_info.cpu is 32-bit, not xlen-bit wide.
The struct currently has a hole after cpu, so little endian accesses
seemed fine.

Fixes: 2ddec2c80b ("riscv, bpf: inline bpf_get_smp_processor_id()")
Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20250812090256.757273-4-rkrcmar@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:31:20 -06:00
Radim Krčmář
ad5348c765 riscv, bpf: use lw when reading int cpu in BPF_MOV64_PERCPU_REG
emit_ld is wrong, because thread_info.cpu is 32-bit, not xlen-bit wide.
The struct currently has a hole after cpu, so little endian accesses
seemed fine.

Fixes: 19c56d4e5b ("riscv, bpf: add internal-only MOV instruction to resolve per-CPU addrs")
Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Acked-by: Björn Töpel <bjorn@kernel.org>
Tested-by: Björn Töpel <bjorn@rivosinc.com> # QEMU
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250812090256.757273-3-rkrcmar@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:31:17 -06:00
Aurelien Jarno
1046791390 riscv: uaccess: fix __put_user_nocheck for unaligned accesses
The type of the value to write should be determined by the size of the
destination, not by the value itself, which may be a constant. This
aligns the behavior with x86_64, where __typeof__(*(__gu_ptr)) is used
to infer the correct type.

This fixes an issue in put_cmsg, which was only writing 4 out of 8
bytes to the cmsg_len field, causing the glibc tst-socket-timestamp test
to fail.

Fixes: ca1a66cdd6 ("riscv: uaccess: do not do misaligned accesses in get/put_user()")
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250724220853.1969954-1-aurelien@aurel32.net
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:30:48 -06:00
Radim Krčmář
e108c8a94f riscv: use lw when reading int cpu in new_vmalloc_check
REG_L is wrong, because thread_info.cpu is 32-bit, not xlen-bit wide.
The struct currently has a hole after cpu, so little endian accesses
seemed fine.

Fixes: 503638e0ba ("riscv: Stop emitting preventive sfence.vma for new vmalloc mappings")
Cc: stable@vger.kernel.org
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Link: https://lore.kernel.org/r/20250725165410.2896641-4-rkrcmar@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:30:45 -06:00
Linus Torvalds
d3e45016f7 SCSI fixes on 20250905
Obvious driver patch plus update to sr to add back rotational media
 flag since CDROMS are rotational.
 
 Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
 -----BEGIN PGP SIGNATURE-----
 
 iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCaLsNQCYcamFtZXMuYm90
 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishU2SAQCTyMtS
 9Nryoq5XAzzWc+exbXrhmCQmx7vovM+G0VXRWwD/eyj76Y4OTioBbCpSOpkiTmu8
 O2MxuKmUIyjbNm/gSBE=
 =rEsa
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Obvious driver patch plus update to sr to add back rotational media
  flag since CDROMS are rotational"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: sr: Reinstate rotational media flag
  scsi: lpfc: Fix buffer free/clear order in deferred receive path
2025-09-05 14:26:03 -07:00
Linus Torvalds
53b48f62f2 spi: Fixes for v6.17
The largest batch of fixes here is a series of fixes for the Freescale
 LPSPI driver which James Clark pulled out of their BSP while looking at
 support for the NXP S32G version of the controller.  The majority of
 this turned out to be bug fixes that affect existing systems with the
 actual S32G support being just a small quirk that would be unremarkable
 by itself, the whole series has had a good amount of testing and review
 and the individual patches are all pretty straightforward by themselves.
 
 We also have a few other driver specific fixes, including a relatively
 large but simple one for the Cadence QuadSPI driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmi7LmEACgkQJNaLcl1U
 h9AryAf8Df0+9Za/JDEfh1s8Ritm+0vbkrcSUPa0ZLRBVJP+upssBEEMwwLscrRI
 hommkOawazLfTisCil+dWwEjxoBQpXyTDs+TUkHNjUX8aYHuKIAWqLelBDTpGl1e
 ni3UynzuQ8QRDkQhWKQpV35Oi1DvfeHbux714mONw9bX4YCoZdMfsPv5eWYe2qqh
 J/Ukflvg1NrR/lrJDB/iQLzDfHbHiQDUEo5Dj22CqEvRIpQpQvoazTnA5eFyKoVd
 dKjSolY4UO8cQijaLBwzQvrvsvcWT/gZpQHjCgoVTwJO23H59ePtGTxpmZDEs1sm
 QyVqP/ieQq23jq15eKnhwBK6VpKLyQ==
 =/RyU
 -----END PGP SIGNATURE-----

Merge tag 'spi-fix-v6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "The largest batch of fixes here is a series of fixes for the Freescale
  LPSPI driver which James Clark pulled out of their BSP while looking
  at support for the NXP S32G version of the controller.

  The majority of this turned out to be bug fixes that affect existing
  systems with the actual S32G support being just a small quirk that
  would be unremarkable by itself, the whole series has had a good
  amount of testing and review and the individual patches are all pretty
  straightforward by themselves.

  We also have a few other driver specific fixes, including a relatively
  large but simple one for the Cadence QuadSPI driver"

* tag 'spi-fix-v6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-qpic-snand: unregister ECC engine on probe error and device remove
  spi: cadence-quadspi: Implement refcount to handle unbind during busy
  spi: spi-fsl-lpspi: Add compatible for S32G
  spi: spi-fsl-lpspi: Parameterize reading num-cs from hardware
  spi: spi-fsl-lpspi: Treat prescale_max == 0 as no erratum
  spi: spi-fsl-lpspi: Constify devtype datas
  dt-bindings: lpspi: Document support for S32G
  spi: spi-fsl-lpspi: Clear status register after disabling the module
  spi: spi-fsl-lpspi: Reset FIFO and disable module on transfer abort
  spi: spi-fsl-lpspi: Set correct chip-select polarity bit
  spi: spi-fsl-lpspi: Fix transmissions when using CONT
  spi: microchip-core-qspi: stop checking viability of op->max_freq in supports_op callback
2025-09-05 13:29:31 -07:00
Linus Torvalds
e5d5d23319 arm64 fixes:
- Incorrect __BITS_PER_LONG as 64 when compiling the compat vDSO
 
  - Unreachable PLT for ftrace_caller() in a module's .init.text
    following past reworking of the module VA range selection
 
  - Memory leak in the ACPI iort_rmr_alloc_sids() after a failed
    krealloc_array()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAmi7HWkACgkQa9axLQDI
 XvHFIA/9HzHNNmtcUYKL3wIEuzF9Qc+SQDpKU7bl4kuJK0o6YaVa+1oTXHdSnkWz
 yVAla4sXd9HW8k8He4S0ELMiYk0fcPmg61M1ci4Y/8keiHBvxhMPe1vHnRLPrPAo
 fc2g2R1F1uXkOZGQ3g0hlG3wz7SrjdJdPDBs5fD0eB3QDIge6DIm3WBQygX58lCE
 Px8nMH8FrUEZJYF05i8L0x9b2jzilXkvnN/ZLX8HqNpWdULFtYHCpLsRl2LmJ8+B
 QaVMyAoFORtI5jlmHFz5ZVpqljTUnEpIm9CTH0FGMQ5VraDVbuI8HEhygBRcUjQM
 r7oT3EIy6P+wAV/oJ95TbapEwOoIJxcu0YUAkluPKKXGFckvLlg2QV+xD4NgCOXv
 tDvakWNKaUOMR0o8BqS0zPDcHE94ndrw7akU3uiccimz2spNquE/vkiHQ1B4q8FJ
 A2HT9VqJE5VdApKVNIsQntiwxfnEbFwv7yDxNz4qZWgk3Zl1hLPOSZztywuQz2ws
 dbeNu1hM75xKuiTs3aRPJpTu1MnECqNSmrvqim/uJsyFPOqgtVHBoittT3/KiAsH
 12rE3EIKuJHoqpxli+9AJS30JYc0OWDfkvB2hBvPPHpWEkzbEXPR2hHXzIrj4puZ
 RLmuZCIg7sZniH3zRjdSHXivESmtWmbf1WAF3JwC7GIH3AYEKzY=
 =LUMm
 -----END PGP SIGNATURE-----

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

Pull arm64 fixes from Catalin Marinas:

 - Incorrect __BITS_PER_LONG as 64 when compiling the compat vDSO

 - Unreachable PLT for ftrace_caller() in a module's .init.text
   following past reworking of the module VA range selection

 - Memory leak in the ACPI iort_rmr_alloc_sids() after a failed
   krealloc_array()

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAMIC_FTRACE
  ACPI/IORT: Fix memory leak in iort_rmr_alloc_sids()
  arm64: uapi: Provide correct __BITS_PER_LONG for the compat vDSO
2025-09-05 13:11:10 -07:00
Linus Torvalds
730c1451fb audit/stable-6.17 PR 20250905
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEES0KozwfymdVUl37v6iDy2pc3iXMFAmi7AksUHHBhdWxAcGF1
 bC1tb29yZS5jb20ACgkQ6iDy2pc3iXMmaA/8ChtRoaZFLTFI7UTWmVo0aY7NDl77
 fqjwY1ZrPsqezLYt317LCJareQOfn1/NEc1Xxb7Caz6Z35eQPUDeUnd96zEarzDL
 4iYcZA1MJVO2jjnyj4lqVoSgkftQPN6qvga5osA9mMOQ24mNPAO5yZIVdzL/sekv
 ewosheC6spwFD26+/uWE00sdVRhtOnUPkLmelf4wyN0WX+lStTXozLpSW1Pr0FB1
 tZI/mjLyVmZ+YJtTMCMLhpM/hFIMymlSr7BZ7pO/G1w48OGzVBdUlS45bS5rMUIQ
 D/MdTB2YlkMOYFyRCgoSgxaFHGHf7F6MQO0J7y/hVu2QSvGoxneUaTIszpaj7rcg
 edaJKogA6DlXvauw32UQhjUTQetuppyFqAHQXsec/JVYGUJqAZWNdsThP86MGlim
 INwspptaBwOULg2OTYt/+jHblbhl8BI9ayC/S4lN89MCwszLYoFmjIo+mCf9qWfE
 uFsiyvvqoXaMKH/e4NkcUjT0AxzwAHF0DwU7Vh+apThOpdr7Qudr6meWEgJ+iRpO
 hhWrpyPAP1pann7VebwAqWs9iG97cuwARca4EWyuSy+i11qLQ19LwC/i5vfb58TJ
 Ozh9g01A65qWgA5/G14XWmN1oLYdWK+KqwmdTXtDgWXZ5hX3oMrlypRxbPxKIyVG
 PsEKU7GXjze/J1s=
 =g/UF
 -----END PGP SIGNATURE-----

Merge tag 'audit-pr-20250905' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit

Pull audit fix from Paul Moore:
 "A single small audit patch to fix a potential out-of-bounds read
  caused by a negative array index when comparing paths"

* tag 'audit-pr-20250905' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
  audit: fix out-of-bounds read in audit_compare_dname_path()
2025-09-05 12:35:25 -07:00
Linus Torvalds
c2f3b108c0 five smb3 client fixes
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmi6TgUACgkQiiy9cAdy
 T1GKNAwAwiUm61g8gGpJKN5yibpGitEF0NtZbUvdWbeySg5JM4MpkdkzAmHGOOw+
 0t+1Gr8J5KQFW25YWh8cuA5enrzuGBliTMfYpevh0q8zsF6GWvxr44mVSl2zUSRf
 PSQrgR4s2MKjGGpVlcdFjTJkC6De98BQffo/bQPVEuXmsN81PYDWAceO/0bFBK9J
 IY1nJxsMpkfo8/MrgO8W40PsH39jZCXiYNoisOVUpiAWKuwNber2jWrbsfrEFR7Z
 vRT2cuna2qgiXW7mEtdvcgO4srpjXJ1aZmTcaIszxljUgfKbeqAzplxq03XD5lBH
 UEFUIwAe993bEnZYmRIq9hTHeKdcR1wa5UJoM1B82BA7VsaWUwrl9EKV0qg+rKHd
 jvPKS1KpBOxhAnjcFF7N1w2gk5LCmeu5WS6f3/XlrOSPSnFzfIdigGanJpV60qPM
 pFIbLPCxXVt1TkPHe0cdy5pHPpQYBR/l1EuzLd1zJ8lFVSGkV78DlW0FudYA2OaO
 pg8zd8Kd
 =UcJl
 -----END PGP SIGNATURE-----

Merge tag '6.17-RC4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Fix two potential NULL pointer references

 - Two debugging improvements (to help debug recent issues) a new
   tracepoint, and minor improvement to DebugData

 - Trivial comment cleanup

* tag '6.17-RC4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: prevent NULL pointer dereference in UTF16 conversion
  smb: client: show negotiated cipher in DebugData
  smb: client: add new tracepoint to trace lease break notification
  smb: client: fix spellings in comments
  smb: client: Fix NULL pointer dereference in cifs_debug_dirs_proc_show()
2025-09-05 11:14:23 -07:00
Linus Torvalds
260aa8d5f0 hwmon fixes for v6.17-rc5
- ina238: Various value range fixes when writing limit attributes
 
 - mlxreg-fan: Prevent fans from getting stuck at 0 RPM
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmi7Fo8ACgkQyx8mb86f
 mYG1Hg/+JniJ+6QLJ7PFADv5WCX/HBRt9LtupFENjdn6uHBWUWsUSDVMKsNy6v5j
 ErPE0FitAg/fNSm++Bueb2bmfYYtE4YG5gMHIgsztIGL8j6kpUrafadkELaccKQD
 hB9XT0RDvQ92qVjbB0qG6/7YC2s1V+p6tpW4CwKG2349YHuQl8rpzo8IMLPkU7Ex
 6U/VuC6nCxKAYPwDHjKohMFoBZcu+hDnpLJqWB/wkk1ihlLVnZ10Clv8Vq4jVUn5
 2HKvwwvlTfEzhZ4E9cLEgJBOKmudZNGy+N6xjMlAqXWS3yH2lF6uP8dYl8xwDIi1
 2/PLpW2bp5fnZv8ZszQX1X66BWLjiRPFApOIAgeCUL/GpyLsZrB8CUpkD43dJKzw
 zPc7X9A0qRUuWtAfAlW81er4pwtoaJXHp+gwddkhgf1SzKQhFn4LE4DkeNRDZpIe
 Ig2j1ut2valRIBwNq6YOCqzf0NhSrDR8UsppmGHMt5tZzHbC78NMo0hSO7NFvEPO
 tUXFiKamlRGFx2QEVJvyYriFLyQp42mNisIwVMkyO+nSZ8tPiwQ/G/XMG/OvDlW6
 58tM87lJQEh20A+u/HzIEbuyniyqJs3y0U0NnmxYhJqas9/9eUYVgIZxd9GWWE5l
 i+BallpZ2jvP36Zpei69y3vymFeWWgLnxfderATbgB0387OIWbk=
 =scpq
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - ina238: Various value range fixes when writing limit attributes

 - mlxreg-fan: Prevent fans from getting stuck at 0 RPM

* tag 'hwmon-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (ina238) Correctly clamp power limits
  hwmon: (ina238) Correctly clamp shunt voltage limit
  hwmon: (ina238) Correctly clamp temperature
  hwmon: mlxreg-fan: Prevent fans from getting stuck at 0 RPM
2025-09-05 11:08:06 -07:00
Linus Torvalds
3d1e36499e gpio fixes for v6.17-rc5
- fix GPIO submenu regression in Kconfig
 - fix make clean under tools/gpio/
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmi64bAACgkQEacuoBRx
 13JQ+A/+K1JQDRO7nsXEOoYZI9Y/Afwf9qHYEHyCEXB1PnHZtJNTQGwlWLtQ1rXH
 tuuGPToKpYGLL2wL6NCD/z7S0rmTS7m8lDOS/4JWzYkamgk3byV0Yb7owc5KsZ4o
 sQTeGPz06lhgAD87c49efxJLowYFquEe6IpQ+9l+lfbF5gvCopfZMq3fqlSzAiap
 F0PvliEsx3+9YYWc+OR44zhKmZNKgA6qZXuLxVCbOekCgijCs4fl0caxcVhONHlD
 /cy5sj52CVuz6et6OKm2q01NbpanwGrvDb5nfw1YVNVNF4kc+YBpvQG8omgDcSxc
 4JuxCjTABTc4n+fvXChMgdJ0XeeRaKBpmdoFPR3D3xV/GK1rWFPFZ3U+ORhyqK4X
 sFAsClXYBzTRr5TiY4siKoaJPwWs3CA5pbhLhN0xQ+9IzKOtsenT8YQUR7ERbq5y
 Ni8skAaahWfD0utSjjOaZ5SwTUh1T19ZQ2899Pw3Gbh7VtyeC+MwkQhGmg0+2jw3
 qp0NXvXg3Ozr43IJgjWz4FBsWLdCnjr3mxTHLXmzZrTyW+3+cTyjsWdVptinfxRM
 ujo5v8mSh9RilBBFF4T92EnKilIHfdnXA7we7v19+9Zz9In2QEUmv57WWv79kION
 LXbhh05CIUcHsV4RnmikZzUX/thRwk6lz5OW4EfO7chbWWWPdhM=
 =D/dx
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix GPIO submenu regression in Kconfig

 - fix make clean under tools/gpio/

* tag 'gpio-fixes-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  tools: gpio: remove the include directory on make clean
  gpio: fix GPIO submenu in Kconfig
2025-09-05 10:33:46 -07:00
Linus Torvalds
dd6cbcc589 platform-drivers-x86 for v6.17-3
Fixes and New HW Support
 
 - acer-wmi: Stop using ACPI bitmap for platform profile choices
 
 - amd/hfi: Fix pcct_tbl leak
 
 - amd/pmc: Add TUXEDO IB Pro Gen10 AMD to spurious 8042 quirks
 
 - asus-wmi:
 
     - Fix registration races
 
     - Fix ROG button mapping, tablet mode on ASUS ROG Z13
 
     - Support more keys on ExpertBook B9
 
 - hp-wmi: Add support for Fn+P hotkey
 
 - intel/pmc: Add Bartlett Lake support
 
 - intel/power-domains: Use topology_logical_package_id() for package ID
 
 The following is an automated shortlog grouped by driver:
 
 acer-wmi:
  -  Stop using ACPI bitmap for platform profile choices
 
 amd: hfi:
  -  Fix pcct_tbl leak in amd_hfi_metadata_parser()
 
 amd/pmc:
  -  Add TUXEDO IB Pro Gen10 AMD to spurious 8042 quirks list
 
 asus-wmi:
  -  Fix racy registrations
  -  Fix ROG button mapping, tablet mode on ASUS ROG Z13
  -  map more keys on ExpertBook B9
  -  Remove extra keys from ignore_key_wlan quirk
 
 hp-wmi:
  -  Add support for Fn+P hotkey
 
 intel/pmc:
  -  Add Bartlett Lake support to intel_pmc_core
 
 intel: power-domains:
  -  Use topology_logical_package_id() for package ID
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCaLretwAKCRBZrE9hU+XO
 MaibAPoDQK7NrixtCvXnm4fmWqttGyTBl73uqoCXL2X8LsQwMAEAkqh319fCZrjx
 /4u7YThOXpLnK+PROV72YRRTeP6hRwY=
 =jtzK
 -----END PGP SIGNATURE-----

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

Pull x86 platform driver fixes from Ilpo Järvinen:

 - acer-wmi: Stop using ACPI bitmap for platform profile choices

 - amd/hfi: Fix pcct_tbl leak

 - amd/pmc: Add TUXEDO IB Pro Gen10 AMD to spurious 8042 quirks

 - asus-wmi:
     - Fix registration races
     - Fix ROG button mapping, tablet mode on ASUS ROG Z13
     - Support more keys on ExpertBook B9

 - hp-wmi: Add support for Fn+P hotkey

 - intel/pmc: Add Bartlett Lake support

 - intel/power-domains: Use topology_logical_package_id() for package ID

* tag 'platform-drivers-x86-v6.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86/intel: power-domains: Use topology_logical_package_id() for package ID
  platform/x86: acer-wmi: Stop using ACPI bitmap for platform profile choices
  platform/x86: hp-wmi: Add support for Fn+P hotkey
  platform/x86/intel/pmc: Add Bartlett Lake support to intel_pmc_core
  platform/x86: asus-wmi: Fix racy registrations
  platform/x86/amd/pmc: Add TUXEDO IB Pro Gen10 AMD to spurious 8042 quirks list
  platform/x86: asus-wmi: map more keys on ExpertBook B9
  platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13
  platform/x86: asus-wmi: Remove extra keys from ignore_key_wlan quirk
  platform/x86/amd: hfi: Fix pcct_tbl leak in amd_hfi_metadata_parser()
2025-09-05 10:28:48 -07:00
Linus Torvalds
e9eaca6bf6 block-6.17-20250905
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmi6xUEQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpqpwD/9mDqr7f4clwNaCgqxCVifLqiWGBHAyccXe
 CgRJzcqofTDiQh3upa0C5SL5qZCTeTfir6rTf3fn3wKLP0mns55xDBmbRwylsutE
 lenJbpvnPHi0/iJBgA4LpSL5IB+HsdQjKpmuYnavISlcGD8nMQZDk70h4iNu9baE
 0fbyON8BvlZwq5KXDRR0sdSeyLPL6z14PkC9yScm8kwee+o+koReTM/J7aMnkzLv
 0z2iibDIPyrSbHgPpV2dbAfSj+TLsuleJ3WG8cAvb3O03V91pPiLKrte5PBEaFV4
 Srs0+G0kszexfeEqODhDQaLUg3k6hRl41GVnOxrS0NccTCqMe9P7rRBTys4KU6y6
 fpDXYY9c1ehVyqFFDepPMSzqDa0XoBiQphblp5Yyxon2V6JK1bBQdu3eqieJyc8u
 eXiDNaY1IawdGRSY8cWFwSWQk8luXvmB3TtZCyFY3g3QwAJ9+OuTaqZECs8Lh8n/
 brHDb5Qij8R94DSH7HHwPZ7mEbmE+c4EBst7hruuaUVSq12XoYQFqDjyt3ino1ky
 z5OENc4fXD10+b8KK9yrOxj2uYUmiia1acCEy2T2svfaKQ/ZXrCU7b1dkA04d/oC
 +TA7MdSn597FLvButA+CC9oqapr9k217AhhEVCWbgY428ialeTtv5NBnOH6Ykawr
 narKcKzC1g==
 =WfWq
 -----END PGP SIGNATURE-----

Merge tag 'block-6.17-20250905' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - NVMe pull request via Keith
     - Fix protection information ref tag for device side gen/strip
       (Christoph)

 - MD pull request via Yu
     - fix data loss for writemostly in raid1 (Yu Kuai)
     - fix potentional data loss by skipping recovery (Li Nan)

* tag 'block-6.17-20250905' of git://git.kernel.dk/linux:
  md: prevent incorrect update of resync/recovery offset
  md/raid1: fix data lost for writemostly rdev
  nvme: fix PI insert on write
2025-09-05 10:25:57 -07:00
panfan
a7ed7b9d0e arm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAMIC_FTRACE
On arm64, it has been possible for a module's sections to be placed more
than 128M away from each other since commit:

  commit 3e35d303ab ("arm64: module: rework module VA range selection")

Due to this, an ftrace callsite in a module's .init.text section can be
out of branch range for the module's ftrace PLT entry (in the module's
.text section). Any attempt to enable tracing of that callsite will
result in a BRK being patched into the callsite, resulting in a fatal
exception when the callsite is later executed.

Fix this by adding an additional trampoline for .init.text, which will
be within range.

No additional trampolines are necessary due to the way a given
module's executable sections are packed together. Any executable
section beginning with ".init" will be placed in MOD_INIT_TEXT,
and any other executable section, including those beginning with ".exit",
 will be placed in MOD_TEXT.

Fixes: 3e35d303ab ("arm64: module: rework module VA range selection")
Cc: <stable@vger.kernel.org> # 6.5.x
Signed-off-by: panfan <panfan@qti.qualcomm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20250905032236.3220885-1-panfan@qti.qualcomm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2025-09-05 16:56:20 +01:00
Linus Torvalds
c8ed9b5c02 drm fixes for 6.17-rc5
scheduler:
 - fix race in unschedulable tracepoint
 
 bridge:
 - ti-sn65dsi86: fix REFCLK setting
 
 xe:
 - Fix incorrect migration of backed-up object to VRAM
 
 amdgpu:
 - UserQ fixes
 - MES 11 fix
 - eDP/LVDS fix
 - Fix non-DC audio clean up
 - Fix duplicate cursor issue
 - Fix error path in PSP init
 
 nouveau:
 - fix nonstall interrupt handling
 - fix race on fence vs irq emission
 - update MAINTAINERS entry
 
 ivpu:
 - prevent recovery work during device remove
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmi6YlIACgkQDHTzWXnE
 hr5fMg//ZorOaPj0uYEU6sdT3Vkke6vxOd+GQVBdSUDhW8x5BOM6anEj0uQobxOP
 qwTf9vy/LInr3ghqKc9B/hXaN/QkOCsbVvyuEXPUv1LhggLK94ThQcoY2zMkUbJP
 5NfKyFRpl2Z53RdjmBTZJ+6QOVbwy6kMG5AHE9CG4ZXNC11EHQZHXdj72tvysEQf
 TQlMWzTIZ6tgfBSqPjOSEs1ASeFYoS5KEJGiqCHXLvC2DbjY/71pUZCyvUQacygQ
 TU+h2j4oqNuTqN7ftDw7a6R3yPEIOThGHABaQrXsyZjfHabXkvrSVERXzpexAjXG
 14RInUCHNB9QbAyFOIjrGZhXneQCdy2+w37qYipkzfrVL8CN6Je565bMyZjmUW9i
 +Dys3vJXk2TMn+ymblQ8JkjkA8O6D5pYFFMS24AI0Sd3h6NeTFAnWXSS/Uz4dFdB
 NxEBDuOBkyRh8Hw1Bz/qOFrbECBz+/JU1qFUNoP4VeL0OlzZ7YrLMMFHQfiAV2RY
 Xv9ACyqiy/k/owJuJ/yWANWk3MzpGqz3aL7V3MQXfIUvyD0xMVqRMS3bBixCSf6F
 WlrWWlCVIprrUhhXnOBBZPca5764cZtsM+9wA1MoPed2IYnyFA8uHE1P2BxIOLjS
 fCeQNzOV6qU4aAp2UP58H0lYDpXEYfGuthF2xMDm/pmoSXO6whU=
 =LUUF
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2025-09-05' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly drm fixes roundup, nouveau has two fixes for fence/irq racing
  problems that should fix a bunch of instability in userspace.

  Otherwise amdgpu along with some single fixes to bridge, xe, ivpu.

  Looks about usual for this time in the release.

  scheduler:
   - fix race in unschedulable tracepoint

  bridge:
   - ti-sn65dsi86: fix REFCLK setting

  xe:
   - Fix incorrect migration of backed-up object to VRAM

  amdgpu:
   - UserQ fixes
   - MES 11 fix
   - eDP/LVDS fix
   - Fix non-DC audio clean up
   - Fix duplicate cursor issue
   - Fix error path in PSP init

  nouveau:
   - fix nonstall interrupt handling
   - fix race on fence vs irq emission
   - update MAINTAINERS entry

  ivpu:
   - prevent recovery work during device remove"

* tag 'drm-fixes-2025-09-05' of https://gitlab.freedesktop.org/drm/kernel:
  drm/amd/amdgpu: Fix missing error return on kzalloc failure
  drm/bridge: ti-sn65dsi86: fix REFCLK setting
  MAINTAINERS: Update git entry for nouveau
  drm/xe: Fix incorrect migration of backed-up object to VRAM
  drm/sched: Fix racy access to drm_sched_entity.dependency
  accel/ivpu: Prevent recovery work from being queued during device removal
  nouveau: Membar before between semaphore writes and the interrupt
  nouveau: fix disabling the nonstall irq due to storm code
  drm/amd/display: Clear the CUR_ENABLE register on DCN314 w/out DPP PG
  drm/amdgpu: drop hw access in non-DC audio fini
  drm/amd: Re-enable common modes for eDP and LVDS
  drm/amdgpu/mes11: make MES_MISC_OP_CHANGE_CONFIG failure non-fatal
  drm/amdgpu/sdma: bump firmware version checks for user queue support
2025-09-05 08:50:25 -07:00
Linus Torvalds
01c93aa01c Crypto library fixes for v6.17-rc5
Fix a regression caused by my commits that reimplemented the sha1,
 sha256, and sha512 crypto_shash algorithms on top of the library API.
 Specifically, the export_core and import_core methods stopped being
 supported, which broke some hardware offload drivers (such as qat)
 that recently started depending on these for fallback functionality.
 
 Later I'd like to make these drivers just use the library API for
 their fallback. Then these methods won't be needed anymore. But for
 now, this fixes the regression for 6.17.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQSacvsUNc7UX4ntmEPzXCl4vpKOKwUCaLpYrBQcZWJpZ2dlcnNA
 a2VybmVsLm9yZwAKCRDzXCl4vpKOK8ZfAQDbPYyJbAS4nFIZt8wulDdw8oyMvNl9
 gdo3pfJUzo/gKwEAqOLra0dEy6Bvj0HqW5C8GMtFZjKJ1NbgXs9nTMKw0gc=
 =yidx
 -----END PGP SIGNATURE-----

Merge tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux

Pull crypto library fixes from Eric Biggers:
 "Fix a regression caused by my commits that reimplemented the sha1,
  sha256, and sha512 crypto_shash algorithms on top of the library API.
  Specifically, the export_core and import_core methods stopped being
  supported, which broke some hardware offload drivers (such as qat)
  that recently started depending on these for fallback functionality.

  Later I'd like to make these drivers just use the library API for
  their fallback. Then these methods won't be needed anymore. But for
  now, this fixes the regression for 6.17"

* tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  crypto: sha512 - Implement export_core() and import_core()
  crypto: sha256 - Implement export_core() and import_core()
  crypto: sha1 - Implement export_core() and import_core()
2025-09-05 07:57:07 -07:00
Linus Torvalds
4e47e46718 PCMCIA fixes and cleanups for v6.18
A number of minor PCMCIA bugfixes and cleanups, including the removal of
 unused code paths.
 
 Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCgA5FiEEmgXaWKgmjrvkPhLCmpdgiUyNow0FAmi30PMbHGxpbnV4QGRv
 bWluaWticm9kb3dza2kubmV0AAoJEJqXYIlMjaMNke8P/1IpUvj+mdpi36r44Vt4
 E5D2IruivFTyj5GFMBcGf5CpDJTvwyDi9YcQjoNmfn0FjKfyVCmu9vn2zPK4clIN
 8bclmhOnK/7oEtVg0+hI7VzpMdJDUGJ3XrSio/gSVMlNK3fTitdzwnQqu8a55TLO
 ftD2ykeBdiEXmVmconeFUQhdCHL1Z9eMkpp5c56rzByPUiWKdP62luf2KuHt3wtm
 BzUyMiH4GPQXMwkXV9zKdynvKm6ohsA+sWCbgpgtcGdmrVsMtI9Qn308Y0SZQDu0
 lHaX9URC+E2jJlGzenKfxLI+mm2oqgdSGQyVW70VmvWjcRBuyf6HyhhftvwmQ+CD
 Q65TkDsd6Kji49JvevGUsGx1XXGUV9HrJJA/suGL/HEnh2hp44nUxApZ+T9RIrVZ
 hz75u8wm3fqtx7EJ8bsUiXhkjs90A78pq7N0ddyfkUFSzX2IJQAIzC83rixuEVYl
 azprcFDOq4rVcPWnioZzopfyZNFQ97Mg7wrLVfznNGeiIQPU4Ijph3L8Iuvw1oKr
 T/YjwAscILy+NzvMD3s0kwbshty2f8kiqLeZJ2VdQy4rQ/4iGnl3LYAPXYMSrgA2
 1bG+t0UhtJz1aCg1ysmoITl2kzaGyoXcOOw7ouLP2cIth8QjxCzSoPRJZTA7Dgwc
 qfwLDdOQHbFQB4ZJqsGvrNwY
 =bWPz
 -----END PGP SIGNATURE-----

Merge tag 'pcmcia-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux

Pull PCMCIA fixes and cleanups from Dominik Brodowski:
 "A number of minor PCMCIA bugfixes and cleanups, including the removal
  of unused code paths"

[ Dominik suggested this might be 6.18 material, but having looked
  through this, it looks appropriate early: minor trivial fixes and then
  one slightly bigger patch that removes dead code  - Linus ]

* tag 'pcmcia-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux:
  pcmcia: Add error handling for add_interval() in do_validate_mem()
  pcmcia: cs: Remove unused pcmcia_get_socket_by_nr
  pcmcia: omap: Add missing check for platform_get_resource
  pcmcia: Use str_off_on() and str_yes_no() helpers
  pcmcia: remove PCCARD_IODYN
  pcmcia: ds: Emphasize "really" epizeuxis
  pcmcia: Fix a NULL pointer dereference in __iodyn_find_io_region()
  pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch
2025-09-05 07:52:44 -07:00
Jens Axboe
743bf03094 Merge tag 'md-6.17-20250905' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into block-6.17
Pull MD fixes from Yu:

"- fix data loss for writemostly in raid1, by Yu Kuai;
 - fix potentional data lost by skipping recovery, by Li Nan;"

* tag 'md-6.17-20250905' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux:
  md: prevent incorrect update of resync/recovery offset
  md/raid1: fix data lost for writemostly rdev
2025-09-05 05:08:27 -06:00
Ian Rogers
ca81e74dc3 perf symbol-elf: Add support for the block argument for libbfd
James Clark caught that the BUILD_NONDISTRO=1 build with libbfd was
broken due to an update to the read_build_id function adding a
blocking argument. Add support for this argument by first opening the
file blocking or non-blocking, then switching from bfd_openr to
bfd_fdopenr and passing the opened fd. bfd_fdopenr closes the fd on
error and when bfd_close are called.

Reported-by: James Clark <james.clark@linaro.org>
Closes: https://lore.kernel.org/lkml/20250903-james-perf-read-build-id-fix-v1-2-6a694d0a980f@linaro.org/
Fixes: 2c369d91d0 ("perf symbol: Add blocking argument to filename__read_build_id")
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250904161731.1193729-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-09-04 16:37:35 -07:00
Thomas Richter
744175e972 perf test: Checking BPF metadata collection fails on version string
commit edf2cadf01 ("perf test: add test for BPF metadata collection")

fails consistently on the version string check. The perf version
string on some of the constant integration test machines contains
characters with special meaning in grep's extended regular expression
matching algorithm. The output of perf version is:

 # perf version
 perf version 6.17.0-20250814.rc1.git20.24ea63ea3877.63.fc42.s390x+git
 #

and the '+' character has special meaning in egrep command.
Also the use of egrep is deprecated.

Change the perf version string check to fixed character matching
and get rid of egrep's warning being deprecated. Use grep -F instead.

Output before:
 # perf test -F 102
 Checking BPF metadata collection
 egrep: warning: egrep is obsolescent; using grep -E
 Basic BPF metadata test [Failed invalid output]
 102: BPF metadata collection test             : FAILED!
 #

Output after:
 # perf test -F 102
 Checking BPF metadata collection
 Basic BPF metadata test [Success]
 102: BPF metadata collection test             : Ok
 #

Fixes: edf2cadf01 ("perf test: add test for BPF metadata collection")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Blake Jones <blakejones@google.com>
Link: https://lore.kernel.org/r/20250822122540.4104658-1-tmricht@linux.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-09-04 16:37:19 -07:00
Jens Axboe
1f6b281ac5 nvme fixes for 6.17
- Fix protection information ref tag for device side gen/strip
    (Christoph)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE3Fbyvv+648XNRdHTPe3zGtjzRgkFAmi6GLcACgkQPe3zGtjz
 RgnMiRAAiqvCBww4+8SQt0pb9tGRjLhs1W5ZLhh7pMznD8rNLJ1YRte5EOdWkHsO
 ETKXBhpLlTlooqIIbeTqKaN3/T1yd6XK/BtR28CuTqL52AGlRzwxUsRwmzvaqX0M
 7Jwskw8IjHWzeJDxpjvagqz/yE6k1KIg7sFjaCYhSRLBP6UlG4lxYZdoQi3WGYrv
 HHoa0aa01rdcrDlqmT9X1GnHZVIL4x0VO3NxorE3SqDKnGGczg7nXdVqR9I/jDRp
 l00clHONSCvkhbAzSFi1IBEkWBPc5vCYdLGtyrTsBACZ2mIczAnURjPx2VcGeOh5
 zijMwNXNzNON5oH3j9HmznHzlAH9iamScwkvfmf/QSRMwcqEDP9rGV8CxeH8RnfL
 wgiSOuNao1CrrcB2Y8CFUTRRHMsRhUME8OWP5YR5KaFvJoEQ445NyDtKuMoJ7MVP
 6farXCVU3dhE8qPVkXGw6e5OMa9eSHXjPZ9AgFdkXrgOBr8ZE2/jWWw22hkJhJU5
 VrJRBWd/YrGkflCrt6IL7TUxwMxkGqk0E0M6X1227u4A544G++cgmqcvX15SxXzp
 i+7ouw4RU2QlsqCdGDt56qfQ/vx39RecedYBf3fKi4hbkuImEVquIGf+Iy8V5TNY
 zaNWER6eCNgBSOrlsCy17xc/W4eROoHpAk8OF61hQyZEn81uq6A=
 =TeN1
 -----END PGP SIGNATURE-----

Merge tag 'nvme-6.17-2025-09-04' of git://git.infradead.org/nvme into block-6.17

Pull NVMe fix from Keith:

"nvme fixes for 6.17

 - Fix protection information ref tag for device side gen/strip
   (Christoph)"

* tag 'nvme-6.17-2025-09-04' of git://git.infradead.org/nvme:
  nvme: fix PI insert on write
2025-09-04 17:21:28 -06:00
Anup Patel
5b3706597b ACPI: RISC-V: Fix FFH_CPPC_CSR error handling
The cppc_ffh_csr_read() and cppc_ffh_csr_write() returns Linux error
code in "data->ret.error" so cpc_read_ffh() and cpc_write_ffh() must
not use sbi_err_map_linux_errno() for FFH_CPPC_CSR.

Fixes: 30f3ffbee8 ("ACPI: RISC-V: Add CPPC driver")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250818143600.894385-2-apatel@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-04 16:25:50 -06:00
Nathan Chancellor
41f9049cff riscv: Only allow LTO with CMODEL_MEDANY
When building with CONFIG_CMODEL_MEDLOW and CONFIG_LTO_CLANG, there is a
series of errors due to some files being unconditionally compiled with
'-mcmodel=medany', mismatching with the rest of the kernel built with
'-mcmodel=medlow':

  ld.lld: error: Function Import: link error: linking module flags 'Code Model': IDs have conflicting values: 'i32 3' from vmlinux.a(init.o at 899908), and 'i32 1' from vmlinux.a(net-traces.o at 1014628)

Only allow LTO to be performed when CONFIG_CMODEL_MEDANY is enabled to
ensure there will be no code model mismatch errors. An alternative
solution would be disabling LTO for the files with a different code
model than the main kernel like some specialized areas of the kernel do
but doing that for individual files is not as sustainable than
forbidding the combination altogether.

Cc: stable@vger.kernel.org
Fixes: 021d23428b ("RISC-V: build: Allow LTO to be selected")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506290255.KBVM83vZ-lkp@intel.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac9871ecf@kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-04 16:25:46 -06:00
Dave Airlie
8b556ddeee amd-drm-fixes-6.17-2025-09-03:
amdgpu:
 - UserQ fixes
 - MES 11 fix
 - eDP/LVDS fix
 - Fix non-DC audio clean up
 - Fix duplicate cursor issue
 - Fix error path in PSP init
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCaLi85QAKCRC93/aFa7yZ
 2CZkAQDUPPkCUgytEUWC2E5q6heaRIhyiOXCzbh+Yb7HfIXjYgD/aZKZn5XggKGp
 x5NguqbkRui11Swqn76HG6y0Avp6vAg=
 =fiOJ
 -----END PGP SIGNATURE-----

Merge tag 'amd-drm-fixes-6.17-2025-09-03' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-6.17-2025-09-03:

amdgpu:
- UserQ fixes
- MES 11 fix
- eDP/LVDS fix
- Fix non-DC audio clean up
- Fix duplicate cursor issue
- Fix error path in PSP init

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250903221656.251254-1-alexander.deucher@amd.com
2025-09-05 08:06:34 +10:00
Linus Torvalds
d69eb204c2 Including fixes from netfilter, wireless and Bluetooth.
We're reverting the removal of a Sundance driver, a user has appeared.
 This makes the PR rather large in terms of LoC.
 
 There's a conspicuous absence of real, user-reported 6.17 issues.
 Slightly worried that the summer distracted people from testing.
 
 Previous releases - regressions:
 
  - ax25: properly unshare skbs in ax25_kiss_rcv()
 
 Previous releases - always broken:
 
  - phylink: disable autoneg for interfaces that have no inband,
    fix regression on pcs-lynx (NXP LS1088)
 
  - vxlan: fix null-deref when using nexthop objects
 
  - batman-adv: fix OOB read/write in network-coding decode
 
  - icmp: icmp_ndo_send: fix reversing address translation for replies
 
  - tcp: fix socket ref leak in TCP-AO failure handling for IPv6
 
  - mctp:
    - mctp_fraq_queue should take ownership of passed skb
    - usb: initialise mac header in RX path, avoid WARN
 
  - wifi: mac80211: do not permit 40 MHz EHT operation on 5/6 GHz,
    respect device limitations
 
  - wifi: wilc1000: avoid buffer overflow in WID string configuration
 
  - wifi: mt76:
    - fix regressions from mt7996 MLO support rework
    - fix offchannel handling issues on mt7996
    - fix multiple wcid linked list corruption issues
    - mt7921: don't disconnect when AP requests switch to a channel which
      requires radar detection
    - mt7925u: use connac3 tx aggr check in tx complete
 
  - wifi: intel:
    - improve validation of ACPI DSM data
    - cfg: restore some 1000 series configs
 
  - wifi: ath:
    - ath11k: a fix for GTK rekeying
    - ath12k: a missed WiFi7 capability (multi-link EMLSR)
 
  - eth: intel:
    - ice: fix races in "low latency" firmware interface for Tx timestamps
    - idpf: set mac type when adding and removing MAC filters
    - i40e: remove racy read access to some debugfs files
 
 Misc:
 
  - Revert "eth: remove the DLink/Sundance (ST201) driver"
 
  - netfilter: conntrack: helper: Replace -EEXIST by -EBUSY, avoid confusing
    modprobe
 
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE6jPA+I1ugmIBA4hXMUZtbf5SIrsFAmi5tR8ACgkQMUZtbf5S
 Irt/dA//YtVjqx/qVRADORDq2CF2SZk7P4Kcanci5gI36tP+7yVYOoJyGm1SFfSp
 MSv5Oxqn2U37we34FBgaIbkPOc6Bg1ZDDlzgs/RzGYzNbz9mZkYMHry0kJ8bjbeA
 c6tlOKJu49wG82K/3eMXRFQFUJZS0TeMEfZMGoqcKU8ziHC6+XpUzXj1IqBbTU/+
 C6JLGzpWnWHI0o97rscnRF4w1h2tl5FF1eBV6MiIJzP1nuBuK7bDkwbGvA5DdBOr
 nqWdi6iSfGwb/4XYMKeRMNucYSsZOwAt9DYAxlPb2AXhpKSO31OjZ1qp3e5Uhg4u
 n6Oj3q9tPNBitSqizZOAftay7xZJtXISpuFVm2pijgAz0G2SITvx7Z0kPKDw7rXa
 S6ZSmBhlamj/6uaOmmmIyG7zqMXarLKVCh6C+tU/+vCYVb1YhC5fcIU1QML68FxX
 9YfJFOf6Fn/j68MtRdknB5pnEfh0acMcKgie5b0725KBbRPM0/QlpLL5vj4UXZD5
 3yxpgQbgciU3HiYBDJM1vWwF0Z3Y89YDtZqjUavnrnrxRv+BkzTmGlmNuqICKm3f
 rUCjdNm8TDPUwKgSLeUbXF2u8Aapgizd7ptXcmKT2mbjSKdhqdvafUnrdPZaBZBA
 uKH0XLNezj2zxcQaTEVdV5mtDujZMoXPS/RnCrICaMfXkz5Whxg=
 =e0Jg
 -----END PGP SIGNATURE-----

Merge tag 'net-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from netfilter, wireless and Bluetooth.

  We're reverting the removal of a Sundance driver, a user has appeared.
  This makes the PR rather large in terms of LoC.

  There's a conspicuous absence of real, user-reported 6.17 issues.
  Slightly worried that the summer distracted people from testing.

  Previous releases - regressions:

   - ax25: properly unshare skbs in ax25_kiss_rcv()

  Previous releases - always broken:

   - phylink: disable autoneg for interfaces that have no inband, fix
     regression on pcs-lynx (NXP LS1088)

   - vxlan: fix null-deref when using nexthop objects

   - batman-adv: fix OOB read/write in network-coding decode

   - icmp: icmp_ndo_send: fix reversing address translation for replies

   - tcp: fix socket ref leak in TCP-AO failure handling for IPv6

   - mctp:
       - mctp_fraq_queue should take ownership of passed skb
       - usb: initialise mac header in RX path, avoid WARN

   - wifi: mac80211: do not permit 40 MHz EHT operation on 5/6 GHz,
     respect device limitations

   - wifi: wilc1000: avoid buffer overflow in WID string configuration

   - wifi: mt76:
       - fix regressions from mt7996 MLO support rework
       - fix offchannel handling issues on mt7996
       - fix multiple wcid linked list corruption issues
       - mt7921: don't disconnect when AP requests switch to a channel
         which requires radar detection
       - mt7925u: use connac3 tx aggr check in tx complete

   - wifi: intel:
       - improve validation of ACPI DSM data
       - cfg: restore some 1000 series configs

   - wifi: ath:
       - ath11k: a fix for GTK rekeying
       - ath12k: a missed WiFi7 capability (multi-link EMLSR)

   - eth: intel:
       - ice: fix races in "low latency" firmware interface for Tx timestamps
       - idpf: set mac type when adding and removing MAC filters
       - i40e: remove racy read access to some debugfs files

  Misc:

   - Revert "eth: remove the DLink/Sundance (ST201) driver"

   - netfilter: conntrack: helper: Replace -EEXIST by -EBUSY, avoid
     confusing modprobe"

* tag 'net-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (99 commits)
  phy: mscc: Stop taking ts_lock for tx_queue and use its own lock
  selftest: net: Fix weird setsockopt() in bind_bhash.c.
  MAINTAINERS: add Sabrina to TLS maintainers
  gve: update MAINTAINERS
  ppp: fix memory leak in pad_compress_skb
  net: xilinx: axienet: Add error handling for RX metadata pointer retrieval
  net: atm: fix memory leak in atm_register_sysfs when device_register fail
  netfilter: nf_tables: Introduce NFTA_DEVICE_PREFIX
  selftests: netfilter: fix udpclash tool hang
  ax25: properly unshare skbs in ax25_kiss_rcv()
  mctp: return -ENOPROTOOPT for unknown getsockopt options
  net/smc: Remove validation of reserved bits in CLC Decline message
  ipv4: Fix NULL vs error pointer check in inet_blackhole_dev_init()
  net: thunder_bgx: decrement cleanup index before use
  net: thunder_bgx: add a missing of_node_put
  net: phylink: move PHY interrupt request to non-fail path
  net: lockless sock_i_ino()
  tools: ynl-gen: fix nested array counting
  wifi: wilc1000: avoid buffer overflow in WID string configuration
  wifi: cfg80211: sme: cap SSID length in __cfg80211_connect_result()
  ...
2025-09-04 09:59:15 -07:00
Linus Torvalds
68f285e264 slab fixes for 6.17-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQFPBAABCAA5FiEEe7vIQRWZI0iWSE3xu+CwddJFiJoFAmi5UjobFIAAAAAABAAO
 bWFudTIsMi41KzEuMTEsMiwyAAoJELvgsHXSRYiaXzgH/02xMYsULsZH051JsC55
 ZYa6BQ1LHWT1UIs9cBojjWqrvO21ZGoKIwKX0sKrjnHKoHV/IaXom3AQxqkm34Cc
 sJMZXoBgq0ZpW9XIjoudrVY1oPLBykPkuGvFCD2WI1ecZ4G1P+bvRJVosmF86UyA
 NN6YDp4tMiDoauOYhxBv/deJ47nHvhlP6P0y4w/sfgf9ZQN5smWDxAKPTfRG4UAc
 PeyVArCsUeWcLUicL+nx4qp1owZtqtssIJD1mOYdlA9fyQc3o6GkNuCSO05wdukQ
 RQLL11PzA0xfUH4CEh2OIVtBChE+1m4zNdhjwPTjpPKca7pbwFwwj3mMHiXKVHqV
 LiY=
 =qFr8
 -----END PGP SIGNATURE-----

Merge tag 'slab-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab

Pull slab fixes from Vlastimil Babka:

 - Stable fix to make slub_debug code not access invalid pointers in the
   process of reporting issues (Li Qiong)

 - Stable fix to make object tracking pass gfp flags to stackdepot to
   avoid deadlock in contexts that can't even wake up kswapd due to e.g.
   timers debugging enabled (yangshiguang)

* tag 'slab-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
  mm: slub: avoid wake up kswapd in set_track_prepare
  mm/slub: avoid accessing metadata when pointer is invalid in object_err()
2025-09-04 09:54:20 -07:00
Makar Semyonov
70bccd9855 cifs: prevent NULL pointer dereference in UTF16 conversion
There can be a NULL pointer dereference bug here. NULL is passed to
__cifs_sfu_make_node without checks, which passes it unchecked to
cifs_strndup_to_utf16, which in turn passes it to
cifs_local_to_utf16_bytes where '*from' is dereferenced, causing a crash.

This patch adds a check for NULL 'src' in cifs_strndup_to_utf16 and
returns NULL early to prevent dereferencing NULL pointer.

Found by Linux Verification Center (linuxtesting.org) with SVACE

Signed-off-by: Makar Semyonov <m.semenov@tssltd.ru>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-09-04 11:43:31 -05:00
Li Nan
7202082b7b md: prevent incorrect update of resync/recovery offset
In md_do_sync(), when md_sync_action returns ACTION_FROZEN, subsequent
call to md_sync_position() will return MaxSector. This causes
'curr_resync' (and later 'recovery_offset') to be set to MaxSector too,
which incorrectly signals that recovery/resync has completed, even though
disk data has not actually been updated.

To fix this issue, skip updating any offset values when the sync action
is FROZEN. The same holds true for IDLE.

Fixes: 7d9f107a4e ("md: use new helpers in md_do_sync()")
Signed-off-by: Li Nan <linan122@huawei.com>
Link: https://lore.kernel.org/linux-raid/20250904073452.3408516-1-linan666@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
2025-09-05 00:31:18 +08:00
Yu Kuai
93dec51e71 md/raid1: fix data lost for writemostly rdev
If writemostly is enabled, alloc_behind_master_bio() will allocate a new
bio for rdev, with bi_opf set to 0. Later, raid1_write_request() will
clone from this bio, hence bi_opf is still 0 for the cloned bio. Submit
this cloned bio will end up to be read, causing write data lost.

Fix this problem by inheriting bi_opf from original bio for
behind_mast_bio.

Fixes: e879a0d9cb ("md/raid1,raid10: don't ignore IO flags")
Reported-and-tested-by: Ian Dall <ian@beware.dropbear.id.au>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220507
Link: https://lore.kernel.org/linux-raid/20250903014140.3690499-1-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Li Nan <linan122@huawei.com>
2025-09-05 00:30:04 +08:00
Miaoqian Lin
f3ef711092 ACPI/IORT: Fix memory leak in iort_rmr_alloc_sids()
If krealloc_array() fails in iort_rmr_alloc_sids(), the function returns
NULL but does not free the original 'sids' allocation. This results in a
memory leak since the caller overwrites the original pointer with the
NULL return value.

Fixes: 491cf4a673 ("ACPI/IORT: Add support to retrieve IORT RMR reserved regions")
Cc: <stable@vger.kernel.org> # 6.0.x
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://lore.kernel.org/r/20250828112243.61460-1-linmq006@gmail.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2025-09-04 17:00:01 +01:00
Horatiu Vultur
9b2bfdbf43 phy: mscc: Stop taking ts_lock for tx_queue and use its own lock
When transmitting a PTP frame which is timestamp using 2 step, the
following warning appears if CONFIG_PROVE_LOCKING is enabled:
=============================
[ BUG: Invalid wait context ]
6.17.0-rc1-00326-ge6160462704e #427 Not tainted
-----------------------------
ptp4l/119 is trying to lock:
c2a44ed4 (&vsc8531->ts_lock){+.+.}-{3:3}, at: vsc85xx_txtstamp+0x50/0xac
other info that might help us debug this:
context-{4:4}
4 locks held by ptp4l/119:
 #0: c145f068 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x58/0x1440
 #1: c29df974 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_queue_xmit+0x5c4/0x1440
 #2: c2aaaad0 (_xmit_ETHER#2){+.-.}-{2:2}, at: sch_direct_xmit+0x108/0x350
 #3: c2aac170 (&lan966x->tx_lock){+.-.}-{2:2}, at: lan966x_port_xmit+0xd0/0x350
stack backtrace:
CPU: 0 UID: 0 PID: 119 Comm: ptp4l Not tainted 6.17.0-rc1-00326-ge6160462704e #427 NONE
Hardware name: Generic DT based system
Call trace:
 unwind_backtrace from show_stack+0x10/0x14
 show_stack from dump_stack_lvl+0x7c/0xac
 dump_stack_lvl from __lock_acquire+0x8e8/0x29dc
 __lock_acquire from lock_acquire+0x108/0x38c
 lock_acquire from __mutex_lock+0xb0/0xe78
 __mutex_lock from mutex_lock_nested+0x1c/0x24
 mutex_lock_nested from vsc85xx_txtstamp+0x50/0xac
 vsc85xx_txtstamp from lan966x_fdma_xmit+0xd8/0x3a8
 lan966x_fdma_xmit from lan966x_port_xmit+0x1bc/0x350
 lan966x_port_xmit from dev_hard_start_xmit+0xc8/0x2c0
 dev_hard_start_xmit from sch_direct_xmit+0x8c/0x350
 sch_direct_xmit from __dev_queue_xmit+0x680/0x1440
 __dev_queue_xmit from packet_sendmsg+0xfa4/0x1568
 packet_sendmsg from __sys_sendto+0x110/0x19c
 __sys_sendto from sys_send+0x18/0x20
 sys_send from ret_fast_syscall+0x0/0x1c
Exception stack(0xf0b05fa8 to 0xf0b05ff0)
5fa0:                   00000001 0000000e 0000000e 0004b47a 0000003a 00000000
5fc0: 00000001 0000000e 00000000 00000121 0004af58 00044874 00000000 00000000
5fe0: 00000001 bee9d420 00025a10 b6e75c7c

So, instead of using the ts_lock for tx_queue, use the spinlock that
skb_buff_head has.

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Fixes: 7d272e63e0 ("net: phy: mscc: timestamping and PHC support")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://patch.msgid.link/20250902121259.3257536-1-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-04 07:48:29 -07:00
Kuniyuki Iwashima
fd2004d82d selftest: net: Fix weird setsockopt() in bind_bhash.c.
bind_bhash.c passes (SO_REUSEADDR | SO_REUSEPORT) to setsockopt().

In the asm-generic definition, the value happens to match with the
bare SO_REUSEPORT, (2 | 15) == 15, but not on some arch.

arch/alpha/include/uapi/asm/socket.h:18:#define SO_REUSEADDR	0x0004
arch/alpha/include/uapi/asm/socket.h:24:#define SO_REUSEPORT	0x0200
arch/mips/include/uapi/asm/socket.h:24:#define SO_REUSEADDR	0x0004	/* Allow reuse of local addresses.  */
arch/mips/include/uapi/asm/socket.h:33:#define SO_REUSEPORT 0x0200	/* Allow local address and port reuse.  */
arch/parisc/include/uapi/asm/socket.h:12:#define SO_REUSEADDR	0x0004
arch/parisc/include/uapi/asm/socket.h:18:#define SO_REUSEPORT	0x0200
arch/sparc/include/uapi/asm/socket.h:13:#define SO_REUSEADDR	0x0004
arch/sparc/include/uapi/asm/socket.h:20:#define SO_REUSEPORT	0x0200
include/uapi/asm-generic/socket.h:12:#define SO_REUSEADDR	2
include/uapi/asm-generic/socket.h:27:#define SO_REUSEPORT	15

Let's pass SO_REUSEPORT only.

Fixes: c35ecb95c4 ("selftests/net: Add test for timing a bind request to a port with a populated bhash entry")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250903222938.2601522-1-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-04 07:30:04 -07:00
zhang jiao
ed42d80f3b tools: gpio: remove the include directory on make clean
Remove the generated include directory when running make clean.

Fixes: 8674cea84d ("tools/gpio: move to tools buildsystem")
Signed-off-by: Zhang Jiao <zhangjiao2@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20250903063621.2424-1-zhangjiao2@cmss.chinamobile.com
[Bartosz: add Fixes tag, improve the commit message]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-09-04 16:29:28 +02:00
Jakub Kicinski
6a989d3730 MAINTAINERS: add Sabrina to TLS maintainers
Sabrina has been very helpful reviewing TLS patches, fixing bugs,
and, I believe, the last one to implement any major feature in
the TLS code base (rekeying). Add her as a maintainer.

Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250903212054.1885058-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-04 07:29:06 -07:00
Jeroen de Borst
b1ab3b029f gve: update MAINTAINERS
Jeroen is leaving Google and Josh is taking his place as a maintainer.

Signed-off-by: Jeroen de Borst <jeroendb@google.com>
Link: https://patch.msgid.link/20250903175649.23246-1-jeroendb@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-04 07:27:21 -07:00
Qingfang Deng
4844123fe0 ppp: fix memory leak in pad_compress_skb
If alloc_skb() fails in pad_compress_skb(), it returns NULL without
releasing the old skb. The caller does:

    skb = pad_compress_skb(ppp, skb);
    if (!skb)
        goto drop;

drop:
    kfree_skb(skb);

When pad_compress_skb() returns NULL, the reference to the old skb is
lost and kfree_skb(skb) ends up doing nothing, leading to a memory leak.

Align pad_compress_skb() semantics with realloc(): only free the old
skb if allocation and compression succeed.  At the call site, use the
new_skb variable so the original skb is not lost when pad_compress_skb()
fails.

Fixes: b3f9b92a6e ("[PPP]: add PPP MPPE encryption module")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://patch.msgid.link/20250903100726.269839-1-dqfext@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-04 07:25:48 -07:00