summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-25drm/xe/query: fix gt_id bounds checkMatthew Auld
The user provided gt_id should always be less than the XE_MAX_GT_PER_TILE. Fixes: 7793d00d1bf5 ("drm/xe: Correlate engine and cpu timestamps with better accuracy") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Cc: <stable@vger.kernel.org> # v6.8+ Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Acked-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240321110629.334701-2-matthew.auld@intel.com (cherry picked from commit 4b275f502a0d3668195762fb55fa00e659ad1b0b) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-03-25drm/xe/device: fix XE_MAX_TILES_PER_DEVICE checkMatthew Auld
Here XE_MAX_TILES_PER_DEVICE is the gt array size, therefore the gt index should always be less than. v2 (Lucas): - Add fixes tag. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Acked-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240318180532.57522-6-matthew.auld@intel.com (cherry picked from commit a96cd71ec7be0790f9fc4039ad21be8d214b03a4) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-03-25drm/xe/device: fix XE_MAX_GT_PER_TILE checkMatthew Auld
Here XE_MAX_GT_PER_TILE is the total, therefore the gt index should always be less than. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240318180532.57522-5-matthew.auld@intel.com (cherry picked from commit a5ef563b1d676548a4c5016540833ff970230964) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-03-25drm/xe/queue: fix engine_class bounds checkMatthew Auld
The engine_class is the index into the user_to_xe_engine_class, therefore it needs to be less than. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240318180532.57522-4-matthew.auld@intel.com (cherry picked from commit fe87b7dfcb204a161d1e38b0e787b2f5ab520f32) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-03-25drm/xe/guc_submit: use jiffies for job timeoutMatthew Auld
drm_sched_init() expects jiffies for the timeout, but here we are passing the timeout in ms. Convert to jiffies instead. Fixes: eef55700f302 ("drm/xe: Add sysfs for default engine scheduler properties") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240314121554.223229-2-matthew.auld@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit 2c5b70f74d61438a071a19370e63c234d2bd8938) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-03-25drm/xe: Remove unused xe_bo->props structNirmoy Das
Property struct is not being used so remove it and related dead code. Fixes: ddfa2d6a846a ("drm/xe/uapi: Kill VM_MADVISE IOCTL") Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: intel-xe@lists.freedesktop.org Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240311151159.10036-1-nirmoy.das@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit 002d8f0b4f76aabbf8e00c538a124b91625d7260) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-03-25riscv, bpf: Fix kfunc parameters incompatibility between bpf and riscv abiPu Lehui
We encountered a failing case when running selftest in no_alu32 mode: The failure case is `kfunc_call/kfunc_call_test4` and its source code is like bellow: ``` long bpf_kfunc_call_test4(signed char a, short b, int c, long d) __ksym; int kfunc_call_test4(struct __sk_buff *skb) { ... tmp = bpf_kfunc_call_test4(-3, -30, -200, -1000); ... } ``` And its corresponding asm code is: ``` 0: r1 = -3 1: r2 = -30 2: r3 = 0xffffff38 # opcode: 18 03 00 00 38 ff ff ff 00 00 00 00 00 00 00 00 4: r4 = -1000 5: call bpf_kfunc_call_test4 ``` insn 2 is parsed to ld_imm64 insn to emit 0x00000000ffffff38 imm, and converted to int type and then send to bpf_kfunc_call_test4. But since it is zero-extended in the bpf calling convention, riscv jit will directly treat it as an unsigned 32-bit int value, and then fails with the message "actual 4294966063 != expected -1234". The reason is the incompatibility between bpf and riscv abi, that is, bpf will do zero-extension on uint, but riscv64 requires sign-extension on int or uint. We can solve this problem by sign extending the 32-bit parameters in kfunc. The issue is related to [0], and thanks to Yonghong and Alexei. Link: https://github.com/llvm/llvm-project/pull/84874 [0] Fixes: d40c3847b485 ("riscv, bpf: Add kfunc support for RV64") Signed-off-by: Pu Lehui <pulehui@huawei.com> Tested-by: Puranjay Mohan <puranjay12@gmail.com> Reviewed-by: Puranjay Mohan <puranjay12@gmail.com> Link: https://lore.kernel.org/r/20240324103306.2202954-1-pulehui@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-03-25staging: vc04_services: fix information leak in create_component()Dan Carpenter
The m.u.component_create.pid field is for debugging and in the mainline kernel it's not used anything. However, it still needs to be set to something to prevent disclosing uninitialized stack data. Set it to zero. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Cc: stable <stable@kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/2d972847-9ebd-481b-b6f9-af390f5aabd3@moroto.mountain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: vc04_services: changen strncpy() to strscpy_pad()Arnd Bergmann
gcc-14 warns about this strncpy() that results in a non-terminated string for an overflow: In file included from include/linux/string.h:369, from drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:20: In function 'strncpy', inlined from 'create_component' at drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:940:2: include/linux/fortify-string.h:108:33: error: '__builtin_strncpy' specified bound 128 equals destination size [-Werror=stringop-truncation] Change it to strscpy_pad(), which produces a properly terminated and zero-padded string. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240313163712.224585-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: vc04_services: vchiq_core: Stop kthreads on shutdownUmang Jain
The various kthreads thread functions (slot_handler_func, sync_func, recycle_func) in vchiq_core and vchiq_keepalive_thread_func in vchiq_arm should be stopped on vchiq_shutdown(). This also address the following TODO item: * Fix kernel module support hence drop it from the TODO item list. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Link: https://lore.kernel.org/r/20240321130737.898154-6-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: vc04_services: Implement vchiq_bus .removeUmang Jain
Implement the struct vchiq_bus .remove() so that cleanup paths can be executed by the devices registered to this bus, when being removed. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Link: https://lore.kernel.org/r/20240321130737.898154-5-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: vc04_services: Do not log error on kzalloc()Umang Jain
Do not log any error for kzalloc() error path. kzalloc() already reports such errors. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Link: https://lore.kernel.org/r/20240321130737.898154-4-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: vc04_services: vchiq_arm: Use appropriate dev_* log helpersUmang Jain
Re-evaluate logs on error code paths and fix a few error logs with appropriate dev_* logging helpers. No functional changes intended in this patch. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Link: https://lore.kernel.org/r/20240321130737.898154-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: vc04_services: Remove unused function declarationsUmang Jain
vchiq_loud_error-* are not implemented hence, remove their declarations. This seem to be remnants of custom logging helpers which were removed earlier. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Link: https://lore.kernel.org/r/20240321130737.898154-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: rtl8712: Add space between operands and operatorAyush Tiwari
Add whitespace in union recvstat between operator '>>' and operands 'RXDESC_SIZE' and '2' to conform to common kernel coding style. Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com> Link: https://lore.kernel.org/r/ZgCYHwYOmqfwMeU0@ayush-HP-Pavilion-Gaming-Laptop-15-ec0xxx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: rtl8712: Remove additional spaceAyush Tiwari
Remove additional whitespaces in SwLedOn() between u8 and LedCfg to conform to common kernel coding style. Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com> Link: https://lore.kernel.org/r/ZgCWdfJit4Ly14NB@ayush-HP-Pavilion-Gaming-Laptop-15-ec0xxx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: pi433: Correct comment typos in pi433_if.cFelix N. Kimbu
Correct typos in comments accross driver file pi433_if.c. Signed-off-by: Felix N. Kimbu <felixkimbu1@gmail.com> Link: https://lore.kernel.org/r/Zf5xxbEpFfU5GMiY@MOLeToid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: rtl8712: Fix line length exceeding 100 columnsAyush Tiwari
Split the argument list of the kthread_run function call across two lines to address the checkpatch warning "line length exceeds 100 columns". Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/ZfvaZd92bnoZ9M1m@ayush-HP-Pavilion-Gaming-Laptop-15-ec0xxx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: vt6655: Remove unused declaration of ↵Dorine Tipo
RFbAL7230SelectChannelPostProcess() Remove unused function RFbAL7230SelectChannelPostProcess declared in rf.h but has no associated implementation. Commit dd2837bdea0e removed the RFbAL7230SelectChannelPostProcess() but accidentally forgot to delete the declaration in the header file. Fixes: dd2837bdea0e ("staging: vt6655: Remove unused byRFType in rf.c") Signed-off-by: Dorine Tipo <dorine.a.tipo@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240316204207.1779-1-dorine.a.tipo@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: wlan-ng: Rename 'wlan_unsetup' to 'wlan_teardown'Felix N. Kimbu
Rename function identifier 'wlan_unsetup' to 'wlan_teardown' in files p80211netdev.c, p80211netdev.h and prism2usb.c, a pairing function for 'wlan_setup' to match common kernel coding style. Signed-off-by: Felix N. Kimbu <felixkimbu1@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/ZfGG093fyjI4G/ci@MOLeToid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: rtl8712: rename tmpVal to avg_valAyush Tiwari
Rename tmpVal to avg_val in process_link_qual() to reflect the intended use of the variable and conform to the kernel coding style. Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Fabio M. De Francesco <fabio.maria.de.francesco@linux.intel.com> Link: https://lore.kernel.org/r/ZfF+qu+CGHlpHrtY@ayush-HP-Pavilion-Gaming-Laptop-15-ec0xxx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: wlan-ng: Rename 'foo' to 'rc' in p80211conv.cFelix N. Kimbu
Rename identifier 'foo' to 'rc' in skb_p80211_to_ether() and skb_ether_to_p80211() to match the common kernel coding style. Signed-off-by: Felix N. Kimbu <felixkimbu1@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/ZfEvTF7qwYZORGsY@MOLeToid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Merge branch '6.9/scsi-queue' into 6.9/scsi-fixesMartin K. Petersen
Pull in the outstanding updates from the 6.9/scsi-queue branch. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-03-25Staging: rtl8192e: Rename variable WriteIntoRegTree Davies
Rename variable WriteIntoReg to write_into_reg to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-11-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable bAllowAllDATree Davies
Rename variable bAllowAllDA to allow_all_da to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-10-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable pBssHTTree Davies
Rename variable pBssHT to bss_ht to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-9-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable bRTSUseShortPreambleTree Davies
Rename variable bRTSUseShortPreamble to rts_use_short_preamble to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-8-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable posHTCapTree Davies
Rename variable posHTCap to pos_ht_cap to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable aSifsTimeTree Davies
Rename variable aSifsTime to asifs_time to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable Frame_OrderTree Davies
Rename variable Frame_Order frame_order to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable TimeStampHighTree Davies
Rename variable TimeStampHigh to time_stamp_high to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable TimeStampLowTree Davies
Rename variable TimeStampLow to time_stamp_low to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25Staging: rtl8192e: Rename variable ReturnPointTree Davies
Rename variable ReturnPoint to return_point to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240310235552.4217-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: rtl8192e: replace variable with direct returnMichael Straube
Remove the variable rt_status from rtl92e_send_cmd_pkt() and return true/false directly to improve readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240312051816.18717-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25RAS/AMD/FMPM: Safely handle saved records of various sizesYazen Ghannam
Currently, the size of the locally cached FRU record structures is based on the module parameter "max_nr_entries". This creates issues when restoring records if a user changes the parameter. If the number of entries is reduced, then old, larger records will not be restored. The opportunity to take action on the saved data is missed. Also, new records will be created and written to storage, even as the old records remain in storage, resulting in wasted space. If the number of entries is increased, then the length of the old, smaller records will not be adjusted. This causes a checksum failure which leads to the old record being cleared from storage. Again this results in another missed opportunity for action on the saved data. Allocate the temporary record with the maximum possible size based on the current maximum number of supported entries (255). This allows the ERST read operation to succeed if max_nr_entries has been increased. Warn the user if a saved record exceeds the expected size and fail to load the module. This allows the user to adjust the module parameter without losing data or the opportunity to restore larger records. Increase the size of a saved record up to the current max_rec_len. The checksum will be recalculated, and the updated record will be written to storage. Fixes: 6f15e617cc99 ("RAS: Introduce a FRU memory poison manager") Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Tested-by: Muralidhara M K <muralidhara.mk@amd.com> Link: https://lore.kernel.org/r/20240319113322.280096-3-yazen.ghannam@amd.com
2024-03-25Staging: rtl8192e: Declare variable with staticAriel Silver
Fixed sparse warning: "'dm_rx_path_sel_table' was not declared. Should it be static?" As dm_rx_path_sel_table is used only in rtl_dm.c it should be static. Signed-off-by: Ariel Silver <arielsilver77@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240309174722.3463-1-arielsilver77@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25RAS/AMD/FMPM: Avoid NULL ptr deref in get_saved_records()Yazen Ghannam
An old, invalid record should be cleared and skipped. Currently, the record is cleared in ERST, but it is not skipped. This leads to a NULL pointer dereference when attempting to copy the old record to the new record. Continue the loop after clearing an old, invalid record to skip it. Fixes: 6f15e617cc99 ("RAS: Introduce a FRU memory poison manager") Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Tested-by: Muralidhara M K <muralidhara.mk@amd.com> Link: https://lore.kernel.org/r/20240319113322.280096-2-yazen.ghannam@amd.com
2024-03-25Merge tag 'gfs2-v6.8-fix' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: - Fix boundary check in punch_hole * tag 'gfs2-v6.8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix invalid metadata access in punch_hole
2024-03-25Merge tag 'v6.9-p2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes a regression that broke iwd as well as a divide by zero in iaa" * tag 'v6.9-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: iaa - Fix nr_cpus < nr_iaa case Revert "crypto: pkcs7 - remove sha1 support"
2024-03-25staging: greybus: Add blank line after struct declarationDorine Tipo
Add a blank line after the loopback_class struct declaration to improve code readability and adherence to coding style guidelines Signed-off-by: Dorine Tipo <dorine.a.tipo@gmail.com> Acked-by: Julia Lawall <julia.lawall@inria.fr> Link: https://lore.kernel.org/r/20240310104714.22224-1-dorine.a.tipo@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25staging: greybus: Constify gb_audio_module_typeAyush Tiwari
Constify static struct kobj_type gb_audio_module_type to prevent modification of data shared across many instances and to address the checkpatch warning that "gb_audio_module_type" should be const. The "gb_audio_module_type" struct is only used in one place: err = kobject_init_and_add(&m->kobj, &gb_audio_module_type, NULL, ... so checkpatch is correct that it can be made const. Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/ZfiQsZBrHfImIJfc@ayush-HP-Pavilion-Gaming-Laptop-15-ec0xxx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-25igc: Remove stale comment about Tx timestampingKurt Kanzenbach
The initial igc Tx timestamping implementation used only one register for retrieving Tx timestamps. Commit 3ed247e78911 ("igc: Add support for multiple in-flight TX timestamps") added support for utilizing all four of them e.g., for multiple domain support. Remove the stale comment/FIXME. Fixes: 3ed247e78911 ("igc: Add support for multiple in-flight TX timestamps") Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Tested-by: Naama Meir <naamax.meir@linux.intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2024-03-25ixgbe: avoid sleeping allocation in ixgbe_ipsec_vf_add_sa()Przemek Kitszel
Change kzalloc() flags used in ixgbe_ipsec_vf_add_sa() to GFP_ATOMIC, to avoid sleeping in IRQ context. Dan Carpenter, with the help of Smatch, has found following issue: The patch eda0333ac293: "ixgbe: add VF IPsec management" from Aug 13, 2018 (linux-next), leads to the following Smatch static checker warning: drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c:917 ixgbe_ipsec_vf_add_sa() warn: sleeping in IRQ context The call tree that Smatch is worried about is: ixgbe_msix_other() <- IRQ handler -> ixgbe_msg_task() -> ixgbe_rcv_msg_from_vf() -> ixgbe_ipsec_vf_add_sa() Fixes: eda0333ac293 ("ixgbe: add VF IPsec management") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/intel-wired-lan/db31a0b0-4d9f-4e6b-aed8-88266eb5665c@moroto.mountain Reviewed-by: Michal Kubiak <michal.kubiak@intel.com> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2024-03-25ice: fix memory corruption bug with suspend and rebuildJesse Brandeburg
The ice driver would previously panic after suspend. This is caused from the driver *only* calling the ice_vsi_free_q_vectors() function by itself, when it is suspending. Since commit b3e7b3a6ee92 ("ice: prevent NULL pointer deref during reload") the driver has zeroed out num_q_vectors, and only restored it in ice_vsi_cfg_def(). This further causes the ice_rebuild() function to allocate a zero length buffer, after which num_q_vectors is updated, and then the new value of num_q_vectors is used to index into the zero length buffer, which corrupts memory. The fix entails making sure all the code referencing num_q_vectors only does so after it has been reset via ice_vsi_cfg_def(). I didn't perform a full bisect, but I was able to test against 6.1.77 kernel and that ice driver works fine for suspend/resume with no panic, so sometime since then, this problem was introduced. Also clean up an un-needed init of a local variable in the function being modified. PANIC from 6.8.0-rc1: [1026674.915596] PM: suspend exit [1026675.664697] ice 0000:17:00.1: PTP reset successful [1026675.664707] ice 0000:17:00.1: 2755 msecs passed between update to cached PHC time [1026675.667660] ice 0000:b1:00.0: PTP reset successful [1026675.675944] ice 0000:b1:00.0: 2832 msecs passed between update to cached PHC time [1026677.137733] ixgbe 0000:31:00.0 ens787: NIC Link is Up 1 Gbps, Flow Control: None [1026677.190201] BUG: kernel NULL pointer dereference, address: 0000000000000010 [1026677.192753] ice 0000:17:00.0: PTP reset successful [1026677.192764] ice 0000:17:00.0: 4548 msecs passed between update to cached PHC time [1026677.197928] #PF: supervisor read access in kernel mode [1026677.197933] #PF: error_code(0x0000) - not-present page [1026677.197937] PGD 1557a7067 P4D 0 [1026677.212133] ice 0000:b1:00.1: PTP reset successful [1026677.212143] ice 0000:b1:00.1: 4344 msecs passed between update to cached PHC time [1026677.212575] [1026677.243142] Oops: 0000 [#1] PREEMPT SMP NOPTI [1026677.247918] CPU: 23 PID: 42790 Comm: kworker/23:0 Kdump: loaded Tainted: G W 6.8.0-rc1+ #1 [1026677.257989] Hardware name: Intel Corporation M50CYP2SBSTD/M50CYP2SBSTD, BIOS SE5C620.86B.01.01.0005.2202160810 02/16/2022 [1026677.269367] Workqueue: ice ice_service_task [ice] [1026677.274592] RIP: 0010:ice_vsi_rebuild_set_coalesce+0x130/0x1e0 [ice] [1026677.281421] Code: 0f 84 3a ff ff ff 41 0f b7 74 ec 02 66 89 b0 22 02 00 00 81 e6 ff 1f 00 00 e8 ec fd ff ff e9 35 ff ff ff 48 8b 43 30 49 63 ed <41> 0f b7 34 24 41 83 c5 01 48 8b 3c e8 66 89 b7 aa 02 00 00 81 e6 [1026677.300877] RSP: 0018:ff3be62a6399bcc0 EFLAGS: 00010202 [1026677.306556] RAX: ff28691e28980828 RBX: ff28691e41099828 RCX: 0000000000188000 [1026677.314148] RDX: 0000000000000000 RSI: 0000000000000010 RDI: ff28691e41099828 [1026677.321730] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [1026677.329311] R10: 0000000000000007 R11: ffffffffffffffc0 R12: 0000000000000010 [1026677.336896] R13: 0000000000000000 R14: 0000000000000000 R15: ff28691e0eaa81a0 [1026677.344472] FS: 0000000000000000(0000) GS:ff28693cbffc0000(0000) knlGS:0000000000000000 [1026677.353000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1026677.359195] CR2: 0000000000000010 CR3: 0000000128df4001 CR4: 0000000000771ef0 [1026677.366779] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [1026677.374369] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [1026677.381952] PKRU: 55555554 [1026677.385116] Call Trace: [1026677.388023] <TASK> [1026677.390589] ? __die+0x20/0x70 [1026677.394105] ? page_fault_oops+0x82/0x160 [1026677.398576] ? do_user_addr_fault+0x65/0x6a0 [1026677.403307] ? exc_page_fault+0x6a/0x150 [1026677.407694] ? asm_exc_page_fault+0x22/0x30 [1026677.412349] ? ice_vsi_rebuild_set_coalesce+0x130/0x1e0 [ice] [1026677.418614] ice_vsi_rebuild+0x34b/0x3c0 [ice] [1026677.423583] ice_vsi_rebuild_by_type+0x76/0x180 [ice] [1026677.429147] ice_rebuild+0x18b/0x520 [ice] [1026677.433746] ? delay_tsc+0x8f/0xc0 [1026677.437630] ice_do_reset+0xa3/0x190 [ice] [1026677.442231] ice_service_task+0x26/0x440 [ice] [1026677.447180] process_one_work+0x174/0x340 [1026677.451669] worker_thread+0x27e/0x390 [1026677.455890] ? __pfx_worker_thread+0x10/0x10 [1026677.460627] kthread+0xee/0x120 [1026677.464235] ? __pfx_kthread+0x10/0x10 [1026677.468445] ret_from_fork+0x2d/0x50 [1026677.472476] ? __pfx_kthread+0x10/0x10 [1026677.476671] ret_from_fork_asm+0x1b/0x30 [1026677.481050] </TASK> Fixes: b3e7b3a6ee92 ("ice: prevent NULL pointer deref during reload") Reported-by: Robert Elliott <elliott@hpe.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2024-03-25ice: Refactor FW data type and fix bitmap casting issueSteven Zou
According to the datasheet, the recipe association data is an 8-byte little-endian value. It is described as 'Bitmap of the recipe indexes associated with this profile', it is from 24 to 31 byte area in FW. Therefore, it is defined to '__le64 recipe_assoc' in struct ice_aqc_recipe_to_profile. And then fix the bitmap casting issue, as we must never ever use castings for bitmap type. Fixes: 1e0f9881ef79 ("ice: Flesh out implementation of support for SRIOV on bonded interface") Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Andrii Staikov <andrii.staikov@intel.com> Reviewed-by: Jan Sokolowski <jan.sokolowski@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Steven Zou <steven.zou@intel.com> Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2024-03-25kunit: fix wireless test dependenciesJohannes Berg
For the wireless tests, CONFIG_WLAN and CONFIG_NETDEVICES are needed, though seem to be available by default on ARCH=um, so we didn't notice this before. Add them to fix kunit running on other architectures. Fixes: 28b3df1fe6ba ("kunit: add wireless unit tests") Reported-by: Mark Brown <broonie@kernel.org> Closes: https://lore.kernel.org/r/b743a5ec-3d07-4747-85e0-2fb2ef69db7c@sirena.org.uk/ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25ALSA: hda: cs35l56: Set the init_done flag before component_add()Simon Trimmer
Initialization is completed before adding the component as that can start the process of the device binding and trigger actions that check init_done. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Message-ID: <20240325145510.328378-1-rf@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-03-25ALSA: hda: cs35l56: Raise device name message log levelSimon Trimmer
The system and amplifier names influence which firmware and tuning files are downloaded to the device; log these values to aid end-user system support. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Message-ID: <20240325142937.257869-1-rf@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-03-25net: mark racy access on sk->sk_rcvbuflinke li
sk->sk_rcvbuf in __sock_queue_rcv_skb() and __sk_receive_skb() can be changed by other threads. Mark this as benign using READ_ONCE(). This patch is aimed at reducing the number of benign races reported by KCSAN in order to focus future debugging effort on harmful races. Signed-off-by: linke li <lilinke99@qq.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-03-25wifi: iwlwifi: mvm: include link ID when releasing framesBenjamin Berg
When releasing frames from the reorder buffer, the link ID was not included in the RX status information. This subsequently led mac80211 to drop the frame. Change it so that the link information is set immediately when possible so that it doesn't not need to be filled in anymore when submitting the frame to mac80211. Fixes: b8a85a1d42d7 ("wifi: iwlwifi: mvm: rxmq: report link ID to mac80211") Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240320232419.bbbd5e9bfe80.Iec1bf5c884e371f7bc5ea2534ed9ea8d3f2c0bf6@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>