1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00

1412010 Commits

Author SHA1 Message Date
Russell King (Oracle)
7733bc7d29 ARM: fix hash_name() fault
Zizhi Wo reports:

"During the execution of hash_name()->load_unaligned_zeropad(), a
 potential memory access beyond the PAGE boundary may occur. For
 example, when the filename length is near the PAGE_SIZE boundary.
 This triggers a page fault, which leads to a call to
 do_page_fault()->mmap_read_trylock(). If we can't acquire the lock,
 we have to fall back to the mmap_read_lock() path, which calls
 might_sleep(). This breaks RCU semantics because path lookup occurs
 under an RCU read-side critical section."

This is seen with CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_KFENCE=y.

Kernel addresses (with the exception of the vectors/kuser helper
page) do not have VMAs associated with them. If the vectors/kuser
helper page faults, then there are two possibilities:

1. if the fault happened while in kernel mode, then we're basically
   dead, because the CPU won't be able to vector through this page
   to handle the fault.
2. if the fault happened while in user mode, that means the page was
   protected from user access, and we want to fault anyway.

Thus, we can handle kernel addresses from any context entirely
separately without going anywhere near the mmap lock. This gives us
an entirely non-sleeping path for all kernel mode kernel address
faults.

As we handle the kernel address faults before interrupts are enabled,
this change has the side effect of improving the branch predictor
hardening, but does not completely solve the issue.

Reported-by: Zizhi Wo <wozizhi@huaweicloud.com>
Reported-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Link: https://lore.kernel.org/r/20251126090505.3057219-1-wozizhi@huaweicloud.com
Reviewed-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Tested-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2025-12-10 12:22:02 +00:00
Russell King (Oracle)
40b466db1d ARM: allow __do_kernel_fault() to report execution of memory faults
Allow __do_kernel_fault() to detect the execution of memory, so we can
provide the same fault message as do_page_fault() would do. This is
required when we split the kernel address fault handling from the
main do_page_fault() code path.

Reviewed-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Tested-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2025-12-10 12:21:46 +00:00
Ilya Dryomov
21c1466ea2 rbd: stop selecting CRC32, CRYPTO, and CRYPTO_AES
None of the RBD code directly requires CRC32, CRYPTO, or CRYPTO_AES.
These options are needed by CEPH_LIB code and they are selected there
directly.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Dongsheng Yang <dongsheng.yang@linux.dev>
2025-12-10 11:50:54 +01:00
Eric Biggers
3680fc138e ceph: stop selecting CRC32, CRYPTO, and CRYPTO_AES
None of the CEPH_FS code directly requires CRC32, CRYPTO, or CRYPTO_AES.
These options do get selected indirectly anyway via CEPH_LIB, which does
need them, but there is no need for CEPH_FS to select them too.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2025-12-10 11:50:54 +01:00
Ilya Dryomov
8c73851271 libceph: make decode_pool() more resilient against corrupted osdmaps
If the osdmap is (maliciously) corrupted such that the encoded length
of ceph_pg_pool envelope is less than what is expected for a particular
encoding version, out-of-bounds reads may ensue because the only bounds
check that is there is based on that length value.

This patch adds explicit bounds checks for each field that is decoded
or skipped.

Cc: stable@vger.kernel.org
Reported-by: ziming zhang <ezrakiez@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Tested-by: ziming zhang <ezrakiez@gmail.com>
2025-12-10 11:50:54 +01:00
Andy Shevchenko
04d8712b07 libceph: Amend checking to fix make W=1 build breakage
In a few cases the code compares 32-bit value to a SIZE_MAX derived
constant which is much higher than that value on 64-bit platforms,
Clang, in particular, is not happy about this

net/ceph/osdmap.c:1441:10: error: result of comparison of constant 4611686018427387891 with expression of type 'u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
 1441 |         if (len > (SIZE_MAX - sizeof(*pg)) / sizeof(u32))
      |             ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ceph/osdmap.c:1624:10: error: result of comparison of constant 2305843009213693945 with expression of type 'u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
 1624 |         if (len > (SIZE_MAX - sizeof(*pg)) / (2 * sizeof(u32)))
      |             ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by casting to size_t. Note, that possible replacement of SIZE_MAX
by U32_MAX may lead to the behaviour changes on the corner cases.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2025-12-10 11:50:54 +01:00
Andy Shevchenko
87327d4eaa ceph: Amend checking to fix make W=1 build breakage
In a few cases the code compares 32-bit value to a SIZE_MAX derived
constant which is much higher than that value on 64-bit platforms,
Clang, in particular, is not happy about this

fs/ceph/snap.c:377:10: error: result of comparison of constant 2305843009213693948 with expression of type 'u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
  377 |         if (num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64))
      |             ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by casting to size_t. Note, that possible replacement of SIZE_MAX
by U32_MAX may lead to the behaviour changes on the corner cases.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2025-12-10 11:50:54 +01:00
Max Kellermann
d927a595ab ceph: add trace points to the MDS client
This patch adds trace points to the Ceph filesystem MDS client:

- request submission (CEPH_MSG_CLIENT_REQUEST) and completion
  (CEPH_MSG_CLIENT_REPLY)
- capabilities (CEPH_MSG_CLIENT_CAPS)

These are the central pieces that are useful for analyzing MDS
latency/performance problems from the client's perspective.

In the long run, all doutc() calls should be replaced with
tracepoints.  This way, the Ceph filesystem can be traced at any time
(without spamming the kernel log).  Additionally, trace points can be
used in BPF programs (which can even deference the pointer parameters
and extract more values).

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2025-12-10 11:50:54 +01:00
Simon Buttgereit
d6c2f41eb9 libceph: fix log output race condition in OSD client
OSD client logging has a problem in get_osd() and put_osd().
For one logging output refcount_read() is called twice. If recount
value changes between both calls logging output is not consistent.

This patch prints out only the resulting value.

