Re: [PATCH v3] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()

2024-06-22 Thread Yunseong Kim
Hi Taehee, On 6/22/24 2:50 오후, Taehee Yoo wrote: > On Sat, Jun 22, 2024 at 1:58 PM wrote: >> >> From: Yunseong Kim >> > > Hi Yunseong, > Thanks a lot for this work! Thank you Taehee for reviewing our patch. It's greatly appreciated. >> During qdisc initialization, qdisc was being set to

Re: [PATCH v3] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()

2024-06-21 Thread Taehee Yoo
On Sat, Jun 22, 2024 at 1:58 PM wrote: > > From: Yunseong Kim > Hi Yunseong, Thanks a lot for this work! > In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from > > qdisc->dev_queue->dev ->name > > This situation simulated from bunch of veths and Bluetooth dis/reconnection. > >

[PATCH v3] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()

2024-06-21 Thread yskelg
From: Yunseong Kim In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from qdisc->dev_queue->dev ->name This situation simulated from bunch of veths and Bluetooth dis/reconnection. During qdisc initialization, qdisc was being set to noop_queue. In veth_init_queue, the initial tx_num

Re: [PATCH net v2] net/sched: Fixes: 51270d573a8d NULL ptr deref in perf_trace_qdisc_reset()

2024-06-21 Thread Yunseong Kim
Hi Jakub, On 6/22/24 9:05 오전, Jakub Kicinski wrote: > On Sat, 22 Jun 2024 01:25:54 +0900 ysk...@gmail.com wrote: >> Subject: [PATCH net v2] net/sched: Fixes: 51270d573a8d NULL ptr deref in >> perf_trace_qdisc_reset() > > the Fixes tag goes before your signoff, rather than as title. > try > >

Re: [PATCH 0/4] MCE wrapper and support for new SMCA syndrome MSRs

2024-06-21 Thread Naik, Avadhut
On 6/21/2024 15:01, Yazen Ghannam wrote: > On Fri, Jun 21, 2024 at 06:58:23PM +0200, Borislav Petkov wrote: >> On Thu, May 30, 2024 at 04:16:16PM -0500, Avadhut Naik wrote: >>> arch/x86/include/asm/mce.h | 20 ++- >>> arch/x86/kernel/cpu/mce/apei.c | 111 ++

Re: [PATCH net-next] net: virtio: unify code to init stats

2024-06-21 Thread Jakub Kicinski
On Thu, 20 Jun 2024 03:44:53 -0400 Michael S. Tsirkin wrote: > Moving initialization of stats structure into > __free_old_xmit reduces the code size slightly. > It also makes it clearer that this function shouldn't > be called multiple times on the same stats struct. > > Signed-off-by: Michael S.

Re: [PATCH net v2] net/sched: Fixes: 51270d573a8d NULL ptr deref in perf_trace_qdisc_reset()

2024-06-21 Thread Jakub Kicinski
On Sat, 22 Jun 2024 01:25:54 +0900 ysk...@gmail.com wrote: > Subject: [PATCH net v2] net/sched: Fixes: 51270d573a8d NULL ptr deref in > perf_trace_qdisc_reset() the Fixes tag goes before your signoff, rather than as title. try git log --grep=Fixes -- pw-bot: cr

[PATCH v9 5/5] remoteproc: qcom: enable in-kernel PD mapper

2024-06-21 Thread Dmitry Baryshkov
Request in-kernel protection domain mapper to be started before starting Qualcomm DSP and release it once DSP is stopped. Once all DSPs are stopped, the PD mapper will be stopped too. Reviewed-by: Chris Lew Tested-by: Steev Klimaszewski Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by:

[PATCH v9 4/5] soc: qcom: add pd-mapper implementation

