Re: [PATCH v2 1/4] tracing/user_events: Prepare find/delete for same name events

2024-02-13 Thread kernel test robot
Hello, kernel test robot noticed "BUG:KASAN:slab-use-after-free_in_user_events_ioctl" on: commit: fecc001d587ceeeb47043c20353f257e3f01b39f ("[PATCH v2 1/4] tracing/user_events: Prepare find/delete for same name events") url:

Re: [PATCH v9 10/15] x86/sgx: Add EPC reclamation in cgroup try_charge()

2024-02-13 Thread Jarkko Sakkinen
On Tue Feb 13, 2024 at 1:15 AM EET, Haitao Huang wrote: > Hi Jarkko > > On Mon, 12 Feb 2024 13:55:46 -0600, Jarkko Sakkinen > wrote: > > > On Mon Feb 5, 2024 at 11:06 PM EET, Haitao Huang wrote: > >> From: Kristen Carlson Accardi > >> > >> When the EPC usage of a cgroup is near its limit, the

Re: [PATCH v7 10/36] ftrace/function_graph: Pass fgraph_ops to function graph callbacks

2024-02-13 Thread Steven Rostedt
On Wed, 7 Feb 2024 00:09:21 +0900 "Masami Hiramatsu (Google)" wrote: > From: Steven Rostedt (VMware) > > Pass the fgraph_ops structure to the function graph callbacks. This will > allow callbacks to add a descriptor to a fgraph_ops private field that wil > be added in the future and use it