[ idryomov: don't make the log messages more verbose ]

Signed-off-by: Simon Buttgereit <simon.buttgereit@tu-ilmenau.de>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2025-12-10 11:50:53 +01:00
Fengnan Chang
f22ecf9c14 blk-mq: delete task running check in blk_hctx_poll()
blk_hctx_poll() always checks if the task is running or not, and returns
1 if the task is running. This is a leftover from when polled IO was
purely for synchronous IO, and doesn't make sense anymore when polled IO
is purely asynchronous. Similarly, marking the task as TASK_RUNNING is
also superflous, as the very much has to be running to enter the
function in the first place.

It looks like there has been this judgment for historical reasons, and
in very early versions of this function the user would set the process
state to TASK_UNINTERRUPTIBLE.

Signed-off-by: Diangang Li <lidiangang@bytedance.com>
Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
[axboe: kill all remnants of task running, pointless now. massage message]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-12-10 02:40:52 -07:00
René Rebe
6cb31fba13 drm/mgag200: Fix big-endian support
Unlike the original, deleted Matrox mga driver, the new mgag200 driver
has the XRGB frame-buffer byte swapped on big-endian "RISC"
systems. Fix by enabling byte swapping "PowerPC" OPMODE for any
__BIG_ENDIAN config.

Fixes: 414c45310625 ("mgag200: initial g200se driver (v2)")
Signed-off-by: René Rebe <rene@exactco.de>
Cc: stable@kernel.org
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20251208.141827.965103015954471168.rene@exactco.de
2025-12-10 09:33:53 +01:00
Linus Torvalds
0048fbb401 Futex changes for v6.19:
- Standardize on ktime_t in restart_block::time as well
    (Thomas Weißschuh)
 
  - Futex selftests:
    - Add robust list testcases (André Almeida)
    - Formatting fixes/cleanups (Carlos Llamas)
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmk5J9QRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1gimQ//VhPIVYqioY/opLXBWFAiyxWLF8RbzbsD
 URC4ppVqMa0d8np4VaoaNGTCyPOvhC5m/5q14BNgNhGfbvHOrx1W5cJ122v2vroC
 aNwBkapt655lHwgax4vLgM7jMPW1do9hoyqtjsUIQeKMDlyZZW22gY+ExRTPJZTm
 lP6PreWR74QTTKo5pTjNCoWSaLEmuoD5rbo52SkiTYHwBLL+Tqubl92mVFFUbE+Q
 9n/c/zDeRSaixKr64TvDAijGyjrH8XFhOoMyyOGCiiWyrXfjDPde0Cblt6OkBQeK
 /4/9uFo2TX3vFxQ2Zhj21gqMwQ84cdPvC86GkPh3FoxRNd66gArIpC14ME7rRn0V
 aDKmz+c8QhFdS9gp4+Gw2OkuzYylLl2RSoSjhz/ndrZh7OLn64cA9KjfhRscCfjD
 mcFMVFcjyK8BlgjXyTltC00tLftf6pyO7bqzO4kaYYbpls687ztfZ0mUSE60gLS4
 WuCnntD+Q2IADV0r5xU9ps1a37eaqiHfgtjON2wznJeyj46PbpkWxSpdTIogTRoS
 5JdLv+w1LdDMHaUuEPOgYYd6L69X0HpDauHotyRlGY+SoSoCoX6DbSXTg7CSqlqY
 VHeuLj2OKnELJpxLEo16pcW6qTd+BM/2jcG91H7VJxbb2sJnngT3XtgJagXE5KYR
 IYjcKq6DWig=
 =9KQQ
 -----END PGP SIGNATURE-----

Merge tag 'locking-futex-2025-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull futex updates from Ingo Molnar:

 - Standardize on ktime_t in restart_block::time as well (Thomas
   Weißschuh)

 - Futex selftests:
     - Add robust list testcases (André Almeida)
     - Formatting fixes/cleanups (Carlos Llamas)

* tag 'locking-futex-2025-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Store time as ktime_t in restart block
  selftests/futex: Create test for robust list
  selftests/futex: Skip tests if shmget unsupported
  selftests/futex: Add newline to ksft_exit_fail_msg()
  selftests/futex: Remove unused test_futex_mpol()
2025-12-10 17:21:30 +09:00
Linus Torvalds
2137cb863b Second round of Kbuild updates for 6.19
- Fix install-extmod-build when ccache is used via CC
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQR74yXHMTGczQHYypIdayaRccAalgUCaTkdWAAKCRAdayaRccAa
 lqS5AQCxWNN3N7Dq7gXkLv/wga4BW7Wt98wTftwTeN3AndTLSgD/TajRYP+ryrJl
 opPmJ/jqkVOMwMHCRszN8XOZ1vaXqQI=
 =EzlT
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux

Pull Kbuild fix from Nathan Chancellor:

 - Fix install-extmod-build when ccache is used via CC

* tag 'kbuild-6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux:
  kbuild: install-extmod-build: Properly fix CC expansion when ccache is used
2025-12-10 16:57:24 +09:00
Linus Torvalds
db28b8ae36 Input updates for v6.19-rc0
- DT bindings for Melfas MIP4 touchscreen controller and TWL4030 keypad
   have been converted to the DT schema
 
 - simple touch controller bindings have been consolidated to
   trivial-touch.yaml DT schema
 
 - memory allocation failure noise was removed from qnap-mcu-input and
   zforce_ts dirvers
 
 - ti_am335x_tsc driver was hardened to handle invalid (too large) number
   of coordinates specified in device tree
 
 - a cleanup in Cypress cyttsp5 driver to use %pe to print error code.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCaTeEdgAKCRBAj56VGEWX
 nGVNAQCm5vvTAVVQVYAS9k9KPc0PXthTE0h1mLGVUH2eE0qnnwD/QBv4GTfGR18I
 YBhuEZ2aPh6TNd7EwxZwEthAoKquCAA=
 =KI1P
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - DT bindings for Melfas MIP4 touchscreen controller and TWL4030 keypad
   have been converted to the DT schema

 - simple touch controller bindings have been consolidated to
   trivial-touch.yaml DT schema

 - memory allocation failure noise was removed from qnap-mcu-input and
   zforce_ts dirvers

 - ti_am335x_tsc driver was hardened to handle invalid (too large)
   number of coordinates specified in device tree

 - a cleanup in Cypress cyttsp5 driver to use %pe to print error code

* tag 'input-for-v6.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ti_am335x_tsc - clamp coordinate_readouts to DT maximum (6)
  dt-bindings: touchscreen: consolidate simple touch controller to trivial-touch.yaml
  dt-bindings: touchscreen: trivial-touch: add reset-gpios and wakeup-source
  dt-bindings: input: ti,twl4030-keypad: convert to DT schema
  Input: zforce_ts - omit error message when memory allocation fails
  Input: qnap-mcu-input - omit error message when memory allocation fails
  dt-bindings: input: Convert MELFAS MIP4 Touchscreen to DT schema
  dt-bindings: touchscreen: move ar1021.txt to trivial-touch.yaml
  dt-bindings: touchscreen: rename maxim,max11801.yaml to trivial-touch.yaml
  Input: cyttsp5 - use %pe format specifier
2025-12-10 16:44:18 +09:00
Linus Torvalds
2f7041e59b tracing fix for v6.19:
- Fix unused tracepoint build for modules only using exported tracepoints
 
   The tracepoint-update.c code that looks for unused tracepoints expects
   if tracepoints are used then it will have tracepoints defined. If
   not, it errors out which fails the build.
 
   In most cases this the way things work. A tracepoint can't be used if
   it is not defined. There is one exception; If a module only uses
   tracepoints that are defined in other modules or the vmlinux proper,
   where the tracepoints are exported. In this case, the
   tracepoint-update.c code thinks tracepoints are used but not defined
   and errors out, failing the build.
 
   When tracepoint-update.c detects this case, if it is a module that is
   being processed, exit out normally as it is a legitimate case.
 
 - Add tracepoint-update.c to MAINTAINERS file
 
   The tracepoint-update.c file is specific to tracing so add it to the
   tracing subsystem in the MAINTAINERS file.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCaTjciBQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qnbkAQCzRR+pOQZdUzmjx/ML2AfQCv4RtQnR
 +WthlhuuRZ4SVAD9EeUeeaJdS3LrXwcCF2QSZ50Qlzv/1ODh3ws9+LppPAY=
 =SmBz
 -----END PGP SIGNATURE-----

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

Pull tracing fixes from Steven Rostedt:

 - Fix unused tracepoint build for modules only using exported
   tracepoints

   The tracepoint-update.c code that looks for unused tracepoints
   expects if tracepoints are used then it will have tracepoints
   defined. If not, it errors out which fails the build.

   In most cases this the way things work. A tracepoint can't be used if
   it is not defined. There is one exception; If a module only uses
   tracepoints that are defined in other modules or the vmlinux proper,
   where the tracepoints are exported. In this case, the
   tracepoint-update.c code thinks tracepoints are used but not defined
   and errors out, failing the build.

   When tracepoint-update.c detects this case, if it is a module that is
   being processed, exit out normally as it is a legitimate case.

 - Add tracepoint-update.c to MAINTAINERS file

   The tracepoint-update.c file is specific to tracing so add it to the
   tracing subsystem in the MAINTAINERS file.

* tag 'trace-v6.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  MAINTAINERS: Add tracepoint-update.c to TRACING section
  tracing: Fix unused tracepoints when module uses only exported ones
2025-12-10 16:38:50 +09:00
Michal Wilczynski
3c180003df pwm: th1520: Fix missing Kconfig dependencies
The driver fails to build on configurations lacking COMMON_CLK (missing
clk::Clk) or HAS_IOMEM (incomplete `pwm_chip` struct on UML).

Add dependencies on ARCH_THEAD and HAS_IOMEM, and add COMMON_CLK to
ensure correct compilation and platform targeting.

Reported-by: Markus Probst <markus.probst@gmail.com>
Closes: https://lore.kernel.org/all/a66b337528d700ae92d7940a04c59206e06a8495.camel@posteo.de/
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512020957.PqnHfe7C-lkp@intel.com/
Fixes: e03724aac758 ("pwm: Add Rust driver for T-HEAD TH1520 SoC")
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Link: https://patch.msgid.link/20251209-fix_deps_pwm-v1-1-f7ed8bd1bd3d@samsung.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
2025-12-10 08:14:27 +01:00
Sebastian Andrzej Siewior
c94291914b cpu: Make atomic hotplug callbacks run with interrupts disabled on UP
On SMP systems the CPU hotplug callbacks in the "starting" range are
invoked while the CPU is brought up and interrupts are still
disabled. Callbacks which are added later are invoked via the
hotplug-thread on the target CPU and interrupts are explicitly disabled.

In the UP case callbacks which are added later are invoked directly without
the thread indirection. This is in principle okay since there is just one
CPU but those callbacks are invoked with interrupt disabled code. That's
incorrect as those callbacks assume interrupt disabled context.

Disable interrupts before invoking the callbacks on UP if the state is
atomic and interrupts are expected to be disabled.  The "save" part is
required because this is also invoked early in the boot process while
interrupts are disabled and must not be enabled prematurely.

Fixes: 06ddd17521bf1 ("sched/smp: Always define is_percpu_thread() and scheduler_ipi()")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251127144723.ev9DuXXR@linutronix.de
2025-12-10 15:49:11 +09:00
Johannes Thumshirn
2c38ec934d block: fix cached zone reports on devices with native zone append
When mounting a btrfs file system on virtio-blk which supports native
Zone Append there has been a WARN triggering in btrfs' space management
code.

Further looking into btrfs' zoned statistics uncovered the filesystem
expecting the zones to be used, but the write pointers being 0:
 # cat /sys/fs/btrfs/8eabd2e7-3294-4f9e-9b58-7e64135c8bf4/zoned_stats
 active block-groups: 4
         reclaimable: 0
         unused: 0
         need reclaim: false
 data relocation block-group: 1342177280
 active zones:
         start: 1073741824, wp: 0 used: 0, reserved: 0, unusable: 0
         start: 1342177280, wp: 0 used: 0, reserved: 0, unusable: 0
         start: 1610612736, wp: 0 used: 16384, reserved: 0, unusable: 18446744073709535232
         start: 1879048192, wp: 0 used: 131072, reserved: 0, unusable: 18446744073709420544

Looking at the blkzone report output for the zone in question
(1610612736) the write pointer on the device moved, but the filesystem
did not see a change on the write pointer:
 # blkzone report -c 1 -o 0x300000 /dev/vda
   start: 0x000300000, len 0x080000, cap 0x080000, wptr 0x000040 reset:0 non-seq:0, zcond: 2(oi) [type: 2(SEQ_WRITE_REQUIRED)]

The zone write pointer is 0, because btrfs is using the cached version
of blkdev_report_zones() and as virtio-blk is supporting native zone
append, but blkdev_revalidate_zones() does not initialize the zone write
plugs in this case.

Not skipping the revalidate of sequential zones in
blkdev_revalidate_zones() callchain fixes this issue.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Fixes: a6aa36e957a1 ("block: Remove zone write plugs when handling native zone append writes")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-12-09 22:35:54 -07:00
ChenXiaoSong
08c2a7d2ba smb: move file_notify_information to common/fscc.h
This struct definition is specified in MS-FSCC, and KSMBD will also use it,
so move it into common header file.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:23:03 -06:00
ChenXiaoSong
6539e18517 smb: move SMB2 Notify Action Flags into common/smb2pdu.h
Some of these definitions are already in common/smb2pdu.h. Remove the
duplicate client side definitions, and add all SMB2 Notify Action Flags to
common header file.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:22:58 -06:00
ChenXiaoSong
9ec7629b43 smb: move notify completion filter flags into common/smb2pdu.h
Some of these definitions are already in common/smb2pdu.h, remove the
duplicate client side definitions, and move FILE_NOTIFY_CHANGE_NAME to
common header file.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:22:54 -06:00
ChenXiaoSong
a71a4aab48 smb/client: add parentheses to NT error code definitions containing bitwise OR operator
Use the following shell commands:

  # Add "("
  sed -i '/|/s/ 0x/ (0x/' fs/smb/client/nterr.h
  # Add ")" if line does not end with a comment
  sed -i '/|/ { /.*\*\/$/! s/$/)/ }' fs/smb/client/nterr.h
  # Add ")" if line end with a comment
  sed -i '/|/ s/[[:space:]]*\/\*/)&/' fs/smb/client/nterr.h

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:22:34 -06:00
ChenXiaoSong
bcdd6cfaf2 smb: add documentation references for smb2 change notify definitions
To make it easier to locate the documentation during development.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:22:01 -06:00
ChenXiaoSong
a9adafd401 smb/client: add 4 NT error code definitions
From server/nterr.h that has been removed.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:21:42 -06:00
ChenXiaoSong
9f99caa895 smb/client: fix NT_STATUS_UNABLE_TO_FREE_VM value
This was reported by the KUnit tests in the later patches.

See MS-ERREF 2.3.1 STATUS_UNABLE_TO_FREE_VM. Keep it consistent with the
value in the documentation.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:20:17 -06:00
ChenXiaoSong
b2b50fca34 smb/client: fix NT_STATUS_DEVICE_DOOR_OPEN value
This was reported by the KUnit tests in the later patches.

See MS-ERREF 2.3.1 STATUS_DEVICE_DOOR_OPEN. Keep it consistent with the
value in the documentation.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:20:01 -06:00
ChenXiaoSong
a1237c203f smb/client: fix NT_STATUS_NO_DATA_DETECTED value
This was reported by the KUnit tests in the later patches.

See MS-ERREF 2.3.1 STATUS_NO_DATA_DETECTED. Keep it consistent with the
value in the documentation.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:19:43 -06:00
Linus Torvalds
565848bb3b csky 6.19 Release Notes
- Remove compile warning for CONFIG_SMP
  - Fix __ASSEMBLER__ typo in headers
  - Fix csky_cmpxchg_fixup
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE2KAv+isbWR/viAKHAXH1GYaIxXsFAmk4y6kSHGd1b3JlbkBr
 ZXJuZWwub3JnAAoJEAFx9RmGiMV7rnUP/1mvio6t+S2NUeJVEATULhJ9FgEritKz
 Iq7UtecEu2Kmn7QAcMBBhns0+bDAsmC0nP3XECuo9gAs3i7pMiJ5DawYJ+POaxgu
 3KJtfWxinTQvQmQ0jgzZNM/cpBld2WGL6PDdDb7MuQbc84/2mhSYgNJHZGrOFjTM
 WCeokRmeuHM7EjnhroP3IWmlPZ7DyKkq0Sy6+Uib//LYXSjrIGQ/d2zc8y1T5lPu
 HDgjhdL+bnQpVwnVcuKkNRmBsmdkTI9i3j8O+xH3IVcl0QrZmDEAjzEQe+tkA3/Y
 QbrS0sXk32B9dgOTH1hFLSBANm3njUNA8VlNAgQeuIIQOZvxG7bluYtLdHBBR5gx
 sgTBq3zDGgdk5LO0J/sJ9bKfHVP88GXXrkVGh59JOwg/2OURsmOUMX6DSCCZBsVg
 JFieIjNJkh8JQSaYi0NgnSFCu7o8rWbp+Voe4AqXWpfcvyMDYadVUIhTmtc728Vw
 Eyv4zXAT1B0FfX3JtvPStiQioJwjHsLok1DMIuhN6HGPsSymJJ/jvJCvxcLqJdye
 uoaaq+ofsXQLPyGzooMfuV8REt+Huh+hX6Y1P4qHtVSSYK7wxV3a0H9O+CIs2pyF
 QqupBehOLlY+FqyXVKEpUjwfWQbrkp9R7wGEDg8MNKfGP13z1l2e4CiIAd5PxXAA
 58TjMWqghDcT
 =XTzM
 -----END PGP SIGNATURE-----

Merge tag 'csky-for-linus-6.19' of https://github.com/c-sky/csky-linux

Pull csky updates from Guo Ren:

 - Remove compile warning for CONFIG_SMP

 - Fix __ASSEMBLER__ typo in headers

 - Fix csky_cmpxchg_fixup

* tag 'csky-for-linus-6.19' of https://github.com/c-sky/csky-linux:
  csky: Remove compile warning for CONFIG_SMP
  csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi header
  csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
  csky: fix csky_cmpxchg_fixup not working
2025-12-10 12:17:29 +09:00
Dan Carpenter
7dbc0d40d8 irqchip/mchp-eic: Fix error code in mchp_eic_domain_alloc()
If irq_domain_translate_twocell() sets "hwirq" to >= MCHP_EIC_NIRQ (2) then
it results in an out of bounds access.

The code checks for invalid values, but doesn't set the error code.  Return
-EINVAL in that case, instead of returning success.

Fixes: 00fa3461c86d ("irqchip/mchp-eic: Add support for the Microchip EIC")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://patch.msgid.link/aTfHmOz6IBpTIPU5@stanley.mountain
2025-12-10 12:11:06 +09:00
ChenXiaoSong
2e0d224d89 smb/server: add comment to FileSystemName of FileFsAttributeInformation
Explained why FileSystemName is always set to "NTFS".

Link: 84392651b0
Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:01:36 -06:00
ChenXiaoSong
98def4eb02 smb/server: remove unused nterr.h
KSMBD does not use these NT error code definitions. Instead, it uses the
SMB2 status code definitions defined in common/smb2status.h.

By the way, server/nterr.h contains the following additional definitions
compared to client/nterr.h:

  - NT_STATUS_PENDING
  - NT_STATUS_INVALID_LOCK_RANGE
  - NT_STATUS_NETWORK_SESSION_EXPIRED
  - NT_STATUS_NO_PREAUTH_INTEGRITY_HASH_OVERLAP

We can add them to client/nterr.h in the next patch.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:01:16 -06:00
ChenXiaoSong
01ab0d1640 smb/server: rename include guard in smb_common.h
Make the include guard more descriptive to avoid conflicts with include
guards that may be used in the future.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-09 21:00:48 -06:00
Steven Rostedt
2c22361ab6 MAINTAINERS: Add tracepoint-update.c to TRACING section
Place the file scripts/tracepoint-update.c in the TRACING section.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Link: https://patch.msgid.link/20251208192544.5f2392a7@debian
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2025-12-09 21:17:07 -05:00
Andy Shevchenko
55026a9670 irqdomain: Delete irq_domain_add_tree()
No in-tree users anymore.

[ tglx: Remove the reference in the Chinese documentation as well ]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251202202327.1444693-1-andriy.shevchenko@linux.intel.com
2025-12-10 11:16:50 +09:00
Steven Rostedt
7a7e836684 tracing: Fix unused tracepoints when module uses only exported ones
Building the KVM intel module failed to build with UT=1:

no __tracepoint_strings in file: arch/x86/kvm/kvm-intel.o
make[3]: *** [/work/git/test-linux.git/scripts/Makefile.modfinal:62: arch/x86/kvm/kvm-intel.ko] Error 1

The reason is that the module only uses the tracepoints defined and
exported by the main kvm module. The tracepoint-update.c code fails the
build if a tracepoint is used, but there's no tracepoints defined. But
this is acceptable in modules if the tracepoints are defined in the vmlinux
proper or another module and exported.

Do not fail to build if a tracepoint is used but no tracepoints are
defined if the code is a module. This should still never happen for the
vmlinux itself.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Link: https://patch.msgid.link/20251209204023.76941824@fedora
Fixes: e30f8e61e2518 ("tracing: Add a tracepoint verification check at build time")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2025-12-09 21:16:07 -05:00
Marc Zyngier
89acaa5537 genirq: Allow NULL affinity for setup_percpu_irq()
setup_percpu_irq() was forgotten when the percpu_devid infrastructure was
updated to deal with CPU affinities.

In order to keep ignoring users of this legacy API, provide sensible
defaults by setting the affinity to cpu_online_mask if none was provided by
the caller.

Fixes: bdf4e2ac295fe ("genirq: Allow per-cpu interrupt sharing for non-overlapping affinities")
Reported-by: Daniel Thompson <danielt@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251205091814.3944205-1-maz@kernel.org
Closes: https://lore.kernel.org/r/aTFozefMQRg7lYxh@aspen.lan
2025-12-10 09:47:33 +09:00
Hemalatha Pinnamreddy
f34836a8dd
ASoC: amd: acp: update tdm channels for specific DAI
TDM channel updates were applied to all DAIs, causing configurations
to overwrite for unrelated streams. The logic is modified to update
channels only for targeted DAI. This prevents corruption of other DAI
settings and resolves audio issues observed during system suspend and
resume cycles.

Fixes: 12229b7e50cf ("ASoC: amd: acp: Add TDM support for acp i2s stream")
Signed-off-by: Hemalatha Pinnamreddy <hemalatha.pinnamreddy2@amd.com>
Signed-off-by: Raghavendra Prasad Mallela <raghavendraprasad.mallela@amd.com>
Link: https://patch.msgid.link/20251203120136.2591395-1-raghavendraprasad.mallela@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-10 09:17:53 +09:00
Jens Axboe
e15cb2200b io_uring: fix min_wait wakeups for SQPOLL
Using min_wait, two timeouts are given:

1) The min_wait timeout, within which up to 'wait_nr' events are
   waited for.
2) The overall long timeout, which is entered if no events are generated
   in the min_wait window.

If the min_wait has expired, any event being posted must wake the task.
For SQPOLL, that isn't the case, as it won't trigger the io_has_work()
condition, as it will have already processed the task_work that happened
when an event was posted. This causes any event to trigger post the
min_wait to not always cause the waiting application to wakeup, and
instead it will wait until the overall timeout has expired. This can be
shown in a test case that has a 1 second min_wait, with a 5 second
overall wait, even if an event triggers after 1.5 seconds:

axboe@m2max-kvm /d/iouring-mre (master)> zig-out/bin/iouring
info: MIN_TIMEOUT supported: true, features: 0x3ffff
info: Testing: min_wait=1000ms, timeout=5s, wait_nr=4
info: 1 cqes in 5000.2ms

where the expected result should be:

axboe@m2max-kvm /d/iouring-mre (master)> zig-out/bin/iouring
info: MIN_TIMEOUT supported: true, features: 0x3ffff
info: Testing: min_wait=1000ms, timeout=5s, wait_nr=4
info: 1 cqes in 1500.3ms

When the min_wait timeout triggers, reset the number of completions
needed to wake the task. This should ensure that any future events will
wake the task, regardless of how many events it originally wanted to
wait for.

Reported-by: Tip ten Brink <tip@tenbrinkmeijs.com>
Cc: stable@vger.kernel.org
Fixes: 1100c4a2656d ("io_uring: add support for batch wait timeout")
Link: https://github.com/axboe/liburing/issues/1477
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-12-09 16:54:12 -07:00
Ard Biesheuvel
6f7d948192 crypto/arm64: sm4/xts - Merge ksimd scopes to reduce stack bloat
Merge the two ksimd scopes in the implementation of SM4-XTS to prevent
stack bloat in cases where the compiler fails to combine the stack slots
for the kernel mode FP/SIMD buffers.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20251203163803.157541-6-ardb@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-12-09 15:10:21 -08:00
Ard Biesheuvel
a9a8b1a383 crypto/arm64: aes/xts - Use single ksimd scope to reduce stack bloat
The ciphertext stealing logic in the AES-XTS implementation creates a
separate ksimd scope to call into the FP/SIMD core routines, and in some
cases (CONFIG_KASAN_STACK is one, but there might be others), the 528
byte kernel mode FP/SIMD buffer that is allocated inside this scope is
not shared with the preceding ksimd scope, resulting in unnecessary
stack bloat.

Considering that

a) the XTS ciphertext stealing logic is never called for block
   encryption use cases, and XTS is rarely used for anything else,

b) in the vast majority of cases, the entire input block is processed
   during the first iteration of the loop,

we can combine both ksimd scopes into a single one with no practical
impact on how often/how long FP/SIMD is en/disabled, allowing us to
reuse the same stack slot for both FP/SIMD routine calls.

Fixes: ba3c1b3b5ac9 ("crypto/arm64: aes-blk - Switch to 'ksimd' scoped guard API")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20251203163803.157541-5-ardb@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-12-09 15:10:21 -08:00
Eric Biggers
68b233b1d5 lib/crypto: blake2s: Replace manual unrolling with unrolled_full
As we're doing in the BLAKE2b code, use unrolled_full to make the
compiler handle the loop unrolling.  This simplifies the code slightly.
The generated object code is nearly the same with both gcc and clang.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251205051155.25274-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-12-09 15:10:21 -08:00
Eric Biggers
2e8f7b170a lib/crypto: blake2b: Roll up BLAKE2b round loop on 32-bit
BLAKE2b has a state of 16 64-bit words.  Add the message data in and
there are 32 64-bit words.  With the current code where all the rounds
are unrolled to enable constant-folding of the blake2b_sigma values,
this results in a very large code size on 32-bit kernels, including a
recurring issue where gcc uses a large amount of stack.

There's just not much benefit to this unrolling when the code is already
so large.  Let's roll up the rounds when !CONFIG_64BIT.

To avoid having to duplicate the code, just write the code once using a
loop, and conditionally use 'unrolled_full' from <linux/unroll.h>.

Then, fold the now-unneeded ROUND() macro into the loop.  Finally, also
remove the now-unneeded override of the stack frame size warning.

Code size improvements for blake2b_compress_generic():

                  Size before (bytes)    Size after (bytes)
                  -------------------    ------------------
    i386, gcc           27584                 3632
    i386, clang         18208                 3248
    arm32, gcc          19912                 2860
    arm32, clang        21336                 3344

Running the BLAKE2b benchmark on a !CONFIG_64BIT kernel on an x86_64
processor shows a 16384B throughput change of 351 => 340 MB/s (gcc) or
442 MB/s => 375 MB/s (clang).  So clearly not much of a slowdown either.
But also that microbenchmark also effectively disregards cache usage,
which is important in practice and is far better in the smaller code.

Note: If we rolled up the loop on x86_64 too, the change would be
7024 bytes => 1584 bytes and 1960 MB/s => 1396 MB/s (gcc), or
6848 bytes => 1696 bytes and 1920 MB/s => 1263 MB/s (clang).
Maybe still worth it, though not quite as clearly beneficial.

Fixes: 91d689337fe8 ("crypto: blake2b - add blake2b generic implementation")
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251205050330.89704-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-12-09 15:10:21 -08:00
Eric Biggers
1cd5bb6e9e lib/crypto: riscv: Depend on RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS
Replace the RISCV_ISA_V dependency of the RISC-V crypto code with
RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS, which implies RISCV_ISA_V as
well as vector unaligned accesses being efficient.

This is necessary because this code assumes that vector unaligned
accesses are supported and are efficient.  (It does so to avoid having
to use lots of extra vsetvli instructions to switch the element width
back and forth between 8 and either 32 or 64.)

This was omitted from the code originally just because the RISC-V kernel
support for detecting this feature didn't exist yet.  Support has now
been added, but it's fragmented into per-CPU runtime detection, a
command-line parameter, and a kconfig option.  The kconfig option is the
only reasonable way to do it, though, so let's just rely on that.

Fixes: eb24af5d7a05 ("crypto: riscv - add vector crypto accelerated AES-{ECB,CBC,CTR,XTS}")
Fixes: bb54668837a0 ("crypto: riscv - add vector crypto accelerated ChaCha20")
Fixes: 600a3853dfa0 ("crypto: riscv - add vector crypto accelerated GHASH")
Fixes: 8c8e40470ffe ("crypto: riscv - add vector crypto accelerated SHA-{256,224}")
Fixes: b3415925a08b ("crypto: riscv - add vector crypto accelerated SHA-{512,384}")
Fixes: 563a5255afa2 ("crypto: riscv - add vector crypto accelerated SM3")
Fixes: b8d06352bbf3 ("crypto: riscv - add vector crypto accelerated SM4")
Cc: stable@vger.kernel.org
Reported-by: Vivian Wang <wangruikang@iscas.ac.cn>
Closes: https://lore.kernel.org/r/b3cfcdac-0337-4db0-a611-258f2868855f@iscas.ac.cn/
Reviewed-by: Jerry Shih <jerry.shih@sifive.com>
Link: https://lore.kernel.org/r/20251206213750.81474-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-12-09 15:10:21 -08:00
Vivian Wang
43169328c7 lib/crypto: riscv/chacha: Avoid s0/fp register
In chacha_zvkb, avoid using the s0 register, which is the frame pointer,
by reallocating KEY0 to t5. This makes stack traces available if e.g. a
crash happens in chacha_zvkb.

No frame pointer maintenance is otherwise required since this is a leaf
function.

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Fixes: bb54668837a0 ("crypto: riscv - add vector crypto accelerated ChaCha20")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20251202-riscv-chacha_zvkb-fp-v2-1-7bd00098c9dc@iscas.ac.cn
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-12-09 15:10:20 -08:00
Linus Torvalds
c9b47175e9 i2c-for-6.19-rc1
- general cleanups in bcm2835, designware, pcf8584, and stm32
 - amd-mp2: fix device refcount
 - designware: avoid interrupt storms caused by bad firmware
 - spacemit: fix device detection failures
 - new devices: Intel Diamond Rapids, Rockchip RK3506, Qualcomm Kaanapali
   and MSM8953
 - minor fixes to i801, core documentation, elektor Kconfig dependencies
 
 at24 updates:
 - add new compatible for Belling BL24S64
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmk4MacACgkQFA3kzBSg
 KbajAw/8CMDDB6ENq8aqnRqWCWEcjxcklIJi/6aDsnpUJr7jzf98hmrhlFzYQLqu
 iR6YMo9tt3eGTtv+CDAAABLIqQM5ivx155YSfw8tmfB7OZHpe8hTp72+aNJtJqup
 Rp8vu0vIbdcITE6ohxxJHi+DuBghq3CuZIxridx+ApV3JiuEQlqivvkZS2kz7hS6
 wYaUQWh8fc33HUY05jR1oJPoOyf2LkjNqcwSY3LF70GgiQ4TpMFOwWmKIsoW4u+/
 +i15bI8Vp5Q+DQ/Eu5GgDsSs188BGIY/Ydie50DB229ByetpCUrkjGN3MM8YMAP6
 TJHQtl7a6/zfgU5NCEWKKS1Pf1Pd5cVR8TvZcJ7tFiKCSU5het8QAIYtPqJ3ziJs
 WjRBAnkV6c5NVVzWuGx3wx/5NBQk1S5KLMGmjKqfHHRDdMGLnQYtXtf+rhOw0e+Y
 UjF6xG6JBtKYgbBe7vtJIFGcHXBS2yDePgRCKsmB81BpSC2Eb45Z+Dk7IcjUnTSL
 EqyEFs7lQArh+TMMEuxHfccp/L4um5hvC0WOY6nf5hOrV4H+wAbfpLU8mMtlUhr2
 yrxUFskzOCOjsxixwAtYX90wNhYRMUut0hJvW2ezD75JgFxlHJXUUtOjoyiO2weW
 jws5lXJHRiI77SHBoSLlr2j5W/K1rjvu1VTgis2Jv68ceTTU6pc=
 =+PBF
 -----END PGP SIGNATURE-----

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

Pull i2c updates from Wolfram Sang:

 - general cleanups in bcm2835, designware, pcf8584, and stm32

 - amd-mp2: fix device refcount

 - designware: avoid interrupt storms caused by bad firmware

 - spacemit: fix device detection failures

 - new devices: Intel Diamond Rapids, Rockchip RK3506, Qualcomm
   Kaanapali and MSM8953

 - minor fixes to i801, core documentation, elektor Kconfig dependencies

 - at24 updates: add new compatible for Belling BL24S64

* tag 'i2c-for-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (21 commits)
  i2c: qcom-cci: Add msm8953 compatible
  i2c: spacemit: fix detect issue
  i2c: amd-mp2: fix reference leak in MP2 PCI device
  i2c: i2c.h: fix a bad kernel-doc line
  i2c: i2c-elektor: Allow building on SMP kernels
  dt-bindings: i2c: qcom-cci: Document Kaanapali compatible
  dt-bindings: i2c: qcom-cci: Document msm8953 compatible
  dt-bindings: eeprom: at24: Add compatible for Belling BL24S64
  i2c: i801: Fix the Intel Diamond Rapids features
  i2c: pcf8584: Change pcf_doAdress() to pcf_send_address()
  i2c: pcf8584: Make pcf_doAddress() function void
  i2c: pcf8584: Move 'ret' variable inside for loop, goto out if ret < 0.
  i2c: designware: Disable SMBus interrupts to prevent storms from mis-configured firmware
  dt-bindings: i2c: i2c-rk3x: Add compatible string for RK3506
  i2c: i801: Add support for Intel Diamond Rapids
  i2c: stm32: Omit two variable reassignments in stm32_i2c_dma_request()
  i2c: designware: Omit a variable reassignment in dw_i2c_plat_probe()
  i2c: pcf8584: Fix do not use assignment inside if conditional
  i2c: pcf8584: Remove debug macros from i2c-algo-pcf.c
  i2c: busses: bcm2835: convert from round_rate() to determine_rate()
  ...
2025-12-10 07:48:05 +09:00
Linus Torvalds
9d588a1140 platform-drivers-x86 for v6.19-1
Highlights:
 
 - acer-wmi: Add PH16-72, PHN16-72, and PT14-51 fan control support
 
 - acpi: platform_profile: Add max-power profile option (power draw limited
                           by the cooling hardware, may exceed battery power
 			  draw limit when on AC power)
 
 - amd/hsmp: Allow >1 data-fabric per socket
 
 - asus-armoury: Add WMI attributes driver to expose miscellaneous
                 WMI functions through fw_attributes (deprecates
                 the custom BIOS features interface through asus-wmi)
 
 - asus-wmi: Use brightness_set_blocking() for kbd led
 
 - ayaneo-ec: Add Ayaneo Embedded Controller driver
 
 - fs/nls:
 
   - Fix utf16 -> utf8 string conversion in output size restricted cases
 
   - Improve error code consistency for utf8 -> utf32 conversions
 
 - ideapad-laptop: Fast (Rapid Charge) charge type support
 
 - intel/hid: Add Dell Pro Rugged 10/12 tablet to VGBS DMI quirks
 
 - intel/pmc:
 
   - Arrow Lake telemetry GUID improvements
 
   - Add support for Wildcat Lake PMC information
 
 - intel_pmc_ipc: Fix ACPI buffer memleak
 
 - intel/punit_ipc: Fix memory corruption
 
 - intel/vsec: Wildcat Lake PMT telemetry support
 
 - lenovo-wmi-gamezone: Map "Extreme" performance mode to max-power
 
 - lg-laptop: Add support for the HDAP opregion field
 
 - serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ missing projects
 
 - thinkpad-t14s-ec: Improve suspend/resume support (lid LEDs, keyboard
                     backlight)
 
 - uniwill: Add Uniwill laptop driver
 
 - wmi: Move under drivers/platform/wmi as non-x86 WMI support is around
        the corner and other WMI features will require adding more C
        files as well
 
 - tools/power/x86/intel-speed-select: v1.24
 
   - Check feature status to check if the feature enablement was successful
 
   - Reset SST-TF bucket structure to display valid bucket info
 
 - Miscellaneous cleanups / refactoring / improvements
 
 The following is an automated shortlog grouped by driver:
 
 acer-wmi:
  -  Add fan control support
  -  Add support for PHN16-72
  -  Enable fan control for PH16-72 and PT14-51
  -  Fix setting of fan behavior
 
 acpi:
  -  platform_profile - Add max-power profile option
 
 Add Uniwill laptop driver:
  - Add Uniwill laptop driver
 
 alienware-wmi-wmax:
  -  Simplify FW profile to pprof matching
 
 amd: hfi:
  -  Remove redundant assignment to .owner
  -  Remove unused cpumask from cpuinfo struct
 
 amd/hsmp:
  -  Replace amd_num_nodes() with topology_max_packages()
 
 amd/pmf:
  -  Add BIOS_INPUTS_MAX macro to replace hardcoded array size
  -  Refactor repetitive BIOS output handling
  -  Rename IPU metrics fields to NPU for consistency
  -  Replace magic table id with METRICS_TABLE_ID
  -  Use devm_mutex_init() for mutex initialization
  -  Use explicit SET_CMD/GET_CMD flags in amd_pmf_send_cmd()
 
 arm64: thinkpad-t14s-ec:
  -  add suspend handler for keyboard backlight
  -  add system PM hooks
 
 asus-armoury:
  -  add apu-mem control support
  -  add panel_hd_mode attribute
  -  add ppt_* and nv_* tuning knobs
  -  add screen auto-brightness toggle
  -  add support for FA507UV
  -  add support for GA503QR
  -  Fix error code in mini_led_mode_current_value_store()
  -  fix mini-led mode show
  -  fix only DC tunables being available
  -  move existing tunings to asus-armoury module
 
 asus-wmi:
  -  deprecate bios features
  -  export symbols used for read/write WMI
  -  rename ASUS_WMI_DEVID_PPT_FPPT
  -  use brightness_set_blocking() for kbd led
 
 ayaneo-ec:
  -  Add Ayaneo Embedded Controller platform driver
  -  Add charge control support
  -  Add controller power and modules attributes
  -  Add hwmon support
  -  Add suspend hook
  -  Move Ayaneo devices from oxpec to ayaneo-ec
 
 Documentation: laptops:
  -  Add documentation for uniwill laptops
 
 fs/nls:
  -  Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()
  -  Fix utf16 to utf8 conversion
 
 hp-wmi:
  -  Order DMI board name arrays
 
 ideapad-laptop: Add charge_types:
  - Fast (Rapid Charge)
 
 ideapad-laptop:
  -  Protect GBMD/SBMC calls with mutex
  -  Support multiple power_supply_ext definitions
  -  Use str_on_off() helper
 
 intel/hid:
  -  Add Dell Pro Rugged 10/12 tablet to VGBS DMI quirks
 
 intel/pmc:
  -  Add DMU GUID to Arrow Lake U/H
  -  Add support for multiple DMU GUIDs
  -  Enable SSRAM support for Wildcat Lake
 
 intel_pmc_ipc:
  -  fix ACPI buffer memory leak
 
 intel/pmc:
  -  Relocate lpm_req_guid to pmc_reg_map
  -  Remove redundant has_die_c6 variable
  -  Rename PMC index variable to pmc_idx
  -  Update Arrow Lake telemetry GUID
 
 intel/vsec:
  -  Add support for Wildcat Lake
 
 lenovo-wmi-gamezone Use max-power rather than balanced-performance:
  - lenovo-wmi-gamezone Use max-power rather than balanced-performance
 
 lg-laptop:
  -  Add support for the HDAP opregion field
 
 serial-multi-instantiate:
  -  Add IRQ_RESOURCE_OPT for IRQ missing projects
 
 surface: acpi-notify:
  -  add WQ_PERCPU to alloc_workqueue users
 
 surface: aggregator:
  -  Omit a variable reassignment in ssam_serial_hub_probe()
 
 surface:
  -  replace use of system_wq with system_percpu_wq
 
 tools/power/x86/intel-speed-select:
  -  Check feature status
  -  Reset isst_turbo_freq_info for invalid buckets
  -  v1.24 release
 
 uniwill:
  -  Add TUXEDO devices
  -  Handle more WMI events required for TUXEDO devices
 
 wmi-gamezone:
  -  Add Legion Go 2 Quirks
 
 wmi:
  -  Move WMI core code into a separate directory
  -  Remove extern keyword from prototypes
  -  Use correct type when populating ACPI objects
 
 x86-android-tablets:
  -  Omit a variable reassignment in lenovo_yoga_tab2_830_1050_init_codec()
 
 x86:
  -  replace use of system_wq with system_percpu_wq
 
 Merges:
  -  Merge branch 'fixes' of into for-next
  -  Merge branch 'intel-sst' of https://github.com/spandruvada/linux-kernel into for-next
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCaTgl5wAKCRBZrE9hU+XO
 McWDAP4nmj5+EeHsg3Kl0kQ1lqF9llWI4EM2NeRd6MwrV5klxgD9FLW6djGkmP2j
 RjtZ4CULbtQ3QMl7kmXhfAjRwJfiSgk=
 =yFvQ
 -----END PGP SIGNATURE-----

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

Pull x86 platform driver updates from Ilpo Järvinen:

 - acer-wmi: Add PH16-72, PHN16-72, and PT14-51 fan control support

 - acpi: platform_profile: Add max-power profile option (power draw
   limited by the cooling hardware, may exceed battery power draw limit
   when on AC power)

 - amd/hsmp: Allow more than one data-fabric per socket

 - asus-armoury: Add WMI attributes driver to expose miscellaneous WMI
   functions through fw_attributes (deprecates the custom BIOS features
   interface through asus-wmi)

 - asus-wmi: Use brightness_set_blocking() for kbd led

 - ayaneo-ec: Add Ayaneo Embedded Controller driver

 - fs/nls:
     - Fix utf16 to utf8 string conversion when output size restricted
     - Improve error code consistency for utf8 to utf32 conversions

 - ideapad-laptop: Fast (Rapid Charge) charge type support

 - intel/hid: Add Dell Pro Rugged 10/12 tablet to VGBS DMI quirks

 - intel/pmc:
     - Arrow Lake telemetry GUID improvements
     - Add support for Wildcat Lake PMC information

 - intel_pmc_ipc: Fix ACPI buffer memleak

 - intel/punit_ipc: Fix memory corruption

 - intel/vsec: Wildcat Lake PMT telemetry support

 - lenovo-wmi-gamezone: Map "Extreme" performance mode to max-power

 - lg-laptop: Add support for the HDAP opregion field

 - serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ missing
   projects

 - thinkpad-t14s-ec: Improve suspend/resume support (lid LEDs, keyboard
   backlight)

 - uniwill: Add Uniwill laptop driver

 - wmi: Move under drivers/platform/wmi as non-x86 WMI support is around
   the corner and other WMI features will require adding more C files as
   well

 - tools/power/x86/intel-speed-select: v1.24
     - Check feature status to check if the feature enablement was
       successful
     - Reset SST-TF bucket structure to display valid bucket info

 - Miscellaneous cleanups / refactoring / improvements

* tag 'platform-drivers-x86-v6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (73 commits)
  tools/power/x86/intel-speed-select: v1.24 release
  tools/power/x86/intel-speed-select: Reset isst_turbo_freq_info for invalid buckets
  tools/power/x86/intel-speed-select: Check feature status
  platform/x86: asus-wmi: use brightness_set_blocking() for kbd led
  fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()
  platform/x86: asus-armoury: add support for GA503QR
  platform/x86: intel_pmc_ipc: fix ACPI buffer memory leak
  platform/x86: hp-wmi: Order DMI board name arrays
  platform/x86/intel/hid: Add Dell Pro Rugged 10/12 tablet to VGBS DMI quirks
  platform: surface: replace use of system_wq with system_percpu_wq
  platform: x86: replace use of system_wq with system_percpu_wq
  platform/surface: acpi-notify: add WQ_PERCPU to alloc_workqueue users
  platform/x86: wmi-gamezone: Add Legion Go 2 Quirks
  platform/x86: lenovo-wmi-gamezone Use max-power rather than balanced-performance
  acpi: platform_profile - Add max-power profile option
  platform/x86/amd/pmf: Use devm_mutex_init() for mutex initialization
  platform/x86/amd/pmf: Add BIOS_INPUTS_MAX macro to replace hardcoded array size
  platform/x86: serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ missing projects
  platform/x86/amd/pmf: Refactor repetitive BIOS output handling
  platform/x86/uniwill: Add TUXEDO devices
  ...
2025-12-10 06:38:17 +09:00
Linus Torvalds
9f20d9bad5 More power management updates for 6.19-rc1
Fix a runtime PM unit test added during the 6.18 development cycle and
 change the pm_runtime_barrier() return type to void (Brian Norris).
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmk4BQ8SHHJqd0Byand5
 c29ja2kubmV0AAoJEO5fvZ0v1OO1sSwIAIBNY60EiGNHIVg4dyCbK/sVai66yJ1h
 Sj4cxfbQxCXBC6qWu8R2NBzDbXAgdsixLwaQcNn2ekhLwh1UzqFe2DWPSAsiIvoV
 FxE6fCJO5KzeTY2pIjiXfFdFsFsPwQkbqO2nwXBfoDz8HZolLnZGmRGWIqxAJ4LM
 kw9oefOhnD4VLd2Ce9pgbovZF/X+znKH5+9CgY+bD98NCcwlmOouz3vCXMYwJzn2
 F+/YJdNaLjtH4bGsojlknvOtnu3ZyM2bD4TzzJjOAe2gv+7yIA/Cv1rlnu0XffhB
 AQ8l3JBF4erIJ9lwmsRZpebchWYnq8VVbj1Fe+xh9CQdnIfnom2ZVik=
 =J7Q0
 -----END PGP SIGNATURE-----

Merge tag 'pm-6.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management updates from Rafael Wysocki:
 "Fix a runtime PM unit test added during the 6.18 development cycle and
  change the pm_runtime_barrier() return type to void (Brian Norris)"

* tag 'pm-6.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  coccinelle: Drop pm_runtime_barrier() error code checks
  PM: runtime: Make pm_runtime_barrier() return void
  PM: runtime: Stop checking pm_runtime_barrier() return code
2025-12-10 06:29:40 +09:00
Linus Torvalds
7a3984bbd6 just cleanups and fixes
-----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmk4DwkaHHRzYm9nZW5k
 QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHD/dA//d44V2BXq3KQa1mAfHVzL
 uujZ3wAs5mTuz/NRYWpwy5nmcyvXvRww3FoABA9ILhk6mAc3IXs0La6Q9PKulRfk
 GX3w5PpHrxS+p3cuX+UY/xEDlhjNrE9F7UUzJjMgbGAKGJHmP54tNqp4tuJ0WtHC
 XPfhXjvNBzDVRykXWhp0M4YoGyYzo8Gb6JqFQuZzBOwTK/0H1JwV7ArGWXfpQFNQ
 NLzsX5tuM9K7JnTZ3q22aJMzBhAF/qdwe0G8TPEZauUEFeDmg8HFyS4HRIK3OWPG
 NIVTDTgbTFmqr4kBKP9ymSdJha2AGwhHlPlcHZdM6UIyJui3tOZUuWXyluaDHKal
 ZG7YVW9pUmjsSaBzFNd0l9QNzeWOSJN7NUeM7Xdcko0SzlMuQiCoS1QcPp8g6JU9
 5uPe6dT01PrgE9Io6atiqNgZK0+tdzqY7Ny6tB2ar8HBfSh5Y6JTmat9SeQI51LP
 kBOCIgUw5+tjekym4UCqlC2x7CFJhxtzLT6VssZtsqrENk2NFisQKBE+IDLjwp7o
 Olc43SVok/ZBxLQus5g4UL0DvenOG965jj9Qb4tvIF3w6wmLsLr07TVew1BcC6k8
 thEtIcmoP+WTw27ESuPj0UejAX0v4tf8IRnePyJnfAtlz834rm26C/p3eN5MCcY4
 9vge9trDsy1GOzMDQRPOKvg=
 =X6/w
 -----END PGP SIGNATURE-----

Merge tag 'mips_6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS updates from Thomas Bogendoerfer:
 "Just cleanups and fixes"

* tag 'mips_6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: Fix whitespace damage in r4k_wait from VS timer fix
  mips: kvm: simplify kvm_mips_deliver_interrupts()
  MIPS: alchemy: mtx1: switch to static device properties
  mips: Remove __GFP_HIGHMEM masking
  MIPS: ftrace: Fix memory corruption when kernel is located beyond 32 bits
  MIPS: dts: Always descend vendor subdirectories
  mips: configs: loongson1: Update defconfig
  MIPS: Fix HOTPLUG_PARALLEL dependency
2025-12-10 06:20:22 +09:00
Christoph Hellwig
12eef14bcb lockref: add a __cond_lock annotation for lockref_put_or_lock
Add a cond_lock annotation for lockref_put_or_lock to make sparse
happy with using it.  Note that for this the return value has to be
double-inverted as the return value convention of lockref_put_or_lock
is inverted compared to _trylock conventions expected by __cond_lock,
as lockref_put_or_lock returns true when it did not need to take the
lock.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-12-10 05:58:51 +09:00
Linus Torvalds
c752c21c90 Convert "__auto_type" to "auto", defining a macro for "auto"
unless C23+ is in use.
 
 ---
  arch/nios2/include/asm/uaccess.h                      |  8 ++++----
  arch/x86/include/asm/bug.h                            |  2 +-
  arch/x86/include/asm/string_64.h                      |  6 +++---
  arch/x86/include/asm/uaccess_64.h                     |  2 +-
  fs/proc/inode.c                                       | 19 +++++++++----------
  include/linux/cleanup.h                               |  6 +++---
  include/linux/compiler.h                              |  2 +-
  include/linux/compiler_types.h                        | 13 +++++++++++++
  include/linux/minmax.h                                |  6 +++---
  .../testing/selftests/bpf/prog_tests/socket_helpers.h |  9 +++++++--
  tools/virtio/linux/compiler.h                         |  2 +-
  11 files changed, 46 insertions(+), 29 deletions(-)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEbQEHvGnuWidP2bYMLbPDMhtt34YFAmk4grQACgkQLbPDMhtt
 34Z9zQ//VKM0xKkCGVPfRBbL33O+DIcDfZjk6jokAl47aKAwJxrSTfT+Hdnmwsnv
 i7gKwaioYxDjnZlsfCzDbwbHexPTMGjsjgRNmFK3uS1mv1AhTspV2Jjn9qiYzd5o
 N+Cvzv7eIr88ti1dKe+7MZBa9j37nsGKZDzT0M/GubBlzIgMzeCZ6xAxOOV/TmD9
 sP17oU65MhczegpXH/fcxyK7atkvlWskPfc+50YB5T3C96hqzT0LDiU/vBSHIJ8z
 EyqSRYlt2To17BdcKQEKYcklduFZwJ/02UWDT4RYJRGBSkn6ohPJJwYsjI5Cvl5m
 9yPRLLqW/LsA5O5CZ/mq/tM0xiDdm5dCTEEbiwk90Lg1XTVxmpbTbMjjN1MCAy+a
 HYjsq9nWkYl9xXVBHk7CqgAjITAV7Z4ZZN//JLrJleQsD794EP3vYBzEaa370deP
 L22lONVSjpPm6m+Rr1fjObRDFQxs4piobUavxIj2JKaF48G8mSA0uAOG0nBRQkR1
 jOTsMhqH33z9XNxb52BlFdaVkQGkHNlLeONc/ivGiDMKox5oCb/gveKOQ+PXYnLN
 IRTllLqke0fuOQrgLa5lu135J6ZbPHDOgH+P19OwNrBQnOMQqzTr7DnENVoanIy7
 ocVc6vS3OX4qhZ+7uVpHugbnSCWOoCzBgV4xcZrIdh4qpTKzM+g=
 =Cu2O
 -----END PGP SIGNATURE-----

Merge tag 'auto-type-conversion-for-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-auto

Pull __auto_type to auto conversion from Peter Anvin:
 "Convert '__auto_type' to 'auto', defining a macro for 'auto' unless
  C23+ is in use"

* tag 'auto-type-conversion-for-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-auto:
  tools/virtio: replace "__auto_type" with "auto"
  selftests/bpf: replace "__auto_type" with "auto"
  arch/x86: replace "__auto_type" with "auto"
  arch/nios2: replace "__auto_type" and adjacent equivalent with "auto"
  fs/proc: replace "__auto_type" with "const auto"
  include/linux: change "__auto_type" to "auto"
  compiler_types.h: add "auto" as a macro for "__auto_type"
2025-12-10 05:41:10 +09:00