| Age | Commit message (Collapse) | Author |
|
Choose unsigned integers instead of signed where natural and required to
ensure defined overflow behavoir.
Simplify an arithmetic expression too.
No functional change is expected, as the relevant variables normally never
reach values where this transition matters.
Assisted-by: Deepseek:v4-pro Kimi:K2.6 ChatGPT:GPT-5.5 Claude:Sonnet-4.6
Assisted-by: Sashiko-0.2.5:gemini-3.1-pro-preview
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://patch.msgid.link/20261009074557.19996-6-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Change the type of jiffies-related deadline variables from long to
unsigned long, and remove unnecessary casts when computing time
remaining as deadline - jiffies.
No functional change is expected: although signed overflow is undefined
in the C standard, processors perform the calculation correctly in
practice. Using unsigned arithmetic is nevertheless the proper way to
handle jiffies differences.
Assisted-by: Deepseek:v4-pro Kimi:K2.6 ChatGPT:GPT-5.5 Claude:Sonnet-4.6
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://patch.msgid.link/20261009074557.19996-5-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The host flow controls the payload data flow from the FPGA by sending
OPCODE_SET_CHECKPOINT messages. Fix the condition for sending such a
message, to correctly handle the case where leap < 0.
The previous expression leap > (fifo->size >> 3) was not intended to
evaluate true when leap is negative. However, due to C's integer
promotion rules, leap (of s32 type) is promoted to unsigned int when
compared with the unsigned fifo->size >> 3 expression. As a result,
negative leap values are interpreted as large positive numbers, causing
the condition to evaluate true unintentionally.
Consequently, the device receives correctly formed checkpoint messages
that encourage it to send data, but too frequently. This may cause the
device to send short data chunks, wasting USB bandwidth.
Assisted-by: Deepseek:v4-pro Kimi:K2.6 ChatGPT:GPT-5.5 Claude:Sonnet-4.6
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://patch.msgid.link/20261009074557.19996-4-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove dedicated code for the error path, which is both redundant and
incorrect: It calls kref_put() before mutex_unlock(&chan->lock). As
kref_put() may result in releasing the memory containing the mutex, this
could lead to UAF.
Assisted-by: Deepseek:v4-pro Kimi:K2.6 ChatGPT:GPT-5.5 Claude:Sonnet-4.6
Assisted-by: Sashiko-0.2.5:gemini-3.1-pro-preview
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://patch.msgid.link/20261009074557.19996-3-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This commit addresses two issues by using mutexes:
(1) Add a mutex to protect the fifo_buf_order global variable. The
purpose of this variable is avoid repeated failed calls to
__get_free_pages() for allocating FIFO memory, when the chunk
size was too big. However, if two drivers are initialized at the
same time, fifo_init() may run in parallel, and fifo_buf_order
may be reduced too much. This is a far-fetched scenario, now
completely prevented by fifo_buf_order_mutex.
(2) setup_channels() acquires process_in_mutex to prevent
process_bulk_in() from accessing the xillyusb_dev struct. With
correctly working hardware, process_bulk_in() is never called while
setup_channels() runs, because the device has no reason to send data
in that phase. The mutex ensures that process_bulk_in() does not
touch the members that setup_channels() alters.
There is no similar protection for data flow in the other direction,
because during the setup process, the only outbound data is the
BULK endpoint used for commands, and it remains untouched after its
initial setup.
Assisted-by: Deepseek:v4-pro Kimi:K2.6 ChatGPT:GPT-5.5 Claude:Sonnet-4.6
Assisted-by: Sashiko-0.2.5:gemini-3.1-pro-preview
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://patch.msgid.link/20261009074557.19996-2-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers
Memory controller drivers for v7.4
1. Broadcom DPFE: Fix handling kernel memory accesses with malicious or
compromised firmware and possible out-of-bounds read triggered by
buggy co-processor. Also validate firmware image contents before
processing it.
2. Renesas RPC IF: One fix for volatile register access, several
cleanups and enable autosuspend in runtime PM.
3. Several minor improvements and fixes for various drivers: TI EMIF,
Samsung Exynos5422 DMC, Nvidia Tegra264 and STM32 OMM. The fixes
seems to be effect of LLM usage, thus they were neither reproduced
nor tested, making them non-critical fixes.
4. Mediatek SMI: Add support for MT8189 SoC.
* tag 'memory-controller-drv-7.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
memory: stm32_omm: fix child clock leak on set_amcr() error path
memory: emif: Remove const from min_tck allocation type
memory: mtk-smi: Add MT8189 support
dt-bindings: memory-controllers: mtk-smi: Add support for mt8189
memory: emif: fix device_node reference leak on np_ddr
memory: tegra: Refactor Tegra264 mc-err code
memory: tegra: Parameterise Tegra264 MCF slice bound
memory: tegra: Use named defines for Tegra264 MC apertures
memory: exynos5422-dmc: handle clock enable failures
memory: emif: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
memory: brcmstb_dpfe: validate firmware section sizes
memory: renesas-rpc-if: Use runtime PM autosuspend after transfers
memory: renesas-rpc-if: Consolidate command setup register programming
memory: renesas-rpc-if: Consolidate XSPI_CDTBUF0 updates in read path
memory: renesas-rpc-if: Consolidate XSPI_CDTBUF0 updates in write path
memory: renesas-rpc-if: Move static bridge configurations out of dirmap hot paths
memory: renesas-rpc-if: Mark XSPI_CDD1BUF0 as volatile
memory: brcmstb_dpfe: Bounds check DCPU-supplied MSG_ARG_COUNT
memory: brcmstb_dpfe: Fix out-of-bounds access due to DCPU offset
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
cdev_add() can fail. The driver currently ignores the return value and
reports probe success even when the cdev was not registered, leaving a
chrdev region allocated with no working file operations.
Check the return value, emit an error, and unwind the chrdev region and
platform device on failure.
Fixes: 635adb6cd25c ("[PATCH] scx200_gpio: use 1 cdev for N minors, not N for N")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
Link: https://patch.msgid.link/20260803015450.2050900-1-gonglinkai@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
When a function-like macro expands to an expression, that expression
doesn't need a semicolon after it. All uses have been verified to
have their own semicolons.
This was found using the following Coccinelle semantic patch:
@r@
identifier i : script:ocaml() { String.lowercase_ascii i = i };
expression e;
@@
*#define i(...) e;
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://patch.msgid.link/20260801191002.1383835-14-Julia.Lawall@inria.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers
Samsung SoC drivers for v7.4
1. First driver patches for Exynos5515.
2. Fix error paths and possible probe-ordering issue of Exynos PMU
(Power Management) driver.
* tag 'samsung-drivers-7.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
soc: samsung: exynos-pmu: order pmu_base_addr before the pmu_context gate
soc: samsung: exynos-pmu: fix error paths in cpuhotplug/idle states setup
dt-bindings: sram: Document samsung,exynos850-acpm-sram
soc: samsung: exynos-chipid: Add Exynos5515 SoC support
dt-bindings: hwinfo: samsung,exynos-chipid: Add Exynos5515 compatible
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux into soc/drivers
Apple SoC driver updates for 7.4
- Enabled shared GPIO support for ARCH_APPLE which will be used for a
shared GPIO line for the speaker codecs
- Add RTKit crashlog support for older 32-bit co-coprocessors used in
older iPhones and iPads.
Signed-off-by: Sven Peter <sven@kernel.org>
* tag 'apple-soc-drivers-7.4' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux:
soc: apple: rtkit-crashlog: Add support for AArch32 state 'CrgA' section
soc: apple: rtkit-crashlog: rename 'Crg8' section from regs to aarch64
arm64: Kconfig: Select HAVE_SHARED_GPIOS for Apple Silicon
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Use isdigit() to replace the open-coded implementation.
Signed-off-by: Thorsten Blum <blum@kernel.org>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Link: https://patch.msgid.link/20261012130805.345080-4-blum@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The only users of serialio (acntpc, decpc, dtlk, keypc) don't actually
define a read_buff_add method, so start_stop_serial_interrupt were not doing
anything. The other functions were not referenced at all any more since
bbe6fb5b96bd ("staging: speakup: migrate bns to tty")
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Link: https://patch.msgid.link/20260924234439.4991-1-samuel.thibault@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
When selecting/pasting very quickly after VT switch, the tty is not set
yet, leading to a NULL dereference. We can just abort the operation.
Reported-by: co+e5693071d903b832@bugs.sh
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: stable@kernel.org
Tested-by: Weiming Shi <bestswngs@gmail.com>
Link: https://patch.msgid.link/20260829164945.2691317-3-samuel.thibault@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
strcpy() is deprecated, use strscpy() instead.
As strcpy() performs no bounds checking on the destination buffer. This
could result in buffer overflow. The safe replacement is strscpy() [1][2].
Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
Link: https://github.com/KSPP/linux/issues/88 [2]
Signed-off-by: Ajith P V <ajithpv.linux@gmail.com>
Reviewed-by: Samuel thibault <samuel.thibault@ens-lyon.org>
Link: https://patch.msgid.link/20260829164945.2691317-2-samuel.thibault@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers
Renesas driver updates for v7.4 (take two)
- Select core functionality that will be required for proper operation
on RZ/G2M v3.0, RZ/G3E, and RZ/V2N.
* tag 'renesas-drivers-for-v7.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
soc: renesas: Kconfig: Enable ICU support for RZ/G3E and RZ/V2N
soc: renesas: Enable SYSC driver for r8a774a3
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
On a threshold crossing, the talert IRQ handler calls
ti_thermal_report_sensor_temperature(), which queues the work embedded
in the sensor's ti_thermal_data on the system workqueue. Nothing ever
cancels or flushes that work.
ti_bandgap_remove() frees the talert IRQ last. free_irq() waits for a
running handler, but not for the work the handler has queued. When
remove returns, devres unregisters and frees the thermal zones and then
frees the devm-allocated ti_thermal_data, so a work item that is still
pending runs ti_thermal_work() on freed memory:
ti_thermal_work()
data = container_of(work, struct ti_thermal_data, thermal_wq);
thermal_zone_device_update(data->ti_thermal, ...);
Free the talert IRQ before removing the sensors, so that no new work
can be queued, and cancel the work in ti_thermal_remove_sensor().
This needs an OMAP4460/4470 or OMAP5 SoC (DRA7 has TALERT but no
->report_temperature, so it never queues the work), a threshold crossing
just before the driver is unbound or unloaded, and the work still
pending when devres frees the data.
Found by static analysis tool CodeQL.
Fixes: 445eaf871bf9 ("staging: omap-thermal: common code to expose driver to thermal framework")
Assisted-by: LLM codeql
Signed-off-by: Weigang He <geoffreyhe2@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Acked-by: Keerthy <j-keerthy@ti.com>
Link: https://patch.msgid.link/20260926124931.3599746-1-geoffreyhe2@gmail.com
|
|
Fix the following issue noticed when booting on the db845c-dragonboard:
BUG: KASAN: global-out-of-bounds in qpnp_tm_sync_thresholds+0x11c/0x180 [qcom_spmi_temp_alarm]
Read of size 24 at addr ffffdd2495f01200 by task (udev-worker)/371
CPU: 3 UID: 0 PID: 371 Comm: (udev-worker) Not tainted 7.3.0-rc3 #116 PREEMPT
Hardware name: Thundercomm Dragonboard 845c (DT)
Call trace:
show_stack+0x18/0x24 (C)
dump_stack_lvl+0xa4/0xf4
print_report+0x1f4/0x5ac
kasan_report+0x84/0xcc
kasan_check_range+0xf0/0x1a4
memcpy+0x3c/0xa4
qpnp_tm_sync_thresholds+0x11c/0x180 [qcom_spmi_temp_alarm]
qpnp_tm_probe+0x3dc/0xae8 [qcom_spmi_temp_alarm]
platform_probe+0xc4/0x18c
really_probe+0x17c/0x4fc
...
The buggy address belongs to the variable:
temp_map_gen1+0x60/0xc4 [qcom_spmi_temp_alarm]
It looks like temp_map is a pointer to the complete temperature map.
Indexing it directly advances the entire map, rather than selecting a
threshold row.
Fix this by dereferencing the temp_map before indexing it to select the
requested threshold row.
Fixes: 703f13285a6c ("thermal/drivers/qcom-spmi-temp-alarm: Add temp alarm data struct based on HW subtype")
Fixes: 1f835c6a4c84 ("thermal/drivers/qcom-spmi-temp-alarm: Prepare to support additional Temp Alarm subtypes")
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Link: https://patch.msgid.link/20260928132823.1426513-1-djakov@kernel.org
|
|
power_allocator_bind()
Adjust labels so that a bit of exception handling can be better reused
at the end of this function implementation.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/a3dc82f0-7333-465d-85b4-8034b1591442@web.de
|
|
Add driver for the Thermal Management Unit (TMU) managed via the Alive
Clock and Power Manager (ACPM), found on Samsung Exynos SoCs such as
the Google GS101.
The TMU on the GS101 utilizes a hybrid management model shared between
the Application Processor (AP) and the ACPM firmware. The driver
maintains direct memory-mapped access to the TMU interrupt pending
registers to identify thermal events, while delegating functional
tasks - such as sensor initialization, threshold configuration, and
temperature acquisition, to the ACPM firmware via the ACPM IPC
protocol.
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260603-acpm-tmu-v8-2-0f1810a356e6@linaro.org
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/frank.li/linux into soc/drivers
i.MX drivers change for 7.4
- fix mailbox channel leak on kasprintf failure for imx firmware dsp driver.
* tag 'imx-drivers-7.4' of https://git.kernel.org/pub/scm/linux/kernel/git/frank.li/linux:
firmware: imx: dsp: fix mailbox channel leak on kasprintf failure
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers
More Qualcomm driver updates for v7.4
Add SM8950 Maili and SM8975 Hawi SoC IDs. Document the Maili CPUCP
mailbox and PMIC arbiter compatibles.
Allow QSEECOM on the Kalambo CRD, Glymur QCB, and Lenovo ThinkPad T14s
Gen 7. Reuse Glymur's UBWC configuration for Kalambo, and add the Nord
LLCC configuration and binding.
Add Shikra SoC and subsystem low-power statistics. Document its
modem_apps GLINK audio channel. Document MSM8952 SCM and record that
MSM8952 has no UBWC. Describe IPQ5424 IMEM as mmio-sram and add the
MSM8960 SPS interrupt-controller syscon compatible.
Fix SCM PAS resource-table retries and handling of empty tables. Use
sleepable one-time initialization for TZMEM, and correct SCM Kconfig
selection for non-Qualcomm builds. Disable the SHM bridge on SM7125
to avoid boot-time RCU stalls.
Fix PMIC GLINK probe ordering and PD charger ULOG removal races. Provide
I2C Hub serial-engine program-RAM depth without accessing absent DMA
registers.
* tag 'qcom-drivers-for-7.4-3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (31 commits)
soc: qcom: geni-se: Drop unused icc_ddr parameter from geni_icc_get()
firmware: qcom: scm: Allow QSEECOM on ThinkPad T14s Gen 7
dt-bindings: mailbox: qcom: Document Maili CPUCP mailbox controller
dt-bindings: spmi: glymur-spmi-pmic-arb: Add compatible for Qualcomm Maili SoC
soc: qcom: pmic_pdcharger_ulog: prevent work requeue during remove
ASoC: dt-bindings: qcom,apr: Add modem_apps GLINK channel for shikra
firmware: qcom: tzmem: disable SHM bridge for SM7125 platform
soc: qcom: ubwc: Add Kalambo UBWC config
firmware: qcom: scm: Allow QSEECOM on Kalambo CRD
firmware: qcom: scm: Allow QSEECOM on the Glymur QCB
soc: qcom: stats: Add stats compatible and config for Shikra
dt-bindings: soc: qcom: stats: Add compatible for Shikra
soc: qcom: fix typo "upto" in comment
firmware: qcom: fix typo "uninterruptable" in comment
soc: qcom: socinfo: Add SM8950 SoC ID
dt-bindings: arm: qcom,ids: Add SoC ID for SM8950
soc: qcom: geni-se: provide PROG_RAM_DEPTH for I2C HUB Serial Engines
dt-bindings: mfd: syscon: add qcom,msm8960-sps-sic
firmware: qcom: scm: Hide QCOM_SCM instead of depending on ARCH_QCOM
soc: qcom: llcc: Add LLCC configuration for Nord
...
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers
Qualcomm driver updates for v7.4 (second attempt)
Add UBWC 7.0 configuration for Hawi and Maili, and reuse Glymur's UBWC
configuration for Nord.
Parse Glymur's DDR information from SMEM, including its frequency plan and
highest bank bit. Correct DDR frequency overflow and byte order, and handle
unrecognized DDR layouts correctly.
Configure dedicated LLCC slices for the IPQ5424 PPE and Wi-Fi datapaths,
adjust the CPU slice, and propagate errors from optional IRQ lookup.
Allow the GENI serial-engine driver to be selected on 32-bit Qualcomm SoCs
such as Kuno. Fix firmware loading bounds, endianness, and writes to
read-only firmware.
Allow QSEECOM on the Glymur-based HP EliteBook X G2q 14 AI, Lenovo Yoga
Slim 7x Gen11, and Asus Zenbook A14 (UX3407NA), enabling EFI variable
access on the HP and Asus laptops. Release SCM reserved memory on probe
failure or unbind, and limit Qualcomm firmware Kconfig options to Qualcomm
platforms.
Defer PMIC GLINK altmode work until devices resume to avoid accessing
suspended I2C controllers.
Fix cleanup of failed APR service registrations to prevent stale lookups,
and remove unused APR device-ID matching.
Add the SM7250 SoC ID, correct SMSM and SMP2P I/O annotations, and clean
up RPMh kernel-doc and redundant IRQ error messages.
Document the Kuno SCM interface, Shikra CTCU fallback, and Milos CPU
bandwidth monitor. Add Abel Vesa as a Qualcomm SoC reviewer.
* tag 'qcom-drivers-for-7.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (34 commits)
firmware: qcom: scm: Allow QSEECOM on Asus Zenbook A14 (UX3407NA)
firmware: qcom: scm: Allow QSEECOM on Yoga Slim 7x Gen11
MAINTAINERS: add Abel as reviewer for linux-arm-msm
soc: qcom: ubwcg: Add Nord UBWC config
firmware: QCOM interfaces should depend on ARCH_QCOM
firmware: qcom: scm: Use devm_of_reserved_mem_device_init()
soc: qcom: smp2p: fix __iomem annotation on entry->value pointer
soc: qcom: apr: clean up failed service registrations
soc: qcom: smem: Fix signedness bug in smem_dram_parse()
soc: qcom: ubwc: Add configuration for Maili
soc: qcom: ubwc: Add configuration for Hawi
soc: qcom: rpmh-rsc: fix kernel-doc issues in rpmh-rsc.c
soc: qcom: rpmh: fix kernel-doc issues in rpmh.c
soc: qcom: rpmh-internal: fix kernel-doc issues in rpmh-internal.h
soc: qcom: pmic_glink: Fix device access from worker during suspend
soc: qcom: llcc-qcom: Handle errors from optional IRQ lookup
soc: qcom: geni-se: Fix write to read-only firmware buffer
soc: qcom: geni-se: Fix fw_end computed before round-up; propagate size to caller
soc: qcom: geni-se: Widen fw_size to u32 to prevent wrap-around
soc: qcom: geni-se: Fix endian conversion for serial_protocol comparison
...
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
When a transaction fails, it currently hits multiple print statements
meaning that a single failure can result in several lines in the kernel
log. This is unnecessary, so consolidate them into one print used for
all transaction failures.
Acked-by: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20261013-binder-consolidate-txn-prints-v2-3-cf78927dab23@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Store Option<Error> instead of a raw i32 errno in TransactionInfo so
that the Error value can be used directly when formatting transaction
failures without having to reconstruct it from the integer errno.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20261013-binder-consolidate-txn-prints-v2-2-cf78927dab23@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The 32-bit MSR interfaces rdmsr() and wrmsr() are planned to be
removed. Use the related 64-bit variants instead.
Signed-off-by: Juergen Gross <jgross@suse.com>
Link: https://patch.msgid.link/20261008071839.2247074-10-jgross@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fix typos in comments, reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt. One further misspelling of
"respectively" in genwqe/card_base.c is fixed as well: it is not in
scripts/spelling.txt, but it sits a few lines from one that checkpatch
does report. Only comments are touched, there are no code changes.
Assisted-by: LLM
Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com>
Acked-by: Vishnu Dasa <vishnu.dasa@broadcom.com>
Link: https://patch.msgid.link/20261006060118.41933-1-hemanth.selam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
vsc_tp_xfer() computes the packet CRC over sizeof(pkt) + olen bytes,
but pkt is a pointer, so sizeof(pkt) evaluates to the pointer size
instead of the size of struct vsc_tp_packet_hdr. The value correctly
match the 8-byte header on 64-bit builds.
Use sizeof(pkt->hdr), consistent with the header size used everywhere
else in the driver, e.g. in VSC_TP_PACKET_SIZE().
Cc: stable@kernel.org
Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Link: https://patch.msgid.link/20261006-vcs_fix_crc-v1-1-b7b149f13c1d@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The VM's private BOs get their LRU position refreshed in bulk via
ttm_lru_bulk_move_tail() on vm->lru_bulk_move, both after a successful
non-LR exec and after the LR preempt-fence rebind worker runs. External
objects (BOs potentially shared across VMs) are never added to that
per-VM bulk move list, so their LRU position is never refreshed by
either path. This makes external objects in active use look more
evictable than they are.
Add xe_vm_bump_lru(), which, under a single lru_lock critical section,
performs the bulk move of the VM's private BOs and bumps each external
object locked by the drm_exec transaction. Use it from both the non-LR
exec path and the LR rebind worker, replacing the open-coded bulk move.
Fixes: d490ecf57790 ("drm/xe: Rework xe_exec and the VM rebind worker to use the drm_exec helper")
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
Assisted-by: LLM
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20261012132607.21387-1-thomas.hellstrom@linux.intel.com
(cherry picked from commit 324ba30cca180c2e1d02090743dd78ccb15b9e4a)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
ttm_bo_type_kernel BOs are not guaranteed to be zeroed on allocation and
may contain data from previously freed pages. Since the OA buffer is
mmap'able by userspace, this can expose stale kernel memory contents.
Streams opened with DRM_XE_OA_PROPERTY_OA_DISABLED allocate the OA
buffer without calling xe_oa_init_oa_buffer(). Zero the buffer at
allocation to prevent information disclosure through mmap.
The existing zeroing in xe_oa_init_oa_buffer() remains necessary for
zero report-id/timestamp detection on enable/re-enable.
Fixes: 392bf22238ff ("drm/xe/oa/uapi: OA buffer mmap")
Assisted-by: LLM
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: Ghimiray, Himal Prasad <himal.prasad.ghimiray@intel.com>
Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Link: https://patch.msgid.link/20261006020314.2711762-1-krishnaiah.bommu@intel.com
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
(cherry picked from commit 126c4c5388f9311a390b9b254a835b0cf0f55331)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
tifm_device_remove() sets sock->dev.driver to NULL after calling the
driver's remove() callback. Since commit a995fe1a3aa7 ("rust: driver:
drop device private data post unbind"), device_unbind_cleanup()
dereferences dev->driver after the bus remove() callback has returned,
so removing a card from a TI FlashMedia reader oopses:
BUG: kernel NULL pointer dereference, address: 0000000000000090
Workqueue: tifm tifm_7xx1_switch_media [tifm_7xx1]
RIP: 0010:device_unbind_cleanup+0x16/0xb0
Call Trace:
device_release_driver_internal+0x220/0x260
device_release_driver+0x12/0x20
bus_remove_device+0xf9/0x1c0
device_del+0x161/0x3b0
device_unregister+0x17/0x70
tifm_7xx1_switch_media.cold+0x6b/0xbd [tifm_7xx1]
process_one_work+0x1ac/0x3d0
worker_thread+0x1b8/0x360
kthread+0xf7/0x130
ret_from_fork+0x195/0x2a0
ret_from_fork_asm+0x1a/0x30
The driver core clears dev->driver itself in device_unbind_cleanup(), so
there is no need for the bus code to do it. Remove the assignment.
The problem was found and the fix written with the help of an AI coding
assistant. Tested on a Dell Precision M6500 (TI PCIxx12 FlashMedia,
104c:803b) running a 7.0 kernel: removing an SD card oopsed every time
without the fix; with it, insert, read and remove work.
Fixes: a995fe1a3aa7 ("rust: driver: drop device private data post unbind")
Cc: stable@kernel.org
Assisted-by: LLM
Signed-off-by: Joshua Mulloy <joshuamulloy@gmail.com>
Link: https://patch.msgid.link/20261004102525.34356-1-joshuamulloy@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
xe_evict_flags() switches on tbo->resource->mem_type to choose an
eviction placement. An xe BO can reach eviction with no ttm.resource,
e.g. an imported dma-buf BO whose resource was freed during teardown
while its attachment is still live: the exporter then invalidates it via
xe_dma_buf_move_notify() -> xe_bo_evict(), and the switch dereferences a
NULL resource and faults.
A BO with no resource has nothing placed or mapped, so there is nothing
to evict. Return an empty placement (num_placement = 0), mirroring the
handling already used for non-xe scatter-gather BOs just above;
ttm_bo_validate() then takes the pipeline-gutting path and returns 0.
Without the fix the xe_dma_buf@xe_test_dmabuf_move_notify_no_resource
dynamic live selftest will fail with below stack.
BUG: kernel NULL pointer dereference, address: 0000000000000010
RIP: 0010:xe_evict_flags+0xf4/0x140 [xe]
Call Trace:
<TASK>
xe_bo_evict+0x40/0xa0 [xe]
? ttm_bo_pipeline_gutting+0x71/0x180 [ttm]
xe_test_dmabuf_move_notify_no_resource+0x182/0x440 [xe]
xe_dma_buf_kunit+0x387/0x580 [xe]
v2: Add Fixes tag and failure info in commit text (Matt Brost)
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Assisted-by: GitHub-Copilot:claude-opus-4.8
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Link: https://patch.msgid.link/20261012215014.1495677-5-niranjana.vishwanathapura@intel.com
(cherry picked from commit dbcfaac6331f1fcb0c2fe3ad3e9adb1e5d43ec0c)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
The issei driver is Intel specific and hence x86 only.
Fixes: 65f0ecb9ec85c ("issei: initial driver skeleton")
Cc: stable <stable@kernel.org>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Link: https://patch.msgid.link/20261003150433.1369234-1-pbrobinson@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This reverts commit 143755bdabaa96776c24f878014608e9cb44f930.
That commit fixed a dangling reference in the DMABUF_DEBUG default
and thereby enabled the option - and with it the page-stripping
sg_table wrapper that dma_buf_map_attachment() hands to importers -
on every kernel with DEBUG_KERNEL=y, i.e. virtually every distro
kernel.
drm/msm is broken by the wrapper. Both of msm's map paths consume
sg->length and sg_phys() of the attachment sg_table:
msm_iommu_pagetable_map() for the per-process GPU pagetables, and
iommu_map_sg() (via iommu_map_sgtable()) for scanout. The wrapper
zeroes sg->length and strips the page pointers, so mappings of
imported dma-bufs silently map nothing, and userspace observes
arm-smmu translation faults from UCHE, e.g. during hardware video
decode (clapper, chromium) on Adreno systems:
gpu fault: ttbr0=000000088a889000 iova=000000010741c000 dir=READ
type=TRANSLATION source=UCHE
Bisected on a Snapdragon X1E78100 laptop as v7.3-rc3 good,
v7.3-rc4 bad, culprit 143755bdabaa9.
Switching msm to sg_dma_address()/sg_dma_len() is not a trivial fix
either: those fields are only valid for sg_tables that msm has
dma-mapped itself, which native non-MSM_BO_WC objects' sg_tables
are not, so the conversion needs more work. The msm maintainer has
therefore requested restoring the previous default for v7.3, to be
revisited once msm no longer consumes struct page and sg->length of
imported sg_tables.
Link: https://lore.kernel.org/linux-arm-msm/20260923074256.9357-1-liujianfeng1994@gmail.com/
Suggested-by: Rob Clark <robin.clark@oss.qualcomm.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
[sumits: as discussed on
https://lore.kernel.org/all/CAO_48GEh1p52pA_-NE=rN=_NQ=oAXpeHgHGVZCH6uPnFq7G1gQ@mail.gmail.com/
applying this revert for 7.3 unblock]
Link: https://patch.msgid.link/20260926022026.10539-1-liujianfeng1994@gmail.com
|
|
dmaengine_desc_free() is designed for DMA_CTRL_REUSE. If DMA_CTRL_REUSE
is not set, dmaengine_desc_free() will return -EPERM.
if (!dmaengine_desc_test_reuse(desc))
return -EPERM;
So calling dmaengine_desc_free() does nothing. dmaengine_terminate_(a)sync()
will free all already allocated descriptors.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Carlos Song <carlos.song@nxp.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://patch.msgid.link/20260929190605.3516147-1-Frank.Li@oss.nxp.com
|
|
comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so
it->options[1] is a number chosen by userspace. pcmuio passes it to
request_irq() without checking it first, which lets an interrupt owned by
another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be
claimed for this board. When the owner of that interrupt is later
released the descriptor is freed while this driver's handler is still
installed on it.
Every interrupt this board can assert is a legacy ISA one, so the ISA
range is the right bound; it is also sufficient, because
mp_chip_data->isa_irq is set only by alloc_isa_irq_from_domain() and
mp_unmap_irq() returns early when it is set.
Bound the value before requesting it, as das16m1.c already does. An
out-of-range value is ignored rather than rejected, so the board still
attaches without interrupt support, exactly as it does today when
request_irq() fails.
This board takes two interrupts, one per ASIC, so options[1] and
options[2] both need the check. The existing options[2] == dev->irq case
is left alone: it covers both ASICs sharing one interrupt and neither
having one, and by then options[1] has already been validated.
Fixes: 6baef150380d ("Staging: comedi: add pcmmio and pcmuio drivers")
Assisted-by: LLM
Signed-off-by: Yogesh Gaur <yogeshgaur.83@gmail.com>
Link: https://patch.msgid.link/20260909104848.1763-7-yogeshgaur.83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so
it->options[1] is a number chosen by userspace. pcmmio passes it to
request_irq() without checking it first, which lets an interrupt owned by
another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be
claimed for this board. When the owner of that interrupt is later
released the descriptor is freed while this driver's handler is still
installed on it.
The board's interrupt is routed in software rather than jumpered, and the
driver notes that "any IRQ from 1-15 is OK", so the ISA range is exactly
the right bound.
Bound the value before requesting it, as das16m1.c already does. An
out-of-range value is ignored rather than rejected, so the board still
attaches without interrupt support, exactly as it does today when
request_irq() fails.
Fixes: 6baef150380d ("Staging: comedi: add pcmmio and pcmuio drivers")
Assisted-by: LLM
Signed-off-by: Yogesh Gaur <yogeshgaur.83@gmail.com>
Link: https://patch.msgid.link/20260909104848.1763-6-yogeshgaur.83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so
it->options[1] is a number chosen by userspace. dmm32at passes it to
request_irq() without checking it first, which lets an interrupt owned by
another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be
claimed for this board. When the owner of that interrupt is later
released the descriptor is freed while this driver's handler is still
installed on it.
Every interrupt this board can assert is a legacy ISA one, so the ISA
range is the right bound; it is also sufficient, because
mp_chip_data->isa_irq is set only by alloc_isa_irq_from_domain() and
mp_unmap_irq() returns early when it is set.
Bound the value before requesting it, as das16m1.c already does. An
out-of-range value is ignored rather than rejected, so the board still
attaches without interrupt support, exactly as it does today when
request_irq() fails.
Fixes: 3c501880ac44 ("Staging: comedi: add dmm32at driver")
Assisted-by: LLM
Signed-off-by: Yogesh Gaur <yogeshgaur.83@gmail.com>
Link: https://patch.msgid.link/20260909104848.1763-5-yogeshgaur.83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so
it->options[1] is a number chosen by userspace. dt2814 passes it to
request_irq() without checking it first, which lets an interrupt owned by
another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be
claimed for this board. When the owner of that interrupt is later
released the descriptor is freed while this driver's handler is still
installed on it.
Every interrupt this board can assert is a legacy ISA one, so the ISA
range is the right bound; it is also sufficient, because
mp_chip_data->isa_irq is set only by alloc_isa_irq_from_domain() and
mp_unmap_irq() returns early when it is set.
Bound the value before requesting it, as das16m1.c already does. An
out-of-range value is ignored rather than rejected, so the board still
attaches without interrupt support, exactly as it does today when
request_irq() fails.
Fixes: a211ea977a41 ("Staging: comedi: add dt2814 driver")
Assisted-by: LLM
Signed-off-by: Yogesh Gaur <yogeshgaur.83@gmail.com>
Link: https://patch.msgid.link/20260909104848.1763-4-yogeshgaur.83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so
it->options[1] is a number chosen by userspace. ni_atmio16d passes it to
request_irq() without checking it first, which lets an interrupt owned by
another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be
claimed for this board. When the owner of that interrupt is later
released the descriptor is freed while this driver's handler is still
installed on it.
The driver already documents which interrupts the board can assert --
"0 == no irq; or 3,4,5,6,7,9,10,11,12,14,15" -- so use exactly that set
rather than the whole ISA range.
Bound the value before requesting it, as das16m1.c already does. An
out-of-range value is ignored rather than rejected, so the board still
attaches without interrupt support, exactly as it does today when
request_irq() fails.
Fixes: 2323b276308a ("Staging: comedi: add ni_at_atmio16d driver")
Assisted-by: LLM
Signed-off-by: Yogesh Gaur <yogeshgaur.83@gmail.com>
Link: https://patch.msgid.link/20260909104848.1763-3-yogeshgaur.83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so
it->options[1] is a number chosen by userspace. comedi_parport passes it to
request_irq() without checking it first, which lets an interrupt owned by
another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be
claimed for this board. When the owner of that interrupt is later
released the descriptor is freed while this driver's handler is still
installed on it.
A parallel port asserts a legacy ISA interrupt, so the ISA range is the
right bound; it is also sufficient, because mp_chip_data->isa_irq is set
only by alloc_isa_irq_from_domain() and mp_unmap_irq() returns early when
it is set.
syzbot hit this one:
remove_proc_entry: removing non-empty directory 'irq/20', leaking at least 'comedi_parport'
WARNING: fs/proc/generic.c:747 at remove_proc_entry+0x4e7/0x610 fs/proc/generic.c:747
Call Trace:
<TASK>
unregister_irq_proc+0x206/0x2a0 kernel/irq/proc.c:406
free_desc+0x89/0x330 kernel/irq/irqdesc.c:482
irq_free_descs+0x84/0xc0 kernel/irq/irqdesc.c:865
irq_domain_free_irqs+0x46a/0x5c0 kernel/irq/irqdomain.c:1917
mp_unmap_irq+0xf8/0x130 arch/x86/kernel/apic/io_apic.c:1061
acpi_unregister_gsi_ioapic+0x40/0x60 arch/x86/kernel/acpi/boot.c:722
acpi_pci_irq_disable+0x275/0x360 drivers/acpi/pci_irq.c:517
pci_disable_device+0x130/0x270 drivers/pci/pci.c:2206
pci_device_remove+0xb2/0x1d0 drivers/pci/pci-driver.c:512
device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372
unbind_store+0xf8/0x110 drivers/base/bus.c:244
</TASK>
The leaked /proc entry the warning names is the mild part.
mp_chip_data->count tracks GSI mappings rather than request_irq() users,
and __setup_irq() takes no reference on the descriptor, so the irq_desc
is freed with the comedi irqaction still attached to it.
Bound the value before requesting it, as das16m1.c already does. An
out-of-range value is ignored rather than rejected, so the board still
attaches without interrupt support, exactly as it does today when
request_irq() fails.
Fixes: 241ab6ad7108 ("Staging: comedi: add comedi_parport driver")
Reported-by: syzbot+690d666eb12fca6e1e61@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=690d666eb12fca6e1e61
Assisted-by: LLM
Signed-off-by: Yogesh Gaur <yogeshgaur.83@gmail.com>
Link: https://patch.msgid.link/20260909104848.1763-2-yogeshgaur.83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
do_dev_config() builds a space-separated list of bonded devices in
devpriv->name by formatting each "minor:subdev " pair into a temporary
stack buffer with snprintf() and appending it with strlcat() in a loop.
In preparation for removing the deprecated strlcat() API[1], use struct
seq_buf and seq_buf_printf() to format each entry directly into
devpriv->name. This avoids repeated rescanning of devpriv->name and
eliminates the temporary buffer.
Link: https://github.com/KSPP/linux/issues/370 [1]
Cc: codemender-patching+linux@google.com
Assisted-by: LLM
Signed-off-by: Bill Wendling <morbo@google.com>
Signed-off-by: Mariia Nikitash <nikitash.mariiaw@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20260927060000.518354-1-nikitash.mariiaw@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The IRQ number passed via comedi_devconfig->options[1] is a signed int
that comes from userspace. The check `it->options[1] <= 7` does not
reject negative values, so a negative IRQ number reaches
`BIT(it->options[1])`, which is undefined behavior and triggers a UBSAN
shift-out-of-bounds warning:
UBSAN: shift-out-of-bounds in drivers/comedi/drivers/dt2811.c:570:31
shift exponent -251 is negative
Add an explicit lower bound check (`it->options[1] >= 0`) so that only
valid IRQ numbers 0..7 are accepted before the shift.
Fixes: f2975a9b2ab9 ("staging: comedi: dt2811: add async command support for AI subdevice")
Reported-by: syzbot+a4cedab706d0a8a3f988@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/6ab21240.e548f532.1ca396.0018.GAE@google.com/#R
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Tested-by: syzbot+a4cedab706d0a8a3f988@syzkaller.appspotmail.com
Link: https://patch.msgid.link/02c46315293a26169d2a3862a2047959a1651ef4.1790061387.git.xiaopei01@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next
Suzuki writes:
coresight: updates for Linux v7.4
CoreSight selfhosted tracing subsystem updates for Linux v7.4, includes:
- Separating the ETM configurations for sysfs and perf to avoid corrupting
each other while in use
- Hide sysfs control for TRBE as it is not supported
- Constify Amba device table for tnoc
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
* tag 'coresight-next-v7.4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
coresight: tnoc: Constify amba_id table
coresight: etm3x: rename drvdata->config to sysfs_config
coresight: etm3x: rename local config as curr_config referring drvdata->curr_config
coresight: etm3x: introduce struct etm_caps
coresight: etm4x: rename drvdata->config to sysfs_config
coresight: etm4x: rename local config as curr_config referring drvdata->curr_config
coresight: etm4x: remove s_ex_level from config
coresight: etm4x: exclude ss_status from drvdata->config
coresight: etm4x: introduce struct etm4_caps
coresight: etm3x: remove redundant cpu online check on etm_enable_sysfs()
coresight: etm3x: fix inconsistencies with sysfs configuration
coresight: etm4x: fix inconsistencies with sysfs configuration
coresight: etm3x: Prohibit modifying cntr_val while session is enabled
coresight: etm4x: prohibit modifying cntr_val while session is enabled
coresight: etm4x: Prohibit TRCSEQSTR modifications while tracing enabled
coresight: trbe: Hide enable_sink sysfs file
|
|
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next
Georgi writes:
interconnect changes for 7.4
This pull request contains the following interconnect updates for
the 7.4-rc1 merge window:
- New driver for Kuno SoC
- Make important drivers default
- Add multi-port QoS programming support
- Add support for Milos OSM L3
- Misc cleanups and fixes
Signed-off-by: Georgi Djakov <djakov@kernel.org>
* tag 'icc-7.4-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc: (21 commits)
interconnect: mediatek: fix Makefile typo for mt8196
interconnect: qcom: fix endian annotations of BCM aux data
interconnect: qcom: Skip get_bw on QoS programming providers
interconnect: qcom: use 64-bit SMD RPM bus votes
interconnect: qcom: msm8976: Configure auxiliary GPU QoS port
interconnect: qcom: msm8996: Configure auxiliary Venus QoS port
interconnect: qcom: icc-rpm: Program SMD RPM auxiliary QoS ports
interconnect: qcom: icc-rpm: Handle icc_link_create() failures
interconnect: qcom: implement get_bw with rpmh_read
interconnect: exynos: Remove the PM QoS request on unbind
interconnect: Add kernel-doc for devm_of_icc_get(), icc_enable() and icc_disable()
interconnect: qcom: icc-rpm: Don't skip small votes
interconnect: qcom: Move bcm_div() to common code
interconnect: fix typo "commited" in comments
interconnect: qcom: Constify struct qcom_icc_qosbox
interconnect: qcom: Add Kuno interconnect provider driver
dt-bindings: interconnect: Add Qualcomm Kuno NoC
dt-bindings: interconnect: OSM L3: Document Milos OSM L3 compatible
interconnect: qcom: Add missing depends to Hawi, Maili, Nord and Shikra
interconnect: qcom: Make important drivers default
...
|
|
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next
Manivannan writes:
MHI Host
--------
- Add a host-side loopback client driver that binds to the standard MHI
LOOPBACK channel and exposes a sysfs interface for data path testing. The
interface lets users configure the TRE buffer size and count, trigger a
loopback test, and read back the result to validate the MHI data path
between host and endpoint.
- Add the IP_CTRL channel (18/19) to the Sierra EM919x/EM929x channel
configuration. IP_CTRL is a standard Qualcomm MHI control channel that
carries the host serial control lines (DTR/RTS) to the modem, which the
host previously had no way to drive for these devices.
- Add the DUN uplink (32) and downlink (33) channels to the Qualcomm modem
channel configuration. These channels transport AT commands over MHI and
let userspace reach the modem AT interface through the MHI WWAN client
driver.
- Add support for the Quectel RM500Q-AE (SDX55) module. It provides MBIM
control on channels 12/13, not the QMI setup that the generic SDX55 entry
assumes, so QMI requests over the control channel were timing out. Add an
entry matched by its subsystem ID that reuses the Quectel MBIM channel
configuration, so no out-of-tree driver is needed.
- Fix a runtime PM usage count imbalance for no_m3 devices in the pci_generic
driver. Probe only dropped the reference taken by the PCI core when the
device supported both PME from D3hot and M3, while remove re-took it based
on PME capability alone. The count therefore crept up on every bind/unbind
cycle and could end up preventing runtime suspend. QDU100 is the only
affected device today.
- Convert the %pK pointer format specifier to %p. Pointers are hashed by
default now, so %pK is no longer needed to prevent address leaks, and %p
keeps the value available for debugging.
- Fix a spelling typo ("intented") in a comment.
MHI Endpoint
------------
- Add the mhi_ep_queue_buf() API for queuing raw buffers on downlink
transfers, for endpoint clients that do not use socket buffers. The
existing mhi_ep_queue_skb() is refactored to share a common internal
helper with the new API.
- Add an endpoint-side loopback client driver that binds to the LOOPBACK
channel and echoes received data back to the host. On a Linux-based
endpoint there is no modem firmware to provide the echo, so this driver
acts as the software echo partner for the host loopback driver and
completes the end-to-end MHI data path test.
- Pass IRQF_NO_AUTOEN to request_irq() for the doorbell IRQ instead of
setting IRQ_NOAUTOEN on the descriptor by hand. The manual flag was never
cleared on the error paths or at unregister, so it leaked onto the
descriptor after the IRQ was freed.
* tag 'mhi-for-v7.4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi:
bus: mhi: ep: clients: Add loopback driver for data path testing
bus: mhi: ep: Add mhi_ep_queue_buf() API for raw buffer queuing
bus: mhi: host: clients: Add loopback driver with sysfs interface
bus: mhi: host: pci_generic: Add Quectel RM500Q-AE support
bus: mhi: host: pci_generic: Add DUN channel configuration
bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq()
bus: mhi: host: Use %p for pointer formatting
bus: mhi: host: Fix typo "intented" in comment
bus: mhi: host: pci_generic: Fix runtime PM imbalance for no_m3 devices
bus: mhi: host: pci_generic: Add IP_CTRL channel for Sierra EM919x/EM929x
|
|
In slic_init_stat_queue(), a series of coherent buffers is allocated
with the length size. The size is then stored in stq->mem_size for
normal deallocation. However, in the error path, stq->mem_size is also
used but is not initialized. This error may leave the freed buffers
mapped, leaking a resource and allowing the device to access freed
memory.
Change the length in error path to size.
Fixes: 60c140df15db ("net: ethernet: slicoss: add slicoss gigabit ethernet driver")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261006140912.50828-2-fourier.thomas@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
The Time Aware Shaper (TAS, IEEE 802.1Qbv) opens and closes the gates
of a port's egress queues according to a repeating schedule, so that
traffic classes are only sent in their own time windows.
In hardware, a schedule is run by a TAS list, which steps through gate
control list (GCL) entries taken from a pool shared by all ports. A
list is started with a base time, and it can stop another list when it
takes over, which allows a schedule to be replaced without a gap.
Add TAS offload for sparx5 and lan969x, configured through tc-taprio.
Use two TAS lists per port, so that a new schedule can be programmed in
one list while the other is operating. Allocate the GCL entries of a
schedule from the shared pool, and free them once their list is back
in ADMIN. On lan969x, program the GCL as a linked list and address its
entries by absolute index rather than relative to the list base.
sparx5 has 128 TAS lists for 65 ports, so with every port present the
last port gets no TAS offload.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261006-sparx5-tas-v1-3-5eef1126dfd5@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
Move sparx5_tas_speed() and its link speed enum from sparx5_qos.c to a
new sparx5_tas.c, which the following TAS offload patch builds on.
No functional change.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261006-sparx5-tas-v1-2-5eef1126dfd5@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
Add the registers and offset definitions used to configure the Time
Aware Shaper (802.1Qbv) in hardware, on both sparx5 and lan969x.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261006-sparx5-tas-v1-1-5eef1126dfd5@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
Use %pe to print error pointers directly and display their
error names.
Keep the other PTR_ERR() call because its return value is
needed for ret.
Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
Link: https://patch.msgid.link/20261013022402.6322-1-pavankumaryalagada@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|