2024-06-21 Thread Dmitry Baryshkov
Existing userspace protection domain mapper implementation has several issue. It doesn't play well with CONFIG_EXTRA_FIRMWARE, it doesn't reread JSON files if firmware location is changed (or if firmware was not available at the time pd-mapper was started but the corresponding directory is mounted

[PATCH v9 3/5] soc: qcom: pdr: extract PDR message marshalling data

2024-06-21 Thread Dmitry Baryshkov
The in-kernel PD mapper is going to use same message structures as the QCOM_PDR_HELPERS module. Extract message marshalling data to separate module that can be used by both PDR helpers and by PD mapper. Reviewed-by: Bryan O'Donoghue Tested-by: Steev Klimaszewski Tested-by: Alexey Minnekhanov

[PATCH v9 2/5] soc: qcom: pdr: fix parsing of domains lists

2024-06-21 Thread Dmitry Baryshkov
While parsing the domains list, start offsets from 0 rather than from domains_read. The domains_read is equal to the total count of the domains we have seen, while the domains list in the message starts from offset 0. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")

[PATCH v9 1/5] soc: qcom: pdr: protect locator_addr with the main mutex

2024-06-21 Thread Dmitry Baryshkov
If the service locator server is restarted fast enough, the PDR can rewrite locator_addr fields concurrently. Protect them by placing modification of those fields under the main pdr->lock. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Tested-by: Neil Armstrong #

[PATCH v9 0/5] soc: qcom: add in-kernel pd-mapper implementation

2024-06-21 Thread Dmitry Baryshkov
Protection domain mapper is a QMI service providing mapping between 'protection domains' and services supported / allowed in these domains. For example such mapping is required for loading of the WiFi firmware or for properly starting up the UCSI / altmode / battery manager support. The existing

Re: [PATCH v2 0/3] Add Sony Xperia Z3 Compact smartphone

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 05:26:41PM GMT, Valeriy Klimin wrote: > This is almost the same as the dts of the Xperia Z3, except for the > battery charge limits. > > The current on the l21 regulator for shinano is also bumped up > to stop SD card errors. > > Signed-off-by: Valeriy Klimin > --- >

Re: [PATCH v9 7/8] clk: qcom: Add WCSSAON reset

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 05:16:58PM GMT, Gokul Sriram Palanisamy wrote: > Add WCSSAON reset required for Q6v5 on IPQ8074 SoC. > > Signed-off-by: Nikhil Prakash V > Signed-off-by: Sricharan R > Signed-off-by: Gokul Sriram Palanisamy Three authors for a single line? > Acked-by: Stephen Boyd >

Re: [PATCH v9 0/8] remoteproc: qcom: q6v5-wcss: Add support for secure pil

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 05:16:51PM GMT, Gokul Sriram Palanisamy wrote: > IPQ8074 needs support for secure pil as well. > Also, currently only unified firmware is supported. > IPQ8074 supports split firmware for q6 and m3, so > adding support for that. > > changes since v8: > - Rebased on top of

Re: [PATCH v9 4/8] remoteproc: qcom: Add ssr subdevice identifier

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 05:16:55PM GMT, Gokul Sriram Palanisamy wrote: > Add name for ssr subdevice on IPQ8074 SoC. Is it SSR or ssr? Why is it necessary? > > Signed-off-by: Nikhil Prakash V > Signed-off-by: Sricharan R > Signed-off-by: Gokul Sriram Palanisamy Three authors for a

Re: [PATCH v9 0/8] remoteproc: qcom: q6v5-wcss: Add support for secure pil

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 05:16:51PM GMT, Gokul Sriram Palanisamy wrote: > IPQ8074 needs support for secure pil as well. Could you please settle on 'pil' or 'PIL'. Just use one of them. Explain, what is secure PIL. > Also, currently only unified firmware is supported. What is unified firmware?

Re: [PATCH v9 2/8] remoteproc: qcom: Add secure PIL support

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 05:16:53PM GMT, Gokul Sriram Palanisamy wrote: > IPQ8074 uses secure PIL. Hence, adding the support for the same. See Documentation/process/submitting-patches.rst > > Signed-off-by: Nikhil Prakash V > Signed-off-by: Sricharan R > Signed-off-by: Gokul Sriram Palanisamy

Re: [PATCH v9 1/8] remoteproc: qcom: Add PRNG proxy clock

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 05:16:52PM GMT, Gokul Sriram Palanisamy wrote: > PRNG clock is needed by the secure PIL, support for the same > is added in subsequent patches. Which 'same'? What is 'secure PIL'? > > Signed-off-by: Nikhil Prakash V > Signed-off-by: Sricharan R > Signed-off-by: Gokul

Re: [PATCH 2/2] arm64: dts: qcom: qcm6490-fairphone-fp5: Configure PM8008 regulators

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 10:42:31AM GMT, Luca Weiss wrote: > PM8008 regulators are used for the cameras found on FP5. Configure the > chip and its voltages. > > Signed-off-by: Luca Weiss > --- > arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 105 > - > 1 file changed,

Re: [PATCH 1/2] arm64: dts: qcom: sm7225-fairphone-fp4: Configure PM8008 regulators

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 10:42:30AM GMT, Luca Weiss wrote: > PM8008 regulators are used for the cameras found on FP4. Configure the > chip and its voltages. > > Signed-off-by: Luca Weiss > --- > arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 109 > +- > 1 file changed,

Re: [PATCH 1/3] ARM: dts: qcom: Add Sony Xperia Z3 Compact smartphone

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 11:14:46AM GMT, Valeriy Klimin wrote: > Add the dts for the Z3 Compact. This is currently almost the same > as the plain Z3 as they share almost the same hardware and > nothing device-specific is currently supported. > > Signed-off-by: Valeriy Klimin > --- >

Re: [PATCH 3/3] ARM: dts: qcom: msm8974-sony-shinano: increase load on l21 for sdhc2

2024-06-21 Thread Dmitry Baryshkov
On Fri, Jun 21, 2024 at 11:14:48AM GMT, Valeriy Klimin wrote: > SD cards would exhibit errors similar to ones described in commit > 27fe0fc05f35 ("ARM: dts: msm8974-FP2: Increase load on l20 for sdhci") > > This patch applies the same change to the regulator for sdhc2. > > Signed-off-by: Valeriy

Re: [PATCH 0/4] MCE wrapper and support for new SMCA syndrome MSRs

2024-06-21 Thread Yazen Ghannam
On Fri, Jun 21, 2024 at 06:58:23PM +0200, Borislav Petkov wrote: > On Thu, May 30, 2024 at 04:16:16PM -0500, Avadhut Naik wrote: > > arch/x86/include/asm/mce.h | 20 ++- > > arch/x86/kernel/cpu/mce/apei.c | 111 ++ > > arch/x86/kernel/cpu/mce/core.c |

[RFC PATCH v1 1/2] virtio/vsock: rework deferred credit update logic

2024-06-21 Thread Arseniy Krasnov
Previous calculation of 'free_space' was wrong (but worked as expected in most cases, see below), because it didn't account number of bytes in rx queue. Let's rework 'free_space' calculation in the following way: as this value is considered free space at rx side from tx point of view, it must be

[RFC PATCH v1 2/2] vsock/test: add test for deferred credit update

2024-06-21 Thread Arseniy Krasnov
This test checks, that we send exactly expected number of credit update packets during deferred credit update optimization. Test work in client/server modes: 1) Client just connects to server and send 256Kb of data. 256Kb is chosen because it is default space for vsock peer. After

[RFC PATCH v1 0/2] virtio/vsock: some updates for deferred credit update

2024-06-21 Thread Arseniy Krasnov
This patchset contains: 0001 - patch which reworks deferred credit update. Pls see commit message, it contains full description of this problem. 0002 - test which uses vsockmon interface, and checks that deferred credit update works as expected by parsing raw packets. Arseniy

Re: [PATCH v7 00/38] kmsan: Enable on s390

2024-06-21 Thread Andrew Morton
On Fri, 21 Jun 2024 13:34:44 +0200 Ilya Leoshkevich wrote: > v6 -> v7: Drop the ptdump patch. > All patches are reviewed. I added v7 to mm.git (and hence linux-next).

Re: [PATCH 0/4] MCE wrapper and support for new SMCA syndrome MSRs

2024-06-21 Thread Borislav Petkov
On Thu, May 30, 2024 at 04:16:16PM -0500, Avadhut Naik wrote: > arch/x86/include/asm/mce.h | 20 ++- > arch/x86/kernel/cpu/mce/apei.c | 111 ++ > arch/x86/kernel/cpu/mce/core.c | 191 ++-- > arch/x86/kernel/cpu/mce/dev-mcelog.c|

[PATCH net v2] net/sched: Fixes: 51270d573a8d NULL ptr deref in perf_trace_qdisc_reset()

2024-06-21 Thread yskelg
From: Yunseong Kim In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from qdisc->dev_queue->dev ->name This situation simulated from bunch of veths and Bluetooth dis/reconnection. During qdisc initialization, qdisc was being set to noop_queue. In veth_init_queue, the initial tx_num

Re: [PATCH v9 6/8] dt-bindings: clock: qcom: Add reset for WCSSAON

2024-06-21 Thread Kathiravan Thirumoorthy
On 6/21/2024 5:16 PM, Gokul Sriram Palanisamy wrote: Add binding for WCSSAON reset required for Q6v5 reset on IPQ8074 SoC. Can we include ipq8074 in the title? "dt-bindings: clock: qcom: ipq8074: Add reset for WCSSAON" Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R

Re: [PATCH v9 7/8] clk: qcom: Add WCSSAON reset

2024-06-21 Thread Kathiravan Thirumoorthy
On 6/21/2024 5:16 PM, Gokul Sriram Palanisamy wrote: Add WCSSAON reset required for Q6v5 on IPQ8074 SoC. Commit title can be written as "clk: qcom: ipq8074: Add WCSSAON reset" ? With that, Reviewed-by: Kathiravan Thirumoorthy Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R

Re: [PATCH v9 8/8] arm64: dts: qcom: Enable Q6v5 WCSS for ipq8074 SoC

2024-06-21 Thread Kathiravan Thirumoorthy
On 6/21/2024 5:16 PM, Gokul Sriram Palanisamy wrote: Enable remoteproc WCSS PIL driver with glink. Also, configure shared memory and enables smp2p required for IPC. Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy ---

Re: [PATCH v9 4/8] remoteproc: qcom: Add ssr subdevice identifier

2024-06-21 Thread Krzysztof Kozlowski
On 21/06/2024 13:46, Gokul Sriram Palanisamy wrote: > Add name for ssr subdevice on IPQ8074 SoC. Why? > > Signed-off-by: Nikhil Prakash V > Signed-off-by: Sricharan R > Signed-off-by: Gokul Sriram Palanisamy Three people developed that single line? Something is really odd with your DCO

Re: [PATCH v9 8/8] arm64: dts: qcom: Enable Q6v5 WCSS for ipq8074 SoC

2024-06-21 Thread Krzysztof Kozlowski
On 21/06/2024 13:46, Gokul Sriram Palanisamy wrote: > Enable remoteproc WCSS PIL driver with glink. Also, > configure shared memory and enables smp2p required for IPC. > > Signed-off-by: Nikhil Prakash V > Signed-off-by: Sricharan R > Signed-off-by: Gokul Sriram Palanisamy > --- >

Re: [PATCH v9 6/8] dt-bindings: clock: qcom: Add reset for WCSSAON

2024-06-21 Thread Krzysztof Kozlowski
On 21/06/2024 13:46, Gokul Sriram Palanisamy wrote: > Add binding for WCSSAON reset required for Q6v5 reset on IPQ8074 SoC. > > Signed-off-by: Nikhil Prakash V > Signed-off-by: Sricharan R > Signed-off-by: Gokul Sriram Palanisamy Again, three people contributed to this one define? Best

Re: [PATCH v9 5/8] remoteproc: qcom: Update regmap offsets for halt register

2024-06-21 Thread Krzysztof Kozlowski
On 21/06/2024 13:46, Gokul Sriram Palanisamy wrote: > Fixed issue in reading halt-regs parameter from device-tree. What issue? That's a terrible commit msg. Explain what is the problem, how can it be reproduced. > > Signed-off-by: Sricharan R > Signed-off-by: Gokul Sriram Palanisamy > --- >

[PATCH] ring-buffer: Limit time with disabled interrupts in rb_check_pages()

2024-06-21 Thread Petr Pavlu
Function rb_check_pages() validates the integrity of a specified per-CPU tracing ring buffer. It does so by walking the underlying linked list and checking its next and prev links. To guarantee that the list doesn't get modified during the check, a caller typically needs to take

Re: [PATCH v9 1/8] remoteproc: qcom: Add PRNG proxy clock

2024-06-21 Thread Krzysztof Kozlowski
On 21/06/2024 13:46, Gokul Sriram Palanisamy wrote: > > -static int q6v5_wcss_init_clock(struct q6v5_wcss *wcss) > +static int ipq8074_init_clock(struct q6v5_wcss *wcss) > +{ > + int ret; > + > + wcss->prng_clk = devm_clk_get(wcss->dev, "prng"); Missing binding. Best regards, Krzysztof

Re: [PATCH] qdisc: fix NULL pointer dereference in perf_trace_qdisc_reset()

2024-06-21 Thread Yunseong Kim
Hi Pedro, On 6/21/24 11:24 오후, Pedro Tammela wrote: > On 21/06/2024 08:45, ysk...@gmail.com wrote: >> From: Yunseong Kim >> >> In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from >> >>   qdisc->dev_queue->dev ->name >> >> This situation simulated from bunch of veths and Bluetooth >>

[PATCH 1/4] remoteproc: k3-r5: Fix IPC-only mode detection

2024-06-21 Thread Richard Genoud
ret variable was used to test reset status, get from reset_control_status() call. But this variable was overwritten by ti_sci_proc_get_status() a few lines bellow. And as ti_sci_proc_get_status() returns 0 or a negative value (in this latter case, followed by a return), the expression !ret was

[PATCH 4/4] remoteproc: k3-r5: support for graceful stop of remote cores

2024-06-21 Thread Richard Genoud
Introduce software IPC handshake between the K3-R5 remote proc driver and the R5 MCU to gracefully stop/reset the remote core. Upon a stop request, K3-R5 remote proc driver sends a RP_MBOX_SHUTDOWN mailbox message to the remote R5 core. The remote core is expected to: - relinquish all the

[PATCH 3/4] remoteproc: k3-r5: k3_r5_rproc_stop: code reorder

2024-06-21 Thread Richard Genoud
In the next commit, a RP_MBOX_SHUTDOWN message will be sent in k3_r5_rproc_stop() to the remote proc (in lockstep on not) Thus, the sanity check "do not allow core 0 to stop before core 1" should be moved at the beginning of the function so that the generic case can be dealt with. In order to

[PATCH 2/4] remoteproc: k3-r5: Introduce PM suspend/resume handlers

2024-06-21 Thread Richard Genoud
This patch adds the support for system suspend/resume to the ti_k3_R5 remoteproc driver. In order to save maximum power, the approach here is to shutdown completely the cores that were started by the kernel (i.e. those in RUNNING state). Those which were started before the kernel (in attached

[PATCH 0/4] remoteproc: k3-r5: Introduce suspend to ram support

2024-06-21 Thread Richard Genoud
This series enables the suspend to ram with R5F remote processors on TI K3 platform. The 1st patch is actually a fix, independent from the others The 2nd patch introduces the suspend/resume handlers. On suspend, the running rprocs will be stopped (or detached) and then re-loaded in resume. The

[PATCH v8 0/5] Introduction of a remoteproc tee to load signed firmware

2024-06-21 Thread Arnaud Pouliquen
Main updates from version V7[1] Update the series based on Mathieu Poirier's comments. Details of the updates are listed in the commit messages of the patches. [1] https://lore.kernel.org/linux-arm-kernel/20240611073904.475019-1-arnaud.pouliq...@foss.st.com/ base-commit:

[PATCH v8 3/5] dt-bindings: remoteproc: Add compatibility for TEE support

2024-06-21 Thread Arnaud Pouliquen
The "st,stm32mp1-m4-tee" compatible is utilized in a system configuration where the Cortex-M4 firmware is loaded by the Trusted Execution Environment (TEE). For instance, this compatible is used in both the Linux and OP-TEE device trees: - In OP-TEE, a node is defined in the device tree with the

[PATCH v8 4/5] remoteproc: stm32: Create sub-functions to request shutdown and release

2024-06-21 Thread Arnaud Pouliquen
To prepare for the support of TEE remoteproc, create sub-functions that can be used in both cases, with and without remoteproc TEE support. Signed-off-by: Arnaud Pouliquen --- drivers/remoteproc/stm32_rproc.c | 84 +++- 1 file changed, 51 insertions(+), 33

[PATCH v8 2/5] remoteproc: Add TEE support

2024-06-21 Thread Arnaud Pouliquen
Add a remoteproc TEE (Trusted Execution Environment) driver that will be probed by the TEE bus. If the associated Trusted application is supported on secure part this driver offers a client interface to load a firmware by the secure part. This firmware could be authenticated by the secure trusted

[PATCH v8 1/5] remoteproc: core: Introduce rproc_pa_to_va helper

2024-06-21 Thread Arnaud Pouliquen
When a resource table is loaded by an external entity such as U-boot or OP-TEE, we do not necessarily get the device address(da) but the physical address(pa). This helper performs similar translation than the rproc_da_to_va() but based on a physical address. Signed-off-by: Arnaud Pouliquen ---

[PATCH v8 5/5] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware

2024-06-21 Thread Arnaud Pouliquen
The new TEE remoteproc device is used to manage remote firmware in a secure, trusted context. The 'st,stm32mp1-m4-tee' compatibility is introduced to delegate the loading of the firmware to the trusted execution context. In such cases, the firmware should be signed and adhere to the image format

[PATCH v2 3/3] ARM: dts: qcom: msm8974-sony-shinano: increase load on l21 for sdhc2

2024-06-21 Thread Valeriy Klimin
SD cards would exhibit errors similar to ones described in commit 27fe0fc05f35 ("ARM: dts: msm8974-FP2: Increase load on l20 for sdhci") This patch applies the same change to the regulator for sdhc2. Signed-off-by: Valeriy Klimin ---

[PATCH v2 2/3] ARM: dts: qcom: Add Sony Xperia Z3 Compact smartphone

2024-06-21 Thread Valeriy Klimin
Add the dts for the Z3 Compact. This is currently almost the same as the plain Z3 as they share almost the same hardware and nothing device-specific is currently supported. Signed-off-by: Valeriy Klimin --- arch/arm/boot/dts/qcom/Makefile| 1 +

[PATCH v2 1/3] dt-bindings: arm: qcom: Add Sony Xperia Z3 Compact

2024-06-21 Thread Valeriy Klimin
Add the compatible for this device. Signed-off-by: Valeriy Klimin --- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index

[PATCH v2 0/3] Add Sony Xperia Z3 Compact smartphone

2024-06-21 Thread Valeriy Klimin
This is almost the same as the dts of the Xperia Z3, except for the battery charge limits. The current on the l21 regulator for shinano is also bumped up to stop SD card errors. Signed-off-by: Valeriy Klimin --- Changes in v2: - Reordered dt-bindings and dts commits - Link to v1:

Re: [PATCH] qdisc: fix NULL pointer dereference in perf_trace_qdisc_reset()

2024-06-21 Thread Pedro Tammela
On 21/06/2024 08:45, ysk...@gmail.com wrote: From: Yunseong Kim In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from qdisc->dev_queue->dev ->name This situation simulated from bunch of veths and Bluetooth dis/reconnection. During qdisc initialization, qdisc was being set to

Re: [PATCH 6.10.0-rc2] kernel/module: avoid panic on loading broken module

2024-06-21 Thread Daniel von Kirschten
Am 18.06.2024 um 21:58 schrieb Luis Chamberlain: On Thu, Jun 06, 2024 at 03:31:49PM +0200, Daniel v. Kirschten wrote: If a module is being loaded, and the .gnu.linkonce.this_module section in the module's ELF file does not have the WRITE flag, the kernel will map the finished module struct of

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-06-21 Thread David Woodhouse
On Thu, 2024-06-20 at 14:37 +0200, Peter Hilber wrote: > Should implement .gettimex64 instead. Thanks. This look sane? As noted in the code comment, in the *ideal* case we just build all three pre/post/device timestamps from the very same counter read. So sts->pre_ts == sts->post_ts. In the

Re: [PATCH v2 2/3] remoteproc: k3-r5: Acquire mailbox handle during probe

2024-06-21 Thread Andrew Davis
On 6/21/24 6:14 AM, Beleswar Prasad Padhi wrote: Hi Andrew, On 04/06/24 22:40, Andrew Davis wrote: On 6/4/24 12:17 AM, Beleswar Padhi wrote: Acquire the mailbox handle during device probe and do not release handle in stop/detach routine or error paths. This removes the redundant requests for

Re: [PATCH] uprobe: Do not use UPROBE_SWBP_INSN as static initializer

2024-06-21 Thread Jiri Olsa
On Fri, Jun 21, 2024 at 02:01:50PM +0200, Oleg Nesterov wrote: > On 06/20, Andrii Nakryiko wrote: > > > > On Thu, Jun 20, 2024 at 12:40 PM Oleg Nesterov wrote: > > > > > > But I can't understand what does it do, it calls emit_break() and > > > git grep -w emit_break finds nothing. > > > > > > >

Re: [PATCH v3 2/2] rust: add tracepoint support

2024-06-21 Thread Alice Ryhl
On Fri, Jun 21, 2024 at 12:35 PM Alice Ryhl wrote: > > Make it possible to have Rust code call into tracepoints defined by C > code. It is still required that the tracepoint is declared in a C > header, and that this header is included in the input to bindgen. > > Signed-off-by: Alice Ryhl > ---

Re: [PATCH] uprobe: Do not use UPROBE_SWBP_INSN as static initializer

2024-06-21 Thread Oleg Nesterov
On 06/20, Andrii Nakryiko wrote: > > On Thu, Jun 20, 2024 at 12:40 PM Oleg Nesterov wrote: > > > > But I can't understand what does it do, it calls emit_break() and > > git grep -w emit_break finds nothing. > > > > It's DEF_EMIT_REG0I15_FORMAT(break, break_op) in >

[PATCH] qdisc: fix NULL pointer dereference in perf_trace_qdisc_reset()

2024-06-21 Thread yskelg
From: Yunseong Kim In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from qdisc->dev_queue->dev ->name This situation simulated from bunch of veths and Bluetooth dis/reconnection. During qdisc initialization, qdisc was being set to noop_queue. In veth_init_queue, the initial tx_num

[PATCH v9 8/8] arm64: dts: qcom: Enable Q6v5 WCSS for ipq8074 SoC

2024-06-21 Thread Gokul Sriram Palanisamy
Enable remoteproc WCSS PIL driver with glink. Also, configure shared memory and enables smp2p required for IPC. Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy --- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 80 +++ 1 file

[PATCH v9 7/8] clk: qcom: Add WCSSAON reset

2024-06-21 Thread Gokul Sriram Palanisamy
Add WCSSAON reset required for Q6v5 on IPQ8074 SoC. Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy Acked-by: Stephen Boyd --- drivers/clk/qcom/gcc-ipq8074.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/gcc-ipq8074.c

[PATCH v9 6/8] dt-bindings: clock: qcom: Add reset for WCSSAON

2024-06-21 Thread Gokul Sriram Palanisamy
Add binding for WCSSAON reset required for Q6v5 reset on IPQ8074 SoC. Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy Acked-by: Rob Herring Acked-by: Stephen Boyd --- include/dt-bindings/clock/qcom,gcc-ipq8074.h | 1 + 1 file changed, 1

[PATCH v9 5/8] remoteproc: qcom: Update regmap offsets for halt register

2024-06-21 Thread Gokul Sriram Palanisamy
Fixed issue in reading halt-regs parameter from device-tree. Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy --- drivers/remoteproc/qcom_q6v5_wcss.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c

[PATCH v9 4/8] remoteproc: qcom: Add ssr subdevice identifier

2024-06-21 Thread Gokul Sriram Palanisamy
Add name for ssr subdevice on IPQ8074 SoC. Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy --- drivers/remoteproc/qcom_q6v5_wcss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c

[PATCH v9 2/8] remoteproc: qcom: Add secure PIL support

2024-06-21 Thread Gokul Sriram Palanisamy
IPQ8074 uses secure PIL. Hence, adding the support for the same. Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy --- drivers/remoteproc/qcom_q6v5_wcss.c | 43 +++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff

[PATCH v9 1/8] remoteproc: qcom: Add PRNG proxy clock

2024-06-21 Thread Gokul Sriram Palanisamy
PRNG clock is needed by the secure PIL, support for the same is added in subsequent patches. Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy --- drivers/remoteproc/qcom_q6v5_wcss.c | 65 + 1 file changed, 47

[PATCH v9 3/8] remoteproc: qcom: Add support for split q6 + m3 wlan firmware

2024-06-21 Thread Gokul Sriram Palanisamy
IPQ8074 supports split firmware for q6 and m3 as well. So add support for loading the m3 firmware before q6. Now the drivers works fine for both split and unified firmwares. Signed-off-by: Nikhil Prakash V Signed-off-by: Sricharan R Signed-off-by: Gokul Sriram Palanisamy ---

[PATCH v9 0/8] remoteproc: qcom: q6v5-wcss: Add support for secure pil

2024-06-21 Thread Gokul Sriram Palanisamy
IPQ8074 needs support for secure pil as well. Also, currently only unified firmware is supported. IPQ8074 supports split firmware for q6 and m3, so adding support for that. changes since v8: - Rebased on top of Linux 6.10-rc4 Gokul Sriram Palanisamy (8): remoteproc: qcom: Add PRNG proxy clock

[PATCH v7 36/38] s390/unwind: Disable KMSAN checks

2024-06-21 Thread Ilya Leoshkevich
The unwind code can read uninitialized frames. Furthermore, even in the good case, KMSAN does not emit shadow for backchains. Therefore disable it for the unwinding functions. Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Signed-off-by: Ilya Leoshkevich ---

[PATCH v7 33/38] s390/traps: Unpoison the kernel_stack_overflow()'s pt_regs

2024-06-21 Thread Ilya Leoshkevich
This is normally done by the generic entry code, but the kernel_stack_overflow() flow bypasses it. Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Signed-off-by: Ilya Leoshkevich --- arch/s390/kernel/traps.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v7 37/38] s390/kmsan: Implement the architecture-specific functions

2024-06-21 Thread Ilya Leoshkevich
arch_kmsan_get_meta_or_null() finds the lowcore shadow by querying the prefix and calling kmsan_get_metadata() again. kmsan_virt_addr_valid() delegates to virt_addr_valid(). Acked-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich ---

[PATCH v7 35/38] s390/uaccess: Add the missing linux/instrumented.h #include

2024-06-21 Thread Ilya Leoshkevich
uaccess.h uses instrument_get_user() and instrument_put_user(), which are defined in linux/instrumented.h. Currently we get this header from somewhere else by accident; prefer to be explicit about it and include it directly. Suggested-by: Alexander Potapenko Reviewed-by: Alexander Potapenko

[PATCH v7 32/38] s390/string: Add KMSAN support

2024-06-21 Thread Ilya Leoshkevich
Add KMSAN support for the s390 implementations of the string functions. Do this similar to how it's already done for KASAN, except that the optimized memset{16,32,64}() functions need to be disabled: it's important for KMSAN to know that they initialized something. The way boot code is built with

[PATCH v7 30/38] s390/irqflags: Do not instrument arch_local_irq_*() with KMSAN

2024-06-21 Thread Ilya Leoshkevich
Lockdep generates the following false positives with KMSAN on s390x: [6.063666] DEBUG_LOCKS_WARN_ON(lockdep_hardirqs_enabled()) [ ...] [6.577050] Call Trace: [6.619637] [<0690d2de>] check_flags+0x1fe/0x210 [6.665411] ([<0690d2da>] check_flags+0x1fa/0x210)

[PATCH v7 28/38] s390/diag: Unpoison diag224() output buffer

2024-06-21 Thread Ilya Leoshkevich
Diagnose 224 stores 4k bytes, which currently cannot be deduced from the inline assembly constraints. This leads to KMSAN false positives. Fix the constraints by using a 4k-sized struct instead of a raw pointer. While at it, prettify them too. Suggested-by: Heiko Carstens Reviewed-by: Alexander

[PATCH v7 31/38] s390/mm: Define KMSAN metadata for vmalloc and modules

2024-06-21 Thread Ilya Leoshkevich
The pages for the KMSAN metadata associated with most kernel mappings are taken from memblock by the common code. However, vmalloc and module metadata needs to be defined by the architectures. Be a little bit more careful than x86: allocate exactly MODULES_LEN for the module shadow and origins,

[PATCH v7 29/38] s390/ftrace: Unpoison ftrace_regs in kprobe_ftrace_handler()

2024-06-21 Thread Ilya Leoshkevich
s390 uses assembly code to initialize ftrace_regs and call kprobe_ftrace_handler(). Therefore, from the KMSAN's point of view, ftrace_regs is poisoned on kprobe_ftrace_handler() entry. This causes KMSAN warnings when running the ftrace testsuite. Fix by trusting the assembly code and always

[PATCH v7 38/38] kmsan: Enable on s390

2024-06-21 Thread Ilya Leoshkevich
Now that everything else is in place, enable KMSAN in Kconfig. Acked-by: Heiko Carstens Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index

[PATCH v7 27/38] s390/cpumf: Unpoison STCCTM output buffer

2024-06-21 Thread Ilya Leoshkevich
stcctm() uses the "Q" constraint for dest, therefore KMSAN does not understand that it fills multiple doublewords pointed to by dest, not just one. This results in false positives. Unpoison the whole dest manually with kmsan_unpoison_memory(). Reported-by: Alexander Gordeev Reviewed-by:

[PATCH v7 23/38] s390: Use a larger stack for KMSAN

2024-06-21 Thread Ilya Leoshkevich
Adjust the stack size for the KMSAN-enabled kernel like it was done for the KASAN-enabled one in commit 7fef92ccadd7 ("s390/kasan: double the stack size"). Both tools have similar requirements. Reviewed-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich ---

[PATCH v7 26/38] s390/cpacf: Unpoison the results of cpacf_trng()

2024-06-21 Thread Ilya Leoshkevich
Prevent KMSAN from complaining about buffers filled by cpacf_trng() being uninitialized. Tested-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Signed-off-by: Ilya Leoshkevich --- arch/s390/include/asm/cpacf.h | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v7 19/38] mm: kfence: Disable KMSAN when checking the canary

2024-06-21 Thread Ilya Leoshkevich
KMSAN warns about check_canary() accessing the canary. The reason is that, even though set_canary() is properly instrumented and sets shadow, slub explicitly poisons the canary's address range afterwards. Unpoisoning the canary is not the right thing to do: only check_canary() is supposed to

[PATCH v7 34/38] s390/uaccess: Add KMSAN support to put_user() and get_user()

2024-06-21 Thread Ilya Leoshkevich
put_user() uses inline assembly with precise constraints, so Clang is in principle capable of instrumenting it automatically. Unfortunately, one of the constraints contains a dereferenced user pointer, and Clang does not currently distinguish user and kernel pointers. Therefore KMSAN attempts to

[PATCH v7 22/38] s390/boot: Turn off KMSAN

2024-06-21 Thread Ilya Leoshkevich
All other sanitizers are disabled for boot as well. While at it, add a comment explaining why we need this. Reviewed-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- arch/s390/boot/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v7 18/38] mm: slub: Disable KMSAN when checking the padding bytes

2024-06-21 Thread Ilya Leoshkevich
Even though the KMSAN warnings generated by memchr_inv() are suppressed by metadata_access_enable(), its return value may still be poisoned. The reason is that the last iteration of memchr_inv() returns `*start != value ? start : NULL`, where *start is poisoned. Because of this, somewhat

[PATCH v7 14/38] kmsan: Use ALIGN_DOWN() in kmsan_get_metadata()

2024-06-21 Thread Ilya Leoshkevich
Improve the readability by replacing the custom aligning logic with ALIGN_DOWN(). Unlike other places where a similar sequence is used, there is no size parameter that needs to be adjusted, so the standard macro fits. Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich ---

[PATCH v7 25/38] s390/checksum: Add a KMSAN check

2024-06-21 Thread Ilya Leoshkevich
Add a KMSAN check to the CKSM inline assembly, similar to how it was done for ASAN in commit e42ac7789df6 ("s390/checksum: always use cksm instruction"). Acked-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- arch/s390/include/asm/checksum.h | 2 ++ 1

[PATCH v7 11/38] kmsan: Allow disabling KMSAN checks for the current task

2024-06-21 Thread Ilya Leoshkevich
Like for KASAN, it's useful to temporarily disable KMSAN checks around, e.g., redzone accesses. Introduce kmsan_disable_current() and kmsan_enable_current(), which are similar to their KASAN counterparts. Make them reentrant in order to handle memory allocations in interrupt context. Repurpose

[PATCH v7 20/38] lib/zlib: Unpoison DFLTCC output buffers

2024-06-21 Thread Ilya Leoshkevich
The constraints of the DFLTCC inline assembly are not precise: they do not communicate the size of the output buffers to the compiler, so it cannot automatically instrument it. Add the manual kmsan_unpoison_memory() calls for the output buffers. The logic is the same as in [1]. [1]

[PATCH v7 09/38] kmsan: Expose kmsan_get_metadata()

2024-06-21 Thread Ilya Leoshkevich
Each s390 CPU has lowcore pages associated with it. Each CPU sees its own lowcore at virtual address 0 through a hardware mechanism called prefixing. Additionally, all lowcores are mapped to non-0 virtual addresses stored in the lowcore_ptr[] array. When lowcore is accessed through virtual

[PATCH v7 17/38] mm: slub: Let KMSAN access metadata

2024-06-21 Thread Ilya Leoshkevich
Building the kernel with CONFIG_SLUB_DEBUG and CONFIG_KMSAN causes KMSAN to complain about touching redzones in kfree(). Fix by extending the existing KASAN-related metadata_access_enable() and metadata_access_disable() functions to KMSAN. Acked-by: Vlastimil Babka Reviewed-by: Alexander

[PATCH v7 10/38] kmsan: Export panic_on_kmsan

2024-06-21 Thread Ilya Leoshkevich
When building the kmsan test as a module, modpost fails with the following error message: ERROR: modpost: "panic_on_kmsan" [mm/kmsan/kmsan_test.ko] undefined! Export panic_on_kmsan in order to improve the KMSAN usability for modules. Reviewed-by: Alexander Potapenko Signed-off-by: Ilya

[PATCH v7 16/38] kmsan: Expose KMSAN_WARN_ON()

2024-06-21 Thread Ilya Leoshkevich
KMSAN_WARN_ON() is required for implementing s390-specific KMSAN functions, but right now it's available only to the KMSAN internal functions. Expose it to subsystems through . Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- include/linux/kmsan.h | 25

[PATCH v7 04/38] kmsan: Increase the maximum store size to 4096

2024-06-21 Thread Ilya Leoshkevich
The inline assembly block in s390's chsc() stores that much. Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- mm/kmsan/instrumentation.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/kmsan/instrumentation.c b/mm/kmsan/instrumentation.c index

[PATCH v7 21/38] kmsan: Accept ranges starting with 0 on s390

2024-06-21 Thread Ilya Leoshkevich
On s390 the virtual address 0 is valid (current CPU's lowcore is mapped there), therefore KMSAN should not complain about it. Disable the respective check on s390. There doesn't seem to be a Kconfig option to describe this situation, so explicitly check for s390. Reviewed-by: Alexander Potapenko

  1   2   3   4   5   6   7   8   9   10   >