Re: [PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-13 Thread kernel test robot
Hi Vincent, kernel test robot noticed the following build errors: [auto build test ERROR on ca185770db914869ff9fe773bac5e0e5e4165b83] url: https://github.com/intel-lab-lkp/linux/commits/Vincent-Donnefort/ring-buffer-Zero-ring-buffer-sub-buffers/20240213-195302 base

Re: [PATCH v2] tracing: Have saved_cmdlines arrays all in one allocation

2024-02-13 Thread Tim Chen
On Tue, 2024-02-13 at 11:52 -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The saved_cmdlines have three arrays for mapping PIDs to COMMs: > > - map_pid_to_cmdline[] > - map_cmdline_to_pid[] > - saved_cmdlines > > The map_pid_to_cmdline[] is PID_MAX_DEFAULT in size and

Re: [PATCH v2] tracing: Have saved_cmdlines arrays all in one allocation

2024-02-13 Thread Google
On Tue, 13 Feb 2024 11:52:32 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The saved_cmdlines have three arrays for mapping PIDs to COMMs: > > - map_pid_to_cmdline[] > - map_cmdline_to_pid[] > - saved_cmdlines > > The map_pid_to_cmdline[] is PID_MAX_DEFAULT in size and

Re: [PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-13 Thread Steven Rostedt
On Tue, 13 Feb 2024 15:53:09 -0500 Steven Rostedt wrote: > On Tue, 13 Feb 2024 11:49:41 + > Vincent Donnefort wrote: > > Did you test with lockdep? > > > +static int __rb_inc_dec_mapped(struct trace_buffer *buffer, > > + struct ring_buffer_per_cpu *cpu_buffer, > >

Re: [PATCH v10 2/4] dt-bindings: remoteproc: add Tightly Coupled Memory (TCM) bindings

2024-02-13 Thread Rob Herring
On Tue, Feb 13, 2024 at 02:37:49PM -0600, Tanmay Shah wrote: > Hello, > > Thanks for reviews please find my comments below. > > On 2/13/24 1:20 PM, Rob Herring wrote: > > On Tue, 13 Feb 2024 09:54:48 -0800, Tanmay Shah wrote: > > > From: Radhey Shyam Pandey > > > > > > Introduce bindings for

Re: [PATCH v1] module.h: define __symbol_get_gpl() as a regular __symbol_get()

2024-02-13 Thread Andrew Kanner
On Thu, Feb 01, 2024 at 10:13:54AM -0800, Luis Chamberlain wrote: > > While you're at it, if you want to try it, you could see if you can > improve the situation more by looking at symbol_get() users that remain > and seeing if you can instead fix it with proper Kconfig dependency and > at build

Re: CPU data cache across reboot/kexec for pmem/dax devices

2024-02-13 Thread Mathieu Desnoyers
On 2024-02-09 15:15, Dan Williams wrote: Mathieu Desnoyers wrote: Hi Dan, In the context of extracting user-space trace data when the kernel crashes, the LTTng user-space tracer recommends using nvdimm/pmem to reserve an area of physical (volatile) RAM at boot (memmap=nn[KMG]!ss[KMG]), and use

Re: [PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-13 Thread Steven Rostedt
On Tue, 13 Feb 2024 11:49:41 + Vincent Donnefort wrote: Did you test with lockdep? > +static int __rb_inc_dec_mapped(struct trace_buffer *buffer, > +struct ring_buffer_per_cpu *cpu_buffer, > +bool inc) > +{ > + unsigned long flags;

Re: [PATCH v10 2/4] dt-bindings: remoteproc: add Tightly Coupled Memory (TCM) bindings

2024-02-13 Thread Tanmay Shah
Hello, Thanks for reviews please find my comments below. On 2/13/24 1:20 PM, Rob Herring wrote: > On Tue, 13 Feb 2024 09:54:48 -0800, Tanmay Shah wrote: > > From: Radhey Shyam Pandey > > > > Introduce bindings for TCM memory address space on AMD-xilinx Zynq > > UltraScale+ platform. It will

Re: [PATCH v10 2/4] dt-bindings: remoteproc: add Tightly Coupled Memory (TCM) bindings

2024-02-13 Thread Rob Herring
On Tue, 13 Feb 2024 09:54:48 -0800, Tanmay Shah wrote: > From: Radhey Shyam Pandey > > Introduce bindings for TCM memory address space on AMD-xilinx Zynq > UltraScale+ platform. It will help in defining TCM in device-tree > and make it's access platform agnostic and data-driven. > >

Re: [Linux-stm32] [PATCH v2 4/4] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware

2024-02-13 Thread Mathieu Poirier
On Tue, 13 Feb 2024 at 08:48, Arnaud POULIQUEN wrote: > > Hello Mathieu, > > On 2/5/24 10:13, Arnaud POULIQUEN wrote: > > > > > > On 2/2/24 20:53, Mathieu Poirier wrote: > >> On Thu, Feb 01, 2024 at 07:33:35PM +0100, Arnaud POULIQUEN wrote: > >>> > >>> > >>> On 2/1/24 17:02, Mathieu Poirier

[PATCH] MAINTAINERS: add Eugenio Pérez as reviewer

2024-02-13 Thread Eugenio Pérez
Add myself as a reviewer of some VirtIO areas I'm interested. Until this point I've been scanning manually the list looking for series that touches this area. Adding myself to make this task easier. Signed-off-by: Eugenio Pérez --- MAINTAINERS | 4 1 file changed, 4 insertions(+) diff

Re: [PATCH net-next v3] net: dqs: add NIC stall detector based on BQL

2024-02-13 Thread Jakub Kicinski
On Tue, 13 Feb 2024 14:57:49 +0100 Eric Dumazet wrote: > Please note that adding other sysfs entries is expensive for workloads > creating/deleting netdev and netns often. > > I _think_ we should find a way for not creating > /sys/class/net//queues/tx-{Q}/byte_queue_limits directory > and files

[PATCH v10 2/4] dt-bindings: remoteproc: add Tightly Coupled Memory (TCM) bindings

2024-02-13 Thread Tanmay Shah
From: Radhey Shyam Pandey Introduce bindings for TCM memory address space on AMD-xilinx Zynq UltraScale+ platform. It will help in defining TCM in device-tree and make it's access platform agnostic and data-driven. Tightly-coupled memories(TCMs) are low-latency memory that provides predictable

[PATCH v10 3/4] dts: zynqmp: add properties for TCM in remoteproc

2024-02-13 Thread Tanmay Shah
Add properties as per new bindings in zynqmp remoteproc node to represent TCM address and size. This patch also adds alternative remoteproc node to represent remoteproc cluster in split mode. By default lockstep mode is enabled and users should disable it before using split mode dts. Both

[PATCH v10 4/4] remoteproc: zynqmp: parse TCM from device tree

2024-02-13 Thread Tanmay Shah
ZynqMP TCM information was fixed in driver. Now ZynqMP TCM information is available in device-tree. Parse TCM information in driver as per new bindings. Signed-off-by: Tanmay Shah --- Changes in v10: - Remove redundant changes to handle TCM in lockstep mode Changes in v9: - Introduce new

[PATCH v10 0/4] add zynqmp TCM bindings

2024-02-13 Thread Tanmay Shah
Tightly-Coupled Memories(TCMs) are low-latency memory that provides predictable instruction execution and predictable data load/store timing. Each Cortex-R5F processor contains exclusive two 64 KB memory banks on the ATCM and BTCM ports, for a total of 128 KB of memory. In lockstep mode, both

[PATCH v10 1/4] remoteproc: zynqmp: fix lockstep mode memory region

2024-02-13 Thread Tanmay Shah
In lockstep mode, r5 core0 uses TCM of R5 core1. Following is lockstep mode memory region as per hardware reference manual. | *TCM* | *R5 View* | *Linux view* | | R5_0 ATCM (128 KB) | 0x_ | 0xFFE0_ | | R5_0 BTCM (128 KB) | 0x0002_ | 0xFFE2_ |

[PATCH v2] tracing: Have saved_cmdlines arrays all in one allocation

2024-02-13 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The saved_cmdlines have three arrays for mapping PIDs to COMMs: - map_pid_to_cmdline[] - map_cmdline_to_pid[] - saved_cmdlines The map_pid_to_cmdline[] is PID_MAX_DEFAULT in size and holds the index into the other arrays. The map_cmdline_to_pid[] is a mapping

Re: [PATCH] tracing: Have saved_cmdlines arrays all in one allocation

2024-02-13 Thread Tim Chen
On Mon, 2024-02-12 at 19:13 -0500, Steven Rostedt wrote: > On Mon, 12 Feb 2024 15:39:03 -0800 > Tim Chen wrote: > > > > diff --git a/kernel/trace/trace_sched_switch.c > > > b/kernel/trace/trace_sched_switch.c > > > index e4fbcc3bede5..210c74dcd016 100644 > > > ---

Re: [PATCH V2 3/3] vdpa_sim: flush workers on suspend

2024-02-13 Thread Eugenio Perez Martin
On Mon, Feb 12, 2024 at 6:16 PM Steve Sistare wrote: > > Flush to guarantee no workers are running when suspend returns. > > Signed-off-by: Steve Sistare > --- > drivers/vdpa/vdpa_sim/vdpa_sim.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git

Re: [PATCH V2 1/3] vhost-vdpa: flush workers on suspend

2024-02-13 Thread Eugenio Perez Martin
On Mon, Feb 12, 2024 at 6:16 PM Steve Sistare wrote: > > Flush to guarantee no workers are running when suspend returns. > > Signed-off-by: Steve Sistare Acked-by: Eugenio Pérez Should this have a Fixes tag? > --- > drivers/vhost/vdpa.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff

Re: [Linux-stm32] [PATCH v2 4/4] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware

2024-02-13 Thread Arnaud POULIQUEN
Hello Mathieu, On 2/5/24 10:13, Arnaud POULIQUEN wrote: > > > On 2/2/24 20:53, Mathieu Poirier wrote: >> On Thu, Feb 01, 2024 at 07:33:35PM +0100, Arnaud POULIQUEN wrote: >>> >>> >>> On 2/1/24 17:02, Mathieu Poirier wrote: On Thu, Feb 01, 2024 at 04:06:37PM +0100, Arnaud POULIQUEN wrote:

Re: [PATCH v2 2/4] dt-bindings: remoteproc: Add compatibility for TEE support

2024-02-13 Thread Arnaud POULIQUEN
Hello Rob, On 1/30/24 18:51, Rob Herring wrote: > On Thu, Jan 18, 2024 at 11:04:31AM +0100, Arnaud Pouliquen wrote: >> 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

Re: [PATCH V2] vdpa_sim: reset must not run

2024-02-13 Thread Steven Sistare
Changes in V2: - test DRIVER_OK instead of FEATURES_OK - post singly, and add RB and acks - Steve On 2/9/2024 5:30 PM, Steve Sistare wrote: > vdpasim_do_reset sets running to true, which is wrong, as it allows > vdpasim_kick_vq to post work requests before the device has been > configured.

Re: [PATCH V2 0/3] flush workers on suspend

2024-02-13 Thread Steven Sistare
On 2/12/2024 12:16 PM, Steve Sistare wrote: > Flush to guarantee no workers are running when suspend returns, > for vdpa, vpa_sim, and vduse. (mlx5 already does so, via the path > mlx5_vdpa_suspend -> unregister_link_notifier -> flush_workqueue.) Changes in V2: - renamed "vduse: suspend" (was

Re: [PATCH V2] vdpa: skip suspend/resume ops if not DRIVER_OK

2024-02-13 Thread Steven Sistare
On 2/13/2024 9:58 AM, Eugenio Perez Martin wrote: > On Tue, Feb 13, 2024 at 3:26 PM Steve Sistare > wrote: >> >> If a vdpa device is not in state DRIVER_OK, then there is no driver state >> to preserve, so no need to call the suspend and resume driver ops. >> >> Suggested-by: Eugenio Perez

Re: [PATCH V2] vdpa: skip suspend/resume ops if not DRIVER_OK

2024-02-13 Thread Eugenio Perez Martin
On Tue, Feb 13, 2024 at 3:26 PM Steve Sistare wrote: > > If a vdpa device is not in state DRIVER_OK, then there is no driver state > to preserve, so no need to call the suspend and resume driver ops. > > Suggested-by: Eugenio Perez Martin " > Signed-off-by: Steve Sistare Reviewed-by: Eugenio

Re: [PATCH v6.1.y-v4.19.y] vhost: use kzalloc() instead of kmalloc() followed by memset()

2024-02-13 Thread Greg KH
On Mon, Feb 05, 2024 at 10:49:37AM +0530, Ajay Kaher wrote: > From: Prathu Baronia > > From: Prathu Baronia > > commit 4d8df0f5f79f747d75a7d356d9b9ea40a4e4c8a9 upstream > > Use kzalloc() to allocate new zeroed out msg node instead of > memsetting a node allocated with kmalloc(). > >

[PATCH V2] vdpa: skip suspend/resume ops if not DRIVER_OK

2024-02-13 Thread Steve Sistare
If a vdpa device is not in state DRIVER_OK, then there is no driver state to preserve, so no need to call the suspend and resume driver ops. Suggested-by: Eugenio Perez Martin " Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

Re: [PATCH net-next v3] net: dqs: add NIC stall detector based on BQL

2024-02-13 Thread Eric Dumazet
On Fri, Feb 2, 2024 at 5:55 PM Breno Leitao wrote: > > From: Jakub Kicinski > > softnet_data->time_squeeze is sometimes used as a proxy for > host overload or indication of scheduling problems. In practice > this statistic is very noisy and has hard to grasp units - > e.g. is 10 squeezes a

[PATCH v1] virtio: reenable config if freezing device failed

2024-02-13 Thread David Hildenbrand
Currently, we don't reenable the config if freezing the device failed. For example, virtio-mem currently doesn't support suspend+resume, and trying to freeze the device will always fail. Afterwards, the device will no longer respond to resize requests, because it won't get notified about config

Re: [PATCH net-next v3] net: dqs: add NIC stall detector based on BQL

2024-02-13 Thread Breno Leitao
On Tue, Feb 06, 2024 at 12:40:13PM +0100, Paolo Abeni wrote: > On Fri, 2024-02-02 at 08:53 -0800, Breno Leitao wrote: > > From: Jakub Kicinski > > > > softnet_data->time_squeeze is sometimes used as a proxy for > > host overload or indication of scheduling problems. In practice > > this

[PATCH] tracing: Fix HAVE_DYNAMIC_FTRACE_WITH_REGS ifdef

2024-02-13 Thread Petr Pavlu
Commit a8b9cf62ade1 ("ftrace: Fix DIRECT_CALLS to use SAVE_REGS by default") attempted to fix an issue with direct trampolines on x86, see its description for details. However, it wrongly referenced the HAVE_DYNAMIC_FTRACE_WITH_REGS config option and the problem is still present. Add the missing

Re: [PATCH v2 0/3] Add RPMPD support for MSM8974

2024-02-13 Thread Ulf Hansson
On Sat, 10 Feb 2024 at 17:39, Luca Weiss wrote: > > Add driver support for the RPM power domains found on the different > MSM8974 devices. > > Devicetree integration will come at a later point since also some > mostly remoteproc drivers need to be adjusted. > > Also the MX power domains on this

[PATCH v17 5/6] Documentation: tracing: Add ring-buffer mapping

2024-02-13 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v17 4/6] tracing: Allow user-space mapping of the ring-buffer

2024-02-13 Thread Vincent Donnefort
Currently, user-space extracts data from the ring-buffer via splice, which is handy for storage or network sharing. However, due to splice limitations, it is imposible to do real-time analysis without a copy. A solution for that problem is to let the user-space map the ring-buffer directly. The

[PATCH v17 3/6] tracing: Add snapshot refcount

2024-02-13 Thread Vincent Donnefort
When a ring-buffer is memory mapped by user-space, no trace or ring-buffer swap is possible. This means the snapshot feature is mutually exclusive with the memory mapping. Having a refcount on snapshot users will help to know if a mapping is possible or not. Instead of relying on the global

[PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-13 Thread Vincent Donnefort
In preparation for allowing the user-space to map a ring-buffer, add a set of mapping functions: ring_buffer_{map,unmap}() ring_buffer_map_fault() And controls on the ring-buffer: ring_buffer_map_get_reader() /* swap reader and head */ Mapping the ring-buffer also involves: A unique

[PATCH v17 1/6] ring-buffer: Zero ring-buffer sub-buffers

2024-02-13 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping where each subbuf will be accessible to user-space, zero all the page allocations. Signed-off-by: Vincent Donnefort Reviewed-by: Masami Hiramatsu (Google) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index

[PATCH v17 0/6] Introducing trace buffer mapping by user-space

2024-02-13 Thread Vincent Donnefort
The tracing ring-buffers can be stored on disk or sent to network without any copy via splice. However the later doesn't allow real time processing of the traces. A solution is to give userspace direct access to the ring-buffer pages via a mapping. An application can now become a consumer of the

Re: [PATCH] ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.

2024-02-13 Thread Takashi Iwai
On Tue, 13 Feb 2024 10:07:35 +0100, Michael S. Tsirkin wrote: > > On Tue, Feb 13, 2024 at 10:02:24AM +0100, Takashi Iwai wrote: > > On Tue, 13 Feb 2024 09:51:30 +0100, > > Aiswarya Cyriac wrote: > > > > > > Fix the following warning when building virtio_snd driver. > > > > > > " > > > *** CID

Re: [PATCH] ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.

2024-02-13 Thread Michael S. Tsirkin
On Tue, Feb 13, 2024 at 10:02:24AM +0100, Takashi Iwai wrote: > On Tue, 13 Feb 2024 09:51:30 +0100, > Aiswarya Cyriac wrote: > > > > Fix the following warning when building virtio_snd driver. > > > > " > > *** CID 1583619: Uninitialized variables (UNINIT) > > sound/virtio/virtio_kctl.c:294 in

Re: [PATCH] ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.

2024-02-13 Thread Michael S. Tsirkin
On Tue, Feb 13, 2024 at 09:51:30AM +0100, Aiswarya Cyriac wrote: > Fix the following warning when building virtio_snd driver. > > " > *** CID 1583619: Uninitialized variables (UNINIT) > sound/virtio/virtio_kctl.c:294 in virtsnd_kctl_tlv_op() > 288 > 289 break; > 290   } > 291 > 292

Re: [PATCH] ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.

2024-02-13 Thread Takashi Iwai
On Tue, 13 Feb 2024 09:51:30 +0100, Aiswarya Cyriac wrote: > > Fix the following warning when building virtio_snd driver. > > " > *** CID 1583619: Uninitialized variables (UNINIT) > sound/virtio/virtio_kctl.c:294 in virtsnd_kctl_tlv_op() > 288 > 289 break; > 290   } > 291 > 292

[PATCH] ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.

2024-02-13 Thread Aiswarya Cyriac
Fix the following warning when building virtio_snd driver. " *** CID 1583619: Uninitialized variables (UNINIT) sound/virtio/virtio_kctl.c:294 in virtsnd_kctl_tlv_op() 288 289 break; 290   } 291 292   kfree(tlv); 293 vvv CID 1583619: Uninitialized variables (UNINIT) vvv

Re: [PATCH V1] vdpa: suspend and resume require DRIVER_OK

2024-02-13 Thread Eugenio Perez Martin
On Tue, Feb 13, 2024 at 8:49 AM Eugenio Perez Martin wrote: > > On Mon, Feb 12, 2024 at 9:20 AM Michael S. Tsirkin wrote: > > > > On Fri, Feb 09, 2024 at 02:29:59PM -0800, Steve Sistare wrote: > > > Calling suspend or resume requires VIRTIO_CONFIG_S_DRIVER_OK, for all > > > vdpa devices. > > > >