summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
6 daysremoteproc: Add compile testing for additional TI driversAndrew Davis
Many Remoteproc drivers, including K3, can and are built for compile testing. The WKUP_M3, Keystone, and DA8xx can be also, enable this here. Doing this exposes a compile warning on 64bit platforms as size_t changes size, use the correct printf format specifier for size_t. We cannot compile test for OMAP_REMOTEPROC due to dependency on OMAP clock framework. But while here fix up the Kconfig help text which claims this driver only works for OMAP4, when it really works across several OMAP-class devices. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Beleswar Padhi <b-padhi@ti.com> Link: https://lore.kernel.org/r/20260904195634.2275867-3-afd@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
6 daysremoteproc: k3-dsp: Fix usage of omap_mbox_message and mbox_msg_tAndrew Davis
The type of message sent using omap-mailbox is always u32. The definition of mbox_msg_t is uintptr_t which is wrong as that type changes based on the architecture (32bit vs 64bit). Make the type fixed to u32. This then means we need to fix the helper macro omap_mbox_message so it doesn't cast to u32 twice. What this macro should be doing is converting from the message type returned from the mailbox framework into the omap-mailbox type. When fixing this we should add a macro for the other direction (from omap-mailbox type to something that can be used with mbox_send_message). After these changes, make use of the new macros as appropriate. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Beleswar Padhi <b-padhi@ti.com> Link: https://lore.kernel.org/r/20260904195634.2275867-2-afd@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
6 daysremoteproc: k3: Include what we need and only what we needAndrew Davis
The header ti_k3_common.h uses several definitions in headers it does not include itself, this makes users of this header responsible for including the right headers first. Instead include what we need here. Then go and remove some headers that we do not use from the K3 Remoteproc drivers. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Beleswar Padhi <b-padhi@ti.com> Link: https://lore.kernel.org/r/20260904195634.2275867-1-afd@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
6 daystools/testing/cxl: Enable zero sized decoders under hb0Richard Cheng
The kernel now allows committed zero-size HDM decoders so BIOS can lock empty decoders; cxl_test needs to exercise that path. Add a mock_zero_size_decoders module parameter (default off). When set, the special endpoints under host-bridge0 (cxl_mem.0 and cxl_mem.4) commit decoders 1 and 2 as zero-size + locked above the decoder[0] auto-region, mirrored on the parent switch and host bridge. The mocks take a real zero-size DPA reservation, like enumeration of real hardware, so commit_end lands on a zero-size decoder and the reservation, poison-by-endpoint, and teardown paths all run. Signed-off-by: Vishal Aslot <vaslot@nvidia.com> Signed-off-by: Richard Cheng <icheng@nvidia.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Link: https://patch.msgid.link/20260914090858.19181-4-icheng@nvidia.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
6 dayscxl/hdm: Allow zero sized HDM decodersRichard Cheng
CXL r4.0 §8.2.4.20.12 ("Committing Decoder Programming") and §14.13.10 ("CXL HDM Decoder Zero Size Commit") permit committing an HDM decoder with size 0. BIOS may commit and lock such decoders so the OS cannot program regions through them, this is a design choice rather than a spec requirement. The kernel rejected these with -ENXIO during port enumeration and aborted the whole port, so affected systems showed nothing under "cxl list". Treat empty decoders as first class reservations. Back them with a separately allocated resource, since the resource tree cannot represent an empty range, and keep the skip and hdm_end accounting intact. Exclude empty decoders from region assembly and avoid zero-length poison queries. Suggested-by: Dan Williams <djbw@kernel.org> Signed-off-by: Vishal Aslot <vaslot@nvidia.com> Signed-off-by: Richard Cheng <icheng@nvidia.com> Reviewed-by: Dan Williams <djbw@kernel.org> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20260914090858.19181-3-icheng@nvidia.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
6 dayscxl/region: Simplify poison_by_decoder() error handlingRichard Cheng
"rc" carries both an error code and the loop control signal for device_for_each_child(), so returning it bare is misleading, the early guards mean "keep walking", not "no error". Zeroing "rc" to forgive an -EFAULT on a RAM partition adds to that by discarding what the device actually returned. Return a literal 0 where the walk should continue, and test the forgiven case directly instead of rewriting "rc". Give that test a name, poison_efault_forgiven(), so cxl_get_poison_unmapped() and poison_by_decoder() spell the same rule the same way. No functional change. Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Richard Cheng <icheng@nvidia.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20260914090858.19181-2-icheng@nvidia.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
6 daysremoteproc: core: Set trace buffer name for diagnosticsYonghao Zhang
rproc_trace_read() (in remoteproc_debugfs.c) prints the name of a trace buffer whose device address could not be resolved, but nothing ever assigns trace_mem.name, so that the diagnostics always prints an empty string: Trace not available Copy the generated "trace%d" name into the memory entry, so the diagnostics identifies the buffer failed to translate. Fixes: a987e6b91a5a ("remoteproc: fix trace buffer va initialization") Assisted-by: Claude-Code:glm-5.3 Signed-off-by: Yonghao Zhang <hyz3367@gmail.com> Link: https://lore.kernel.org/r/20260911081810.740028-1-hyz3367@gmail.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
6 daysremoteproc: sysfs: Fix stale coredump attribute documentationYonghao Zhang
The documentation of the 'coredump' sysfs entry still advertises a "default" configuration option and describes it as the default value of the entry. Both date back to before the option was renamed to "enabled" and the default configuration was changed to "disabled". Update the comment to describe the three options the store callback actually accepts, "disabled", "enabled" and "inline", along with the real default value, and fix the coredump_show() comment which wrongly claims the configuration is exposed via debugfs. Assisted-by: Claude-Code:glm-5.3 Signed-off-by: Yonghao Zhang <hyz3367@gmail.com> Link: https://lore.kernel.org/r/20260911030944.1645477-1-hyz3367@gmail.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
6 daysMerge branch 'misc' into for-nextJames Bottomley
6 daysdrm/imagination: Avoid initialisation of unused FW trace buffer pointerAlessio Belle
This pointer, which is part of struct rogue_fwif_tracebuf_space (a FW interface structure), was initialised but never used to access the FW trace buffer - only the source pointer in the initialisation being removed is used. Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com> Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com> Link: https://patch.msgid.link/20260910-b4-avoid-init-of-unused-fw-trace-buffer-pointer-v1-2-7e10274384c2@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
6 daysdrm/imagination: Collect KCCB initialisationMatt Coster
There's one FW object attached to KCCB usage (the return buffer) that is separately initialised in pvr_fw_init(). Move this initialisation to pvr_kccb_init() alongside the initialisation of rest of the members of struct pvr_device->kccb. Signed-off-by: Matt Coster <matt.coster@imgtec.com> Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com> Reviewed-by: Alessio Belle <alessio.belle@imgtec.com> Link: https://patch.msgid.link/20260910-b4-avoid-init-of-unused-fw-trace-buffer-pointer-v1-1-7e10274384c2@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
6 daysdrm/imagination: Manage FW VM context from its init and fini callbacksAlessio Belle
While the MIPS firmware virtual memory context is created and destroyed from within the MIPS firmware init and fini callbacks, the META and RISC-V firmware contexts are created and destroyed from within blocks right before or after those callbacks. Match the logic for all firmware processors by moving those blocks to the META and RISC-V init and fini callbacks. Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com> Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com> Link: https://patch.msgid.link/20260915-b4-upstream-manage-fw-vm-context-from-init-and-fini-v2-1-c9cb43667143@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
6 daysdrm/imagination: Remove duplicated CCB control initialisationAlessio Belle
The same is already done by the ccb_ctrl_init() callback. Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com> Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com> Link: https://patch.msgid.link/20260915-b4-upstream-remove-duplicate-ccb-control-init-v2-1-ba0a6ae63a20@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
6 daysdrm/imagination: Move FWCORE_* macros to register definesMatt Coster
Move FWCORE_* macros to pvr_rogue_cr_defs.h where they should have been from the beginning. Signed-off-by: Matt Coster <matt.coster@imgtec.com> Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com> Reviewed-by: Alessio Belle <alessio.belle@imgtec.com> Link: https://patch.msgid.link/20260810-b4-unify-repeated-reg-defs-and-move-fwcore-macros-v2-2-991ae813fd88@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
6 daysdrm/imagination: Unify repeated register definesMatt Coster
Some register definitions are annotated as "Register group: X, with N repeats". The only difference between all the N copies of those definitions is the register addresses which can be unified into a BASE/OFFSET pair. Typical usage patterns of these repeated registers do not involve hardcoding individual instances, so using any specific defines is semantically incorrect. Signed-off-by: Matt Coster <matt.coster@imgtec.com> Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com> Reviewed-by: Alessio Belle <alessio.belle@imgtec.com> Link: https://patch.msgid.link/20260810-b4-unify-repeated-reg-defs-and-move-fwcore-macros-v2-1-991ae813fd88@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
6 daysdrm/imagination: Explicitly set CACHED flag on META FWMatt Coster
For completeness, OR in the CACHED flags when we're not ORing in the UNCACHED counterparts. One of these is probably zero, but (a) it isn't evident just by reading these lines, and (b) the compiler will make it disappear in that case. Signed-off-by: Matt Coster <matt.coster@imgtec.com> Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com> Reviewed-by: Alessio Belle <alessio.belle@imgtec.com> Link: https://patch.msgid.link/20260914-b4-cached-flag-on-meta-fw-v2-1-160b0e4e160f@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
6 daysASoC: Intel: avs: Remove topology-loading wrappersCezary Rojewski
With recent changes avs_load_topology() became unused whereas avs_remove_topology() is a simple wrapper. Drop them both. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20260915101037.3087956-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
6 daysASoC: cs35l56: Add KUnit tests for regmap defaults tableRichard Fitzgerald
Add test cases to cs35l56-shared-test to sanity-check the regmap defaults table: - Table is sorted in order of increasing address (which also means there cannot be duplicate entries). - Volatile registers don't have a default. - Defaulted registers are readable. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260915103121.3306373-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
6 daysMerge branch 'v7.3-next/dts64' into for-nextAngeloGioacchino Del Regno
6 daysarm64: dts: mediatek: mt7988a-bananapi-bpi-r4: add ramoops regionMartino Dell'Ambrogio
Reserve 1 MiB of RAM just below the ARM Trusted Firmware secmon region (0x42f00000-0x43000000) for persistent kernel log storage via pstore/ramoops, allowing post-panic console output and oops dumps to be recovered after a reboot. Without it, kernel crash logs on this board are lost when the SoC warm-resets and the on-chip console buffer is reinitialised. With record-size=128 KiB, console-size=256 KiB, ftrace-size=64 KiB and pmsg-size=64 KiB, ramoops_probe() carves the post-console remainder (640 KiB) into five 128 KiB kmsg records, with the requested ecc-size=16 reserving a small Reed-Solomon parity block from each zone's own allocation (per persistent_ram_new()). The ECC lets pstore recover dumps even when the panic path truncates writes mid-record. The no-map property is required so the reserved region is kept out of the kernel linear map. ramoops remaps the carve-out write-combine via ioremap_wc(); on arm64, leaving the same physical RAM mapped cacheable in the linear map at the same time is an attribute-mismatch and risks losing panic data to dirty cache evictions from the linear alias. The carve-out sits immediately below the ATF region already declared at 0x43000000 in mt7988a.dtsi, so no other reserved-memory child is moved or resized. BPI-R4 ships with at least 4 GiB of DRAM starting at 0x40000000, so the region is well within installed memory on every variant. For the carve-out to actually preserve content across a reset, the boot loader must also avoid touching this region on warm reset; on standard BPI-R4 boards with the stock OpenWrt U-Boot fork this already holds. Signed-off-by: Martino Dell'Ambrogio <tillo@tillo.ch> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
6 daysdrm/tests: hdmi: fix infoframes testsMika Penttilä
drm_atomic_commit() calls drm_atomic_check_only() internally. Calling drm_atomic_check_only() explicitly before the commit leaves the state marked as checked and triggers drm_WARN_ON(state->checked) when the commit checks the state again. Remove the redundant explicit checks. Fixes: 7436a87db99d ("drm/tests: hdmi: check the infoframes behaviour") Cc: Maxime Ripard <mripard@kernel.org> Signed-off-by: Mika Penttilä <mpenttil@redhat.com> Link: https://patch.msgid.link/20260914040723.2593700-1-mpenttil@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
6 daysdrm/amdgpu_dm: tests: Fix wrong variable declaration after merge conflictMaxime Ripard
Commit 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state") converted dm_test_plane_create_state_initializes_state() to call amdgpu_dm_plane_drm_plane_create_state(), which returns a struct drm_plane_state pointer stored in a new plane_state variable. However, the merge conflict resolution kept the old declaration (struct dm_plane_state *old_state) instead of replacing it with struct drm_plane_state *plane_state, leaving an unused variable with the wrong type. Fix the declaration to match what the conversion intended. Fixes: 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state") Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260915101251.1711103-1-mripard@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
6 daysof: fdt: fix "Cound" typo in fdt_translate_address()Hemanth Selam
The comment above the count_cells() call reads "Cound address cells" where it should read "Count address cells", which is what the call below it does. Comment only, no functional change. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Link: https://patch.msgid.link/20260909123501.215711-1-hemanth.selam@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
6 daysASoC: dt-bindings: Use consistent indentation in the exampleKrzysztof Kozlowski
Correct indentation in the examples to consistent 2- or 4-spaces indentation to fix dt-check-style warnings ("example 0 [indent-consistent] indent mismatch ..."). Preferred is 4-spaces, but re-indenting entire example just for that is too much churn. While changing the lines, correct also node name to be generic in cirrus,cs35l45.yaml, cirrus,cs42l42.yaml and dialog,da7219.yaml. Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20260915063317.28971-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
6 daysdrm/i915/fb: replace kmalloc_array with kmalloc_objsLalit Shankar Chowdhury
Replace the remaining kmalloc_array instance with kmalloc_objs. Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@gmail.com> Link: https://patch.msgid.link/20260910155846.79513-1-lalitshankarch@gmail.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 daysksmbd: print IPv6 client addresses correctly in procfsGael Blivet
conn->inet_addr and conn->inet6_addr share a union, and three procfs printers choose between them by testing whether inet_addr is zero. For an IPv6 peer that field aliases the first four bytes of the address, which are zero only for :: prefixed addresses, so a client with a global IPv6 address takes the IPv4 branch and is listed from those four bytes. A client at 2001:db8::1 is listed as 32.1.13.184. IPv4 mapped addresses begin with zero bytes, so the listing is correct until a native IPv6 client connects. Record the address family where the address is stored and select on that, in the client listing and in both session listings. Fixes: fe4dc5987d7d ("ksmbd: expose connection runtime state in procfs") Signed-off-by: Gael Blivet <gael.blivet@gmail.com> Assisted-by: Claude:claude-opus-5 Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: fix AFP_AfpInfo header fields in synthesized xattrGael Blivet
smb2_set_stream_name_xattr() synthesizes a 60-byte AFP_AfpInfo xattr when a client opens a nonexistent one on a Time Machine share, so the probe is answered instead of failing with -EBADF. Its header does not match what clients write: ksmbd uses 0x00051607 and 0x00020000 for the first two fields and leaves the third zero. The user.DosStream.AFP_AfpInfo:$DATA xattr a macOS client writes begins: 00000000: 4146 5000 0000 0100 0000 0000 0000 0080 AFP............. Write those sixteen bytes: the signature, the version at offset 4 and the backup time at offset 12. The 60-byte length is already correct and the rest stays zeroed: a zero type and creator lets the client use the file extension for icon and type detection. Fixes: eaff8e924f60 ("ksmbd: synthesize empty AFP_AfpInfo xattr on first probe") Signed-off-by: Gael Blivet <gael.blivet@gmail.com> Assisted-by: Claude:claude-opus-5 Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: look up stream size by exact xattr nameGael Blivet
get_file_stream_info() walks the xattr list from a single ksmbd_vfs_listxattr() and sizes each stream it finds with ksmbd_vfs_casexattr_len(), which matches with strncasecmp(). Linux xattr names are case-sensitive, so two streams differing only in case report each other's size. The loop already holds the exact name, so query it directly with ksmbd_vfs_xattr_len(), which is what casexattr_len() calls once its search succeeds. Make it non-static and declare it in vfs.h, and drop the comment above it, which describes a different bug and no longer matches the code. This also drops a full listing per stream: casexattr_len() runs its own listxattr on every call, so enumerating a file with N xattrs cost N listings instead of one. Fixes: 689f1eb3719d ("ksmbd: report actual xattr value length in stream enumeration") Signed-off-by: Gael Blivet <gael.blivet@gmail.com> Assisted-by: Claude:claude-opus-5 Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: copy stream content when renaming to a new stream nameGael Blivet
smb2_rename() creates the target stream with ksmbd_vfs_setxattr(..., NULL, 0, ...), so the source stream's content is not carried over and renaming a named stream produces a zero-length stream. Read the source stream and write it under the new name. The lookup is case-insensitive because smb2_set_stream_name_xattr() stores fp->stream.name with the client's casing, which need not be the casing on disk. A rename to the stream the handle already refers to does nothing; that comparison is case-insensitive too, since every lookup in this path is. A read failure now fails the rename instead of creating an empty target, and a write failure reports its own errno rather than -EINVAL, since writing a value can fail where writing an empty one could not. Initialize s_type, which parse_stream_name() assigns only when the name carries an explicit stream type and which selects the target xattr name. parse_stream_name() leaves the stream name empty when the stream part is, as in "::$DATA" or ":", returning NULL for the first spelling and "" for the second. Return without creating an xattr in either case, after the base name check so that a base ending in '/' is covered too. These previously created xattrs named "(null)" and "". The source xattr is left in place and fp->stream.name still refers to it, as before this change: readers of that pointer take no lock, so it cannot be swapped here. Signed-off-by: Gael Blivet <gael.blivet@gmail.com> Assisted-by: Claude:claude-opus-5 Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: doc: update feature statusNamjae Jeon
Add MSDFS, Continuous Availability (CA), and AD/DC to the ksmbd feature status list, along with resilient handle. Mark Continuous Availability, AD/DC, persistent handle, and SMB2 notify as under development. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: test maximal-access DACL walk boundaryHang Nan
Add a maximal-access variant of the smb_check_perm_dacl() boundary test. The in-boundary ACE grants read access, while a trailing ACE beyond the declared DACL size grants write access. Verify that maximal-access calculation includes the in-boundary permission and ignores the trailing permission. Suggested-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Hang Nan <nanx95726@gmail.com> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: test smb_check_perm_dacl() DACL walk boundaryHang Nan
Drive smb_check_perm_dacl() through ksmbd's NTACL xattr path with a crafted descriptor whose second ACE is beyond the declared DACL size. Verify that the out-of-boundary ACE is not selected and access remains denied. Suggested-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Hang Nan <nanx95726@gmail.com> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: add KUnit test for the DACL walk boundaryHang Nan
smb_check_perm_dacl() must stop walking ACEs at the DACL declared size instead of using the enclosing security descriptor length. Add the ksmbd KUnit test configuration and a semantic harness that verifies a crafted access-granting ACE beyond the declared DACL size is ignored. Suggested-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Suggested-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Hang Nan <nanx95726@gmail.com> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: doc: update RDMA feature support statusNamjae Jeon
ksmbd supports SMB3 encryption over RDMA, while signing over RDMA is still under development. Update the feature status table accordingly. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: doc: update SMB3 multichannel support statusNamjae Jeon
SMB3 request replay support is now available. Update the ksmbd documentation to reflect that SMB3 multichannel is supported. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: refactor smb2_notify() to a blocking waitGael Blivet
The previous design registered a synthetic work struct (in_work) directly on conn->async_requests and deferred the response to a workqueue -- a bespoke async/cancel implementation duplicating what setup_async_work(), release_async_work(), and smb2_send_interim_resp() already provide for smb2_lock()'s pending byte-range lock. Replace it with that same pattern: setup_async_work() on the calling work itself, registered on fp->blocked_works, woken by cancel or by the handle closing via the existing set_close_state_blocked_works(). This removes the synthetic work struct, the notify_pendings list and its close-time drain, and the deferred workqueue send, leaving smb2_notify() sharing the same async/cancel machinery as smb2_lock() instead of its own separate copy. The worker now blocks on ksmbd_wq for as long as the watch stays open, instead of returning immediately. This also makes the skeleton ready for a future event-delivery implementation on the same blocking wait. Suggested-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Gael Blivet <gael.blivet@gmail.com> Assisted-by: Claude:claude-sonnet-5 Tested-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 dayssmb/server: support compound fid in notify requestsChenXiaoSong
A Windows client can send a compound request containing: Create Request, File: <share>; Notify Request The Notify Request uses FFFF...FFFF as the compound FID. Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: fix overflow in dacloffset bounds check in build_sec_desc()Giorgi Kobakhia
When the large dacl_offset is provided, dacl_offset + sizeof(struct smb_acl) overflows on 32-bit builds and the check is passed, Which makes le16_to_cpu(ppdacl_ptr->size) read out-of-bounds. This only happens for dacl_offset in range [0xFFFFFFF8, 0xFFFFFFFF]. So the oob read is max 8 bytes preceding the allocated ppntsd. unsigned int dacl_offset = le32_to_cpu(ppntsd->dacloffset); int ppdacl_size, ntacl_size = ppntsd_size - dacl_offset; if (!dacl_offset || (dacl_offset + sizeof(struct smb_acl) > ppntsd_size)) goto out; Commit beff0bc9d69b ("ksmbd: fix overflow in dacloffset bounds check") fixes similar checks in other functions. But leaves this one out, because it is only valid for 32-bit builds. Reproduced on 32-bit ARM with KASAN, by a client sending SMB2 SET_INFO(SEC) with dacloffset=0xfffffff8, then QUERY_INFO(SEC) on the same file: BUG: KASAN: slab-out-of-bounds in build_sec_desc (fs/smb/server/smbacl.c:1105) Read of size 2 at addr c2a273fa by task kworker/1:1/35 CPU: 1 UID: 0 PID: 35 Comm: kworker/1:1 Not tainted 7.3.0-rc2+ #5 Workqueue: ksmbd-io handle_ksmbd_work Call trace: kasan_check_range from build_sec_desc (fs/smb/server/smbacl.c:1105) build_sec_desc from smb2_query_info (fs/smb/server/smb2pdu.c:7676) smb2_query_info from handle_ksmbd_work (fs/smb/server/server.c:160) handle_ksmbd_work from process_one_work (kernel/workqueue.c:3401) process_one_work from worker_thread (kernel/workqueue.c:3473) worker_thread from kthread (kernel/kthread.c:436) Add overflow check. Fixes: 8f0541186e9a ("ksmbd: fix heap-based overflow in set_ntacl_dacl()") Cc: stable@vger.kernel.org Assisted-by: LLM claude Tested-by: Xiang Mei <xmei5@asu.edu> Signed-off-by: Giorgi Kobakhia <gkobakhi@asu.edu> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: report IPv4 and IPv6 addresses independently in iface queryHenry Hu
fsctl_query_iface_info_ioctl() appends an entry before checking that a usable address was found, so it advertises unspecified-address placeholders: an entry containing 0.0.0.0 when an in_device exists but has no primary IPv4 address, and an entry containing :: when an inet6_dev exists but its address list is empty or every address is tentative or deprecated. The loop also couples IPv6 reporting to IPv4 success: when __in_dev_get_rtnl() returns NULL it continues to the next interface, skipping the IPv6 pass, so an interface without an in_device is dropped even if it has a usable IPv6 address. Query IPv4 and IPv6 independently and append an entry only when an address is found. Factor out the common entry initialization and query the link speed once per interface instead of once per address family. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Reported-by: Sashiko <sashiko-bot+sashiko@kernel.org> Link: https://sashiko.dev/#/patchset/20260910090818.24479-1-15815827059%40163.com Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Henry Hu <huhai@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: fix invalid Next offset in interface info repliesHenry Hu
fsctl_query_iface_info_ioctl() assigns nii_rsp to the next output slot before checking whether the interface has an in_device or inet6_dev. If either lookup returns NULL, the loop continues without advancing nbytes, leaving nii_rsp pointing at an uncommitted slot. If no later entry is committed, clearing nii_rsp->Next updates that slot instead of the last returned entry, leaving the latter with a nonzero Next offset. Fix this by using nbytes to locate the last committed entry and clear its Next field, but only when the response contains at least one entry. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Reported-by: Sashiko <sashiko-bot+sashiko@kernel.org> Link: https://sashiko.dev/#/patchset/20260910090818.24479-1-15815827059%40163.com Signed-off-by: Henry Hu <huhai@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: fix unlocked IPv6 addr_list walk in fsctl_query_iface_info_ioctl()Henry Hu
fsctl_query_iface_info_ioctl() walks idev6->addr_list with a plain list_for_each_entry() while holding only rtnl_lock(). rtnl does not serialize all writers of this list: the DAD-failure path (addrconf_dad_failure -> ipv6_add_addr) can insert addresses without holding RTNL. It updates idev->addr_list with list_add_tail_rcu() under write_lock_bh(&idev->lock), so it can race with the unlocked walk. addr_list is RCU managed, so walk it with list_for_each_entry_rcu() under rcu_read_lock(), matching the other lockless readers of the list. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Reported-by: Sashiko <sashiko-bot+sashiko@kernel.org> Link: https://sashiko.dev/#/patchset/20260910090818.24479-1-15815827059%40163.com Co-developed-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Signed-off-by: Henry Hu <huhai@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: fix link speed query in fsctl_query_iface_info_ioctl()Henry Hu
fsctl_query_iface_info_ioctl() used to call netdev->ethtool_ops->get_link_ksettings() directly and never checked the return value. If the callback fails, cmd.base.speed may be left uninitialized. Also, SPEED_UNKNOWN (-1) is treated as a numeric link speed and would be converted into a bogus link speed. Use __ethtool_get_link_ksettings() to acquire the per-netdev ops lock when needed. Fall back to 1Gbps when the query fails, or when the reported speed is 0 or SPEED_UNKNOWN. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: Henry Hu <huhai@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: fix invalid pointer dereference when get_inode_acl() failsHenry Hu
When get_inode_acl() fails, it returns an ERR_PTR(), but ksmbd_acls_fattr() stored that pointer in smb_fattr without checking for errors. Later callers then passed the error pointer to security descriptor helpers or posix_acl_release(), resulting in an invalid pointer dereference. This was reproduced on an XFS-backed share when xfs_get_acl() returned ERR_PTR(-ENOMEM). Querying the SMB ACL from a CIFS client triggered the crash: BUG: unable to handle page fault for address: fffffffffffffff8 RIP: smb_acl_sec_desc_scratch_len+0x58/0x90 [ksmbd] Call Trace: smb2_query_info+0x40d/0x17c0 [ksmbd] handle_ksmbd_work+0x1ca/0x770 [ksmbd] Fix this by checking the return values from get_inode_acl() in ksmbd_acls_fattr(). Treat -EOPNOTSUPP as indicating that no ACL is available, and propagate all other errors to the callers. Update smb2_open() and smb2_get_info_sec() to handle these errors. Cc: stable@vger.kernel.org Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Assisted-by: Codex:gpt-5.6-sol Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Henry Hu <huhai@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: keep compound responses on query info errorsNamjae Jeon
Do not reset the RFC1002 length of the complete response when a query info buffer is too small. The current command will add its error response through ksmbd_iov_pin_rsp(), while resetting the base length can truncate earlier responses in a compound request. This lets ksmbd return the earlier responses and the query-info error response together. Remove the now-unused rsp_org parameter from the pipe query-info helpers. Fixes: e2b76ab8b5c9 ("ksmbd: add support for read compound") Reported-by: Mobin Aydinfar <mobin@mobintestserver.ir> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysksmbd: fix partial normalized name responsesNamjae Jeon
Windows may request FILE_NORMALIZED_NAME_INFORMATION with an output buffer that only fits the fixed portion of the variable-length response. Treat the fixed portion as FILE_NORMALIZED_NAME_INFORMATION_SIZE so ksmbd returns STATUS_BUFFER_OVERFLOW instead of STATUS_INFO_LENGTH_MISMATCH. This avoids rejecting valid partial normalized-name responses. Fixes: 6b8b79226bc3 ("ksmbd: fix partial file information responses") Reported-by: Mobin Aydinfar <mobin@mobintestserver.ir> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
6 daysMerge branch 'v7.3-next/dts64' into for-nextAngeloGioacchino Del Regno
6 daysarm64: dts: mediatek: mt7986a-bananapi-bpi-r3: add ramoops regionMartino Dell'Ambrogio
Reserve 64 KiB of RAM just below the ARM Trusted Firmware secmon region (0x42ff0000-0x43000000) for persistent kernel log storage via pstore/ramoops, allowing post-panic console output and oops dumps to be recovered after a warm reset. Without it, kernel crash logs on this board are lost when the SoC reboots. The zone sizes (record-size=8 KiB, console-size=32 KiB, ftrace-size=8 KiB, pmsg-size=8 KiB) consume the full 64 KiB carve-out. The requested ecc-size=16 reserves a small Reed-Solomon parity block from each zone's own allocation in persistent_ram_new(), which lets pstore recover dumps even when the panic path truncates writes mid-record. The no-map property is required so the reserved region is kept out of the kernel linear map. ramoops remaps the carve-out write-combine via ioremap_wc(); on arm64, leaving the same physical RAM mapped cacheable in the linear map at the same time is an attribute-mismatch and risks losing panic data to dirty cache evictions from the linear alias. The region sits immediately below the ATF block already declared at 0x43000000 in mt7986a.dtsi, so no other reserved-memory child is moved or resized. BPI-R3 ships with 2 GiB of DRAM starting at 0x40000000, well above 0x43000000, so the region is always within installed memory. For the carve-out to actually preserve content across a reset, the boot loader must avoid touching this region on warm reset; on standard BPI-R3 boards with the stock OpenWrt U-Boot fork this already holds. Signed-off-by: Martino Dell'Ambrogio <tillo@tillo.ch> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
6 daysclk: ti: clean-up simple provider misuse of the consumer APIJerome Brunet
Clock provider should not be using the consumer interface. In other words, a provider should not be dealing with struct clk. This change targets occurrences for which the provider uses the consumer interface and corresponding clk_hw interface exist. Reviewed-by: Brian Masney <bmasney@redhat.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/20260724-clk-provider-simple-clean-v2-7-56f306156d25@baylibre.com Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
6 daystcp: do not let tcp_rmem be set below 4096Eric Dumazet
We can hit a division by zero crash in tcp_rcvbuf_grow() and tcp_rcv_space_adjust(): divide error: 0000 [#1] PREEMPT SMP RIP: 0010:tcp_rcvbuf_grow+0x187/0x450 net/ipv4/tcp_input.c:939 ... grow = div_u64(((u64)rcvwin << 1) * (newval - oldval), oldval); The division uses oldval = tp->rcvq_space.space as divisor. When tp->rcvq_space.space is zero, this leads to a divide-by-zero exception. tp->rcvq_space.space is initialized in tcp_init_buffer_space(): tp->rcvq_space.space = min3(tp->rcv_ssthresh, tp->rcv_wnd, (u32)TCP_INIT_CWND * tp->advmss); If tcp_rmem[1] is configured to very small values (such as 1), sk->sk_rcvbuf is initialized to 1. Then tcp_full_space(sk), which computes (sk->sk_rcvbuf * scaling_ratio) >> 8, truncates to 0. This sets tp->window_clamp = 0, tp->rcv_ssthresh = 0, and tp->rcvq_space.space = 0. Later, when data arrives and DRS is invoked, tcp_rcvbuf_grow() divides by oldval == 0. Back in 2015, commit b1cb59cf2efe ("net: sysctl_net_core: check SNDBUF and RCVBUF for min length") ensured that net.core.rmem_default and net.core.rmem_max cannot be set below SOCK_MIN_RCVBUF. Similarly, SO_RCVBUF setsockopt enforces max_t(int, val * 2, SOCK_MIN_RCVBUF). However, net.ipv4.tcp_rmem still had .extra1 = SYSCTL_ONE, allowing arbitrarily small values. Because SOCK_MIN_RCVBUF depends on sizeof(struct sk_buff) and cacheline alignment, its value varies across architectures and configuration options. Using a fixed constant of 4096 ensures a predictable, architecture- independent lower bound that is safely above SOCK_MIN_RCVBUF everywhere and matches the documented 4K default. Fix this by setting tcp_rmem.extra1 to 4096 and updating the documentation. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260912144848.3448026-1-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
6 daysselftests: drv-net: devmem: set reuseaddr on the sender's source portJakub Kicinski
devmem.py fails on the HW runners with: CMD[remote]: dd if=/dev/zero bs=512 count=1 2>/dev/null | socat -b 512 \ -u - TCP6:[fd00:2::1]:50051,bind=[fd00:2::2]:50051,nodelay STDERR: socat[41018] W bind(5, {AF=10 [fd00:2::2]:50051}, 28): \ Address already in use ncdevmem installs a 5-tuple flow rule which matches the source port, so socat has to bind it explicitly. The port comes from rand_port(), which checks availability on the DUT - but we bind on the remote... That said the failure rate seems to high to be random collisions (~2% per sub-test). It's probably TIME_WAIT sockets on the remote, run_rx_hds() alone creates 12 of them. Set reuseaddr so a TIME_WAIT socket does not fail the bind. Collisions with a live socket are still possible, we'll see if they are frequent enough to care. Reviewed-by: Breno Leitao <leitao@debian.org> Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/20260912203101.153688-1-kuba@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>