Re: [PATCH] net: missing check

2024-06-06 Thread kernel test robot
e' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Denis-Arefev/net-missing-check/20240606-230540 base: linus/master patch link: https://lore.kernel.org/r/20240606141450.44709-1-arefev%40swemel.ru pat

Re: [PATCH 3/5] arm64: dts: qcom: sdx75: add missing qlink_logging reserved memory for mpss

2024-06-06 Thread Naina Mehta
On 6/6/2024 8:20 PM, Krzysztof Kozlowski wrote: On 06/06/2024 16:38, Naina Mehta wrote: The qlink_logging memory region is also used by the modem firmware, add it to reserved memory regions. Also split MPSS DSM region into 2 separate regions. Signed-off-by: Naina Mehta --- arch/arm64/boot/dt

Re: [PATCH] nvdimm: Fix devs leaks in scan_labels()

2024-06-06 Thread Zhijian Li (Fujitsu)
On 07/06/2024 00:49, Ira Weiny wrote: > Li Zhijian wrote: >> Don't allocate devs again when it's valid pointer which has pionted to >> the memory allocated above with size (count + 2 * sizeof(dev)). >> >> A kmemleak reports: >> unreferenced object 0x88800dda1980 (size 16): >>comm "kworker

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-06 Thread zhang warden
> On Jun 6, 2024, at 23:01, Joe Lawrence wrote: > > Hi Wardenjohn, > > To follow up, Red Hat kpatch QE pointed me toward this test: > > https://gitlab.com/redhat/centos-stream/tests/kernel/kernel-tests/-/tree/main/general/kpatch/kpatch-trace?ref_type=heads > > which reports a few interestin

Re: [PATCH] nvdimm: Fix devs leaks in scan_labels()

2024-06-06 Thread Zhijian Li (Fujitsu)
On 07/06/2024 00:27, Dave Jiang wrote: > > > On 6/3/24 8:16 PM, Li Zhijian wrote: >> Don't allocate devs again when it's valid pointer which has pionted to >> the memory allocated above with size (count + 2 * sizeof(dev)). >> >> A kmemleak reports: >> unreferenced object 0x88800dda1980 (siz

Re: [PATCH v14 02/14] cgroup/misc: Add per resource callbacks for CSS events

2024-06-06 Thread chenridong
I think it is better when _misc_cg_res_alloc fails, it just calls _misc_cg_res_free(cg, index)(add index parameter, it means ending of iterator), so it can avoid calling ->free() that do not call ->alloc(). And in misc_cg_free, just call _misc_cg_res_free(cg, MISC_CG_RES_TYPES)  to free all.

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Boqun Feng
On Thu, Jun 06, 2024 at 09:29:51PM +0200, Peter Zijlstra wrote: > On Thu, Jun 06, 2024 at 12:00:36PM -0700, Boqun Feng wrote: > > On Thu, Jun 06, 2024 at 07:35:44PM +0200, Peter Zijlstra wrote: > > > On Thu, Jun 06, 2024 at 08:49:06AM -0700, Boqun Feng wrote: > > > > > > > Long-term plan is to 1)

Re: [PATCH v3 08/13] tracing: Add option to use memmapped memory for trace boot instance

2024-06-06 Thread Steven Rostedt
Memory management folks. Please review this patch. Specifically the "map_pages()" function below. On Thu, 06 Jun 2024 17:17:43 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Add an option to the trace_instance kernel command line parameter that > allows it to use the rese

[PATCH v3 10/13] tracing/ring-buffer: Add last_boot_info file to boot instance

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If an instance is mapped to memory on boot up, create a new file called "last_boot_info" that will hold information that can be used to properly parse the raw data in the ring buffer. It will export the delta of the addresses for text and data from what it was fro

[PATCH v3 13/13] tracing: Add last boot delta offset for stack traces

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The addresses of a stack trace event are relative to the kallsyms. As that can change between boots, when printing the stack trace from a buffer that was from the last boot, it needs all the addresses to be added to the "text_delta" that gives the delta between the

[PATCH v3 09/13] ring-buffer: Save text and data locations in mapped meta data

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" When a ring buffer is mapped to a specific address, save the address of a text function and some data. This will be used to determine the delta between the last boot and the current boot for pointers to functions as well as to data. Signed-off-by: Steven Rostedt (

[PATCH v3 12/13] tracing: Update function tracing output for previous boot buffer

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" For a persistent ring buffer that is saved across boots, if function tracing was performed in the previous boot, it only saves the address of the functions and uses "%pS" to print their names. But the current boot, those functions may be in different locations. The

[PATCH v3 11/13] tracing: Handle old buffer mappings for event strings and functions

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Use the saved text_delta and data_delta of a persistent memory mapped ring buffer that was saved from a previous boot, and use the delta in the trace event print output so that strings and functions show up normally. That is, for an event like trace_kmalloc() that

[PATCH v3 08/13] tracing: Add option to use memmapped memory for trace boot instance

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add an option to the trace_instance kernel command line parameter that allows it to use the reserved memory from memmap boot parameter. memmap=12M$0x28450 trace_instance=boot_mapped@0x28450:12M The above will reserves 12 megs at the physical address 0x2

[PATCH v3 07/13] ring-buffer: Validate boot range memory events

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Make sure all the events in each of the sub-buffers that were mapped in a memory region are valid. This moves the code that walks the buffers for time-stamp validation out of the CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS ifdef block and is used to validate the conten

[PATCH v3 05/13] ring-buffer: Add output of ring buffer meta page

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a buffer_meta per-cpu file for the trace instance that is mapped to boot memory. This shows the current meta-data and can be used by user space tools to record off the current mappings to help reconstruct the ring buffer after a reboot. It does not expose any

[PATCH v3 06/13] ring-buffer: Add test if range of boot buffer is valid

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a test against the ring buffer memory range to see if it has valid data. The ring_buffer_meta structure is given a new field called "first_buffer" which holds the address of the first sub-buffer. This is used to both determine if the other fields are valid as w

[PATCH v3 03/13] ring-buffer: Add ring_buffer_meta data

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Populate the ring_buffer_meta array. It holds the pointer to the head_buffer (next to read), the commit_buffer (next to write) the size of the sub-buffers, number of sub-buffers and an array that keeps track of the order of the sub-buffers. This information will b

[PATCH v3 04/13] tracing: Implement creating an instance based on a given memory region

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Allow for creating a new instance by passing in an address and size to map the ring buffer for the instance to. This will allow features like a pstore memory mapped region to be used for an tracing instance ring buffer that can be retrieved from one boot to the ne

[PATCH v3 00/13] tracing: Persistent traces across a reboot or crash

2024-06-06 Thread Steven Rostedt
This is a way to map a ring buffer instance across reboots. The requirement is that you have a memory region that is not erased. I tested this on a Debian VM running on qemu on a Debian server, and even tested it on a baremetal box running Fedora. I was surprised that it worked on the baremetal b

[PATCH v3 02/13] ring-buffer: Add ring_buffer_alloc_range()

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation to allowing the trace ring buffer to be allocated in a range of memory that is persistent across reboots, add ring_buffer_alloc_range(). It takes a contiguous range of memory and will split it up evenly for the per CPU ring buffers. If there's not e

[PATCH v3 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation for having the ring buffer mapped to a dedicated location, which will have the same restrictions as user space memory mapped buffers, allow it to use the "mapped" field of the ring_buffer_per_cpu structure without having the user space meta page mapp

Re: [PATCH v4] drivers: remoteproc: xlnx: add attach detach support

2024-06-06 Thread Mathieu Poirier
On Wed, Jun 05, 2024 at 12:45:17PM -0500, Tanmay Shah wrote: > > > On 6/4/24 10:34 AM, Mathieu Poirier wrote: > > Hi Mathieu, > > Thanks for reviews. > Please find my comments below. > > > Hi Tanmay, > > > > On Mon, Jun 03, 2024 at 01:34:38PM -0700, Tanmay Shah wrote: > >> It is possible that

Re: [PATCH v4] drivers: remoteproc: xlnx: add attach detach support

2024-06-06 Thread Mathieu Poirier
On Wed, 5 Jun 2024 at 11:47, Tanmay Shah wrote: > > > > On 6/4/24 3:23 PM, Bjorn Andersson wrote: > > On Mon, Jun 03, 2024 at 01:34:38PM -0700, Tanmay Shah wrote: > >> It is possible that remote processor is already running before > >> linux boot or remoteproc platform driver probe. Implement requ

[PATCH v3 4/4] net: drop_monitor: use drop_reason_lookup()

2024-06-06 Thread Johannes Berg
From: Johannes Berg Now that we have drop_reason_lookup(), we can just use it for drop_monitor as well, rather than exporting the list itself. Signed-off-by: Johannes Berg --- v3: - look up SKB_DROP_REASON_NOT_SPECIFIED if initial lookup returns NULL, to preserve previous behaviour --- inc

[PATCH v3 1/4] tracing: add __print_sym() to replace __print_symbolic()

2024-06-06 Thread Johannes Berg
From: Johannes Berg The way __print_symbolic() works is limited and inefficient in multiple ways: - you can only use it with a static list of symbols, but e.g. the SKB dropreasons are now a dynamic list - it builds the list in memory _three_ times, so it takes a lot of memory: - The p

[PATCH v3 3/4] net: dropreason: use new __print_sym() in tracing

2024-06-06 Thread Johannes Berg
From: Johannes Berg The __print_symbolic() could only ever print the core drop reasons, since that's the way the infrastructure works. Now that we have __print_sym() with all the advantages mentioned in that commit, convert to that and get all the drop reasons from all subsystems. As we already h

[PATCH v3 0/4] tracing: improve symbolic printing

2024-06-06 Thread Johannes Berg
Completely forgot about this again ... here's another respin. v2 was: - rebased on 6.9-rc1 - always search for __print_sym() and get rid of the DYNPRINT flag and associated code; I think ideally we'll just remove the older __print_symbolic() entirely - use ':' as the separator instead of

[PATCH v3 2/4] tracing/timer: use __print_sym()

2024-06-06 Thread Johannes Berg
From: Johannes Berg Use the new __print_sym() in the timer tracing, just to show how to convert something. This adds ~80 bytes of .text for a saving of ~1.5K of data in my builds. Note the format changes from print fmt: "success=%d dependency=%s", REC->success, __print_symbolic(REC->dependency

Re: [PATCH 1/3] rust: add static_call support

2024-06-06 Thread Peter Zijlstra
On Thu, Jun 06, 2024 at 09:09:00PM +0200, Miguel Ojeda wrote: > On Thu, Jun 6, 2024 at 7:19 PM Peter Zijlstra wrote: > > > > This is absolutely unreadable gibberish -- how am I supposed to keep > > this in sync with the rest of the static_call infrastructure? > > Yeah, they are macros, which look

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Peter Zijlstra
On Thu, Jun 06, 2024 at 12:00:36PM -0700, Boqun Feng wrote: > On Thu, Jun 06, 2024 at 07:35:44PM +0200, Peter Zijlstra wrote: > > On Thu, Jun 06, 2024 at 08:49:06AM -0700, Boqun Feng wrote: > > > > > Long-term plan is to 1) compile the C helpers in some IR and 2) inline > > > the helpers with Rust

[PATCH v2 0/2] Support mailbox interface in qcom,smsm driver

2024-06-06 Thread Luca Weiss
Take a shot at converting the last driver that requires direct "qcom,ipc*" syscon references in devicetree by allowing the smsm driver to use the mailbox interface to achieve the same effect. Still not sure if the devicetree bindings are the prettiest but they're functional. One alternative I'm t

[PATCH v2 2/2] soc: qcom: smsm: Support using mailbox interface

2024-06-06 Thread Luca Weiss
Add support for using the mbox interface instead of manually writing to the syscon. With this change the driver will attempt to get the mailbox first, and if that fails it will fall back to the existing way of using qcom,ipc-* properties and converting to syscon. Reviewed-by: Konrad Dybcio Signed

[PATCH v2 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc

2024-06-06 Thread Luca Weiss
The qcom,ipc-N properties are essentially providing a reference to a mailbox, so allow using the mboxes property to do the same in a more structured way. Since multiple SMSM hosts are supported, we need to be able to provide the correct mailbox for each host. The old qcom,ipc-N properties map to t

Re: [PATCH] remoteproc: mediatek: Don't print error when optional scp handle is missing

2024-06-06 Thread Nícolas F . R . A . Prado
On Thu, Jun 06, 2024 at 12:50:56PM +0200, AngeloGioacchino Del Regno wrote: > Il 05/06/24 21:35, Nícolas F. R. A. Prado ha scritto: > > The scp_get() helper has two users: the mtk-vcodec and the mtk-mdp3 > > drivers. mdp3 considers the mediatek,scp phandle optional, and when it's > > missing mdp3 w

Re: [PATCH 1/3] rust: add static_call support

2024-06-06 Thread Miguel Ojeda
On Thu, Jun 6, 2024 at 7:19 PM Peter Zijlstra wrote: > > This is absolutely unreadable gibberish -- how am I supposed to keep > this in sync with the rest of the static_call infrastructure? Yeah, they are macros, which look different from "normal" Rust code. Is there something we could do to hel

Re: [PATCH v3 4/6] module: script to generate offset ranges for builtin modules

2024-06-06 Thread Kris Van Hees
On Tue, May 21, 2024 at 01:53:27AM +0900, Masahiro Yamada wrote: > On Fri, May 17, 2024 at 1:31???PM Kris Van Hees > wrote: > > > > The offset range data for builtin modules is generated using: > > - modules.builtin.modinfo: associates object files with module names > > - vmlinux.map: provides

[PATCH v2] rpmsg: qcom_smd: Improve error handling for qcom_smd_parse_edge

2024-06-06 Thread Luca Weiss
When the mailbox driver has not probed yet, the error message "failed to parse smd edge" is just going to confuse users, so improve the error prints a bit. Cover the last remaining exits from qcom_smd_parse_edge with proper error prints, especially the one for the mbox_chan deserved dev_err_probe

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Boqun Feng
On Thu, Jun 06, 2024 at 07:35:44PM +0200, Peter Zijlstra wrote: > On Thu, Jun 06, 2024 at 08:49:06AM -0700, Boqun Feng wrote: > > > Long-term plan is to 1) compile the C helpers in some IR and 2) inline > > the helpers with Rust in IR-level, as what Gary has: > > > > > > https://lore.kernel.

Re: [PATCH v2 2/5] ftrace: Remove "ftrace_hash" parameter from __ftrace_hash_rec_update()

2024-06-06 Thread Steven Rostedt
On Thu, 6 Jun 2024 18:53:12 +0100 Mark Rutland wrote: > On Wed, Jun 05, 2024 at 02:03:36PM -0400, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > > > While adding comments to the function __ftrace_hash_rec_update() and > > trying to describe in detail what the parameter for "ftrac

Re: [PATCH v2 5/5] ftrace: Add comments to ftrace_hash_move() and friends

2024-06-06 Thread Mark Rutland
On Wed, Jun 05, 2024 at 02:03:39PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Describe what ftrace_hash_move() does and add some more comments to some > other functions to make it easier to understand. > > Signed-off-by: Steven Rostedt (Google) Acked-by: Mark Rutland

Re: [PATCH v2 4/5] ftrace: Convert "inc" parameter to bool in ftrace_hash_rec_update_modify()

2024-06-06 Thread Mark Rutland
On Wed, Jun 05, 2024 at 02:03:38PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The parameter "inc" in the function ftrace_hash_rec_update_modify() is > boolean. Change it to be such. > > Also add documentation to what the function does. > > Signed-off-by: Steven Rostedt (

Re: [PATCH v2 2/5] ftrace: Remove "ftrace_hash" parameter from __ftrace_hash_rec_update()

2024-06-06 Thread Mark Rutland
On Wed, Jun 05, 2024 at 02:03:36PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > While adding comments to the function __ftrace_hash_rec_update() and > trying to describe in detail what the parameter for "ftrace_hash" does, I > realized that it basically does exactly the same

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Peter Zijlstra
On Thu, Jun 06, 2024 at 08:49:06AM -0700, Boqun Feng wrote: > Long-term plan is to 1) compile the C helpers in some IR and 2) inline > the helpers with Rust in IR-level, as what Gary has: > > > https://lore.kernel.org/rust-for-linux/20240529202817.3641974-1-g...@garyguo.net/ Urgh, that st

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Peter Zijlstra
On Thu, Jun 06, 2024 at 03:05:26PM +, 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 2/3] rust: add static_key_false

2024-06-06 Thread Peter Zijlstra
On Thu, Jun 06, 2024 at 03:05:25PM +, Alice Ryhl wrote: > Add just enough support for static key so that we can use it from > tracepoints. Tracepoints rely on `static_key_false` even though it is > deprecated, so we add the same functionality to Rust. Urgh, more unreadable gibberish :-( Can w

Re: [PATCH 1/3] rust: add static_call support

2024-06-06 Thread Peter Zijlstra
On Thu, Jun 06, 2024 at 03:05:24PM +, Alice Ryhl wrote: > Add static_call support by mirroring how C does. When the platform does > not support static calls (right now, that means that it is not x86), > then the function pointer is loaded from a global and called. Otherwise, > we generate a cal

Re: [PATCH] nvdimm: Fix devs leaks in scan_labels()

2024-06-06 Thread Ira Weiny
Li Zhijian wrote: > Don't allocate devs again when it's valid pointer which has pionted to > the memory allocated above with size (count + 2 * sizeof(dev)). > > A kmemleak reports: > unreferenced object 0x88800dda1980 (size 16): > comm "kworker/u10:5", pid 69, jiffies 4294671781 > hex dump

Re: [RFC bpf-next 01/10] uprobe: Add session callbacks to uprobe_consumer

2024-06-06 Thread Andrii Nakryiko
On Thu, Jun 6, 2024 at 9:46 AM Jiri Olsa wrote: > > On Wed, Jun 05, 2024 at 10:50:11PM +0200, Jiri Olsa wrote: > > On Wed, Jun 05, 2024 at 07:56:19PM +0200, Oleg Nesterov wrote: > > > On 06/05, Andrii Nakryiko wrote: > > > > > > > > so any such > > > > limitations will cause problems, issue report

Re: [RFC bpf-next 01/10] uprobe: Add session callbacks to uprobe_consumer

2024-06-06 Thread Jiri Olsa
On Wed, Jun 05, 2024 at 10:50:11PM +0200, Jiri Olsa wrote: > On Wed, Jun 05, 2024 at 07:56:19PM +0200, Oleg Nesterov wrote: > > On 06/05, Andrii Nakryiko wrote: > > > > > > so any such > > > limitations will cause problems, issue reports, investigation, etc. > > > > Agreed... > > > > > As one pos

Re: [PATCH 0/3] Tracepoints and static branch/call in Rust

2024-06-06 Thread Mathieu Desnoyers
On 2024-06-06 11:46, Alice Ryhl wrote: On Thu, Jun 6, 2024 at 5:25 PM Mathieu Desnoyers wrote: On 2024-06-06 11:05, Alice Ryhl wrote: This implementation implements support for static keys in Rust so that the actual static branch will end up in the Rust object file. However, it would also be

Re: [PATCH] nvdimm: Fix devs leaks in scan_labels()

2024-06-06 Thread Dave Jiang
On 6/3/24 8:16 PM, Li Zhijian wrote: > Don't allocate devs again when it's valid pointer which has pionted to > the memory allocated above with size (count + 2 * sizeof(dev)). > > A kmemleak reports: > unreferenced object 0x88800dda1980 (size 16): > comm "kworker/u10:5", pid 69, jiffies 4

Re: [PATCH 2/3] rust: add static_key_false

2024-06-06 Thread Alice Ryhl
On Thu, Jun 6, 2024 at 5:37 PM Mathieu Desnoyers wrote: > > On 2024-06-06 11:05, Alice Ryhl wrote: > > Add just enough support for static key so that we can use it from > > tracepoints. Tracepoints rely on `static_key_false` even though it is > > deprecated, so we add the same functionality to Rus

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Mathieu Desnoyers
On 2024-06-06 12:16, Alice Ryhl wrote: On Thu, Jun 6, 2024 at 5:29 PM Mathieu Desnoyers wrote: On 2024-06-06 11:05, 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 h

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Mathieu Desnoyers
On 2024-06-06 11:49, Boqun Feng wrote: On Thu, Jun 06, 2024 at 11:30:03AM -0400, Mathieu Desnoyers wrote: On 2024-06-06 11:05, 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 th

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Alice Ryhl
On Thu, Jun 6, 2024 at 5:29 PM Mathieu Desnoyers wrote: > > On 2024-06-06 11:05, 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 inp

Re: [PATCH RESEND] nvdimm: add missing MODULE_DESCRIPTION() macros

2024-06-06 Thread Dave Jiang
On 5/26/24 10:07 AM, Jeff Johnson wrote: > Fix the 'make W=1' warnings: > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/libnvdimm.o > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_pmem.o > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/n

Re: [PATCH] ACPI: NFIT: add missing MODULE_DESCRIPTION() macro

2024-06-06 Thread Dave Jiang
On 6/3/24 6:30 AM, Jeff Johnson wrote: > make allmodconfig && make W=1 C=1 reports: > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/acpi/nfit/nfit.o > > Add the missing invocation of the MODULE_DESCRIPTION() macro. > > Signed-off-by: Jeff Johnson Reviewed-by: Dave Jiang > --- >

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Boqun Feng
On Thu, Jun 06, 2024 at 11:30:03AM -0400, Mathieu Desnoyers wrote: > On 2024-06-06 11:05, 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

Re: [PATCH 0/3] Tracepoints and static branch/call in Rust

2024-06-06 Thread Alice Ryhl
On Thu, Jun 6, 2024 at 5:25 PM Mathieu Desnoyers wrote: > > On 2024-06-06 11:05, Alice Ryhl wrote: > > This implementation implements support for static keys in Rust so that > > the actual static branch will end up in the Rust object file. However, > > it would also be possible to just wrap the tr

Re: [PATCH 0/3] Tracepoints and static branch/call in Rust

2024-06-06 Thread Mathieu Desnoyers
rust/kernel/tracepoint.rs | 92 + scripts/Makefile.build | 2 +- 8 files changed, 315 insertions(+), 1 deletion(-) --- base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 change-id: 20240606-tracepoint-31e15b90e471 Best rega

Re: [RFC v3 net-next 1/7] net: add rx_sk to trace_kfree_skb

2024-06-06 Thread Yan Zhai
On Wed, Jun 5, 2024 at 6:57 PM Steven Rostedt wrote: > > On Tue, 4 Jun 2024 14:47:38 -0700 > Yan Zhai wrote: > > > skb does not include enough information to find out receiving > > sockets/services and netns/containers on packet drops. In theory > > skb->dev tells about netns, but it can get clea

Re: [PATCH 2/3] rust: add static_key_false

2024-06-06 Thread Mathieu Desnoyers
On 2024-06-06 11:05, Alice Ryhl wrote: Add just enough support for static key so that we can use it from tracepoints. Tracepoints rely on `static_key_false` even though it is deprecated, so we add the same functionality to Rust. Signed-off-by: Alice Ryhl --- rust/kernel/lib.rs| 1 +

[PATCH 2/3] rust: add static_key_false

2024-06-06 Thread Alice Ryhl
Add just enough support for static key so that we can use it from tracepoints. Tracepoints rely on `static_key_false` even though it is deprecated, so we add the same functionality to Rust. Signed-off-by: Alice Ryhl --- rust/kernel/lib.rs| 1 + rust/kernel/static_key.rs | 87 +++

[PATCH 1/3] rust: add static_call support

2024-06-06 Thread Alice Ryhl
Add static_call support by mirroring how C does. When the platform does not support static calls (right now, that means that it is not x86), then the function pointer is loaded from a global and called. Otherwise, we generate a call to a trampoline function, and objtool is used to make these calls

Re: [PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Mathieu Desnoyers
On 2024-06-06 11:05, 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 [...] diff --git a/rust/

[PATCH 3/3] rust: add tracepoint support

2024-06-06 Thread Alice Ryhl
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 --- rust/bindings/bindings_helper.h | 1 + rust/bindings/lib.rs

[PATCH 0/3] Tracepoints and static branch/call in Rust

2024-06-06 Thread Alice Ryhl
kefile.build | 2 +- 8 files changed, 315 insertions(+), 1 deletion(-) --- base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 change-id: 20240606-tracepoint-31e15b90e471 Best regards, -- Alice Ryhl

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-06 Thread Joe Lawrence
Hi Wardenjohn, To follow up, Red Hat kpatch QE pointed me toward this test: https://gitlab.com/redhat/centos-stream/tests/kernel/kernel-tests/-/tree/main/general/kpatch/kpatch-trace?ref_type=heads which reports a few interesting things via systemd service and ftrace: - Patched functions - Trace

[PATCH v2 1/1] dt-bindings: remoteproc: imx_rproc: add minItems for power-domain

2024-06-06 Thread Frank Li
"fsl,imx8qxp-cm4" and "fsl,imx8qm-cm4" need minimum 2 power domains. Keep the same restriction for other compatible string. Signed-off-by: Frank Li --- Notes: Change from v1 to v2 - set minitem to 2 at top - Add imx8qm compatible string also - use not logic to handle difference c

Re: [PATCH 3/5] arm64: dts: qcom: sdx75: add missing qlink_logging reserved memory for mpss

2024-06-06 Thread Krzysztof Kozlowski
On 06/06/2024 16:38, Naina Mehta wrote: > The qlink_logging memory region is also used by the modem firmware, > add it to reserved memory regions. > Also split MPSS DSM region into 2 separate regions. > > Signed-off-by: Naina Mehta > --- > arch/arm64/boot/dts/qcom/sdx75.dtsi | 17 +--

Re: [PATCH v14 02/14] cgroup/misc: Add per resource callbacks for CSS events

2024-06-06 Thread Haitao Huang
On Thu, 06 Jun 2024 08:37:31 -0500, chenridong wrote: If _misc_cg_res_alloc fails, maybe some types do not call ->alloc(), but all types ->free() callback >will be called, is that ok? Not sure I understand. Are you suggesting we ignore failures from ->alloc() callback in _misc_cg_r

Re: [PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: document the SDX75 PAS

2024-06-06 Thread Krzysztof Kozlowski
On 06/06/2024 16:38, Naina Mehta wrote: > Document the MPSS Peripheral Authentication Service on SDX75 platform. > > Signed-off-by: Naina Mehta > --- > .../devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git > a/Documentation/devi

[PATCH 4/5] arm64: dts: qcom: sdx75: Add remoteproc node

2024-06-06 Thread Naina Mehta
Add MPSS remoteproc node for SDX75 SoC. Signed-off-by: Naina Mehta --- arch/arm64/boot/dts/qcom/sdx75.dtsi | 47 + 1 file changed, 47 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdx75.dtsi b/arch/arm64/boot/dts/qcom/sdx75.dtsi index 9349b1c4e196..25d3f110abe

[PATCH 5/5] arm64: dts: qcom: sdx75-idp: enable MPSS remoteproc node

2024-06-06 Thread Naina Mehta
Enable MPSS remoteproc node on sdx75-idp platform. Signed-off-by: Naina Mehta --- arch/arm64/boot/dts/qcom/sdx75-idp.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts index fde16308c7e2..f1bbe7ab01ab 100

[PATCH 3/5] arm64: dts: qcom: sdx75: add missing qlink_logging reserved memory for mpss

2024-06-06 Thread Naina Mehta
The qlink_logging memory region is also used by the modem firmware, add it to reserved memory regions. Also split MPSS DSM region into 2 separate regions. Signed-off-by: Naina Mehta --- arch/arm64/boot/dts/qcom/sdx75.dtsi | 17 + 1 file changed, 13 insertions(+), 4 deletions(-)

[PATCH 2/5] remoteproc: qcom: pas: Add SDX75 remoteproc support

2024-06-06 Thread Naina Mehta
Add MPSS Peripheral Authentication Service support for SDX75 platform. Signed-off-by: Naina Mehta --- drivers/remoteproc/qcom_q6v5_pas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 8458bcfe9e19..833e2f9c2c5e 1

[PATCH 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: document the SDX75 PAS

2024-06-06 Thread Naina Mehta
Document the MPSS Peripheral Authentication Service on SDX75 platform. Signed-off-by: Naina Mehta --- .../devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Document

[PATCH 0/5] Add MPSS remoteproc support for SDX75

2024-06-06 Thread Naina Mehta
Add modem support to SDX75 using the PAS remoteproc driver. Also, add qlink_logging memory region and split MPSS DSM region into 2 separate regions. These patches were co-authored by Rohit Agarwal while at Qualcomm. Naina Mehta (5): dt-bindings: remoteproc: qcom,sm8550-pas: document the SDX75 P

Re: [PATCH] net: missing check

2024-06-06 Thread Eric Dumazet
On Thu, Jun 6, 2024 at 4:14 PM Denis Arefev wrote: > > Two missing check in virtio_net_hdr_to_skb() allowed syzbot > to crash kernels again > > 1. After the skb_segment function the buffer may become non-linear > (nr_frags != 0), but since the SKBTX_SHARED_FRAG flag is not set anywhere > the __skb

[PATCH] net: missing check

2024-06-06 Thread Denis Arefev
Two missing check in virtio_net_hdr_to_skb() allowed syzbot to crash kernels again 1. After the skb_segment function the buffer may become non-linear (nr_frags != 0), but since the SKBTX_SHARED_FRAG flag is not set anywhere the __skb_linearize function will not be executed, then the buffer will

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

2024-06-06 Thread Daniel v. Kirschten
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 that module as read-only. This causes a kernel panic when the struct is written to the first time after it has been marked

[PATCH v2] ftrace: Add missing kerneldoc parameters to unregister_ftrace_direct()

2024-06-06 Thread Marilene A Garcia
Add the description to the parameters addr and free_filters of the function unregister_ftrace_direct(). Signed-off-by: Marilene A Garcia --- Hello, Thank you for the feedback. The requested changes were applied in this new version. kernel/trace/ftrace.c | 2 ++ 1 file changed, 2 insertions(+)

Re: [PATCH v14 14/14] selftests/sgx: Add scripts for EPC cgroup testing

2024-06-06 Thread Haitao Huang
On Thu, 06 Jun 2024 00:32:55 -0500, Jarkko Sakkinen wrote: On Wed Jun 5, 2024 at 6:33 PM EEST, Haitao Huang wrote: sgx_cgroup_try_charge() expects sgx_cg_wq, so it would break unless we check and return 0 which was the initially implemented in v12. But then Kai had some concern on that we e

Re: [PATCH v2 1/5] ftrace: Rename dup_hash() and comment it

2024-06-06 Thread Mark Rutland
On Wed, Jun 05, 2024 at 02:03:35PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The name "dup_hash()" is a misnomer as it does not duplicate the hash that > is passed in, but instead moves its entities from that hash to a newly > allocated one. Rename it to "__move_hash()" (

[PATCH] function_graph: Rename BYTE_NUMBER to CHAR_NUMBER in selftests

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The function_graph selftests checks various size variables to pass from the entry of the function to the exit. It tests 1, 2, 4 and 8 byte words. The 1 byte macro was called BYTE_NUMBER but that is used in the sh architecture: arch/sh/include/asm/bitops-op32.h Jus

Re: [PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size

2024-06-06 Thread AngeloGioacchino Del Regno
Il 06/06/24 11:06, jason-ch chen ha scritto: From: Jason Chen Increase MT8188 SCP core0 DRAM size for HEVC driver. so the second core only gets a maximum of 0x20 of SRAM? I'm not sure how useful is the secondary SCP core, at this point, with so little available SRAM but... okay, as y

Re: [PATCH] remoteproc: mediatek: Don't print error when optional scp handle is missing

2024-06-06 Thread AngeloGioacchino Del Regno
Il 05/06/24 21:35, Nícolas F. R. A. Prado ha scritto: The scp_get() helper has two users: the mtk-vcodec and the mtk-mdp3 drivers. mdp3 considers the mediatek,scp phandle optional, and when it's missing mdp3 will directly look for the scp node based on compatible. For that reason printing an err

Re: [PATCH v2 2/6] livepatch: Add klp-convert tool

2024-06-06 Thread Lukas Hruska
Hello Joe, > > +#define KLP_RELOC_SYMBOL_POS(LP_OBJ_NAME, SYM_OBJ_NAME, SYM_NAME, SYM_POS) > > \ > > + asm("\".klp.sym.rela." #LP_OBJ_NAME "." #SYM_OBJ_NAME "." #SYM_NAME "," > > #SYM_POS "\"") > > ^^^ > I think I foun

Re: [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Use .mbn firmware for IPA

2024-06-06 Thread Konrad Dybcio
On 6.06.2024 11:09 AM, Luca Weiss wrote: > Specify the file name for the squashed/non-split firmware with the .mbn > extension instead of the split .mdt. The kernel can load both but the > squashed version is preferred in dts nowadays. > > Signed-off-by: Luca Weiss > --- Reviewed-by: Konrad Dybc

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

2024-06-06 Thread Neil Armstrong
On 11/05/2024 23:56, Dmitry Baryshkov wrote: 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 / alt

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

2024-06-06 Thread Dmitry Baryshkov
On Thu, 6 Jun 2024 at 01:48, Chris Lew wrote: > > Hi Dmitry, > > On 5/11/2024 2:56 PM, Dmitry Baryshkov wrote: > ... > > @@ -76,12 +76,12 @@ static int pdr_locator_new_server(struct qmi_handle > > *qmi, > > locator_hdl); > > struct pdr_service *pd

[PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Use .mbn firmware for IPA

2024-06-06 Thread Luca Weiss
status = "okay"; }; --- base-commit: ee78a17615ad0cfdbbc27182b1047cd36c9d4d5f change-id: 20240606-fp5-ipa-mbn-d0466de6b5bf Best regards, -- Luca Weiss

[PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size

2024-06-06 Thread jason-ch chen
From: Jason Chen Increase MT8188 SCP core0 DRAM size for HEVC driver. Signed-off-by: Jason Chen --- drivers/remoteproc/mtk_scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index b885a9a041e4..2119fc62c3f2 1006

RE: [PATCH] remoteproc: imx_rproc: Adjust phandle parsing issue while remapping optional addresses in imx_rproc_addr_init()

2024-06-06 Thread Peng Fan
Hi Aleksandr, > Subject: [PATCH] remoteproc: imx_rproc: Adjust phandle parsing issue while > remapping optional addresses in imx_rproc_addr_init() > > In imx_rproc_addr_init() "nph = of_count_phandle_with_args()" just counts > number of phandles. But phandles may be empty. So of_parse_phandle() i

[PATCH] remoteproc: imx_rproc: Adjust phandle parsing issue while remapping optional addresses in imx_rproc_addr_init()

2024-06-06 Thread Aleksandr Mishin
In imx_rproc_addr_init() "nph = of_count_phandle_with_args()" just counts number of phandles. But phandles may be empty. So of_parse_phandle() in the parsing loop (0 < a < nph) may return NULL which is later dereferenced. Adjust this issue by adding NULL-return check. Found by Linux Verification C

Re: [PATCH v3 1/5] dt-bindings: remoteproc: qcom,sa8775p-pas: Document the SA8775p ADSP, CDSP and GPDSP

2024-06-06 Thread Krzysztof Kozlowski
On 05/06/2024 18:56, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Document the components used to boot the ADSP, CDSP0, CDSP1, GPDSP0 and > GPDSP1 on the SA8775p SoC. > > Signed-off-by: Bartosz Golaszewski > --- > .../bindings/remoteproc/qcom,sa8775p-pas.yaml | 160 > ++

Re: [PATCH] tools/virtio: Use the __GFP_ZERO flag of kmalloc to complete the memory initialization.

2024-06-06 Thread cuitao
Sorry, maybe I'm wrong. I wonder if the gfp parameter in static inline void *kmalloc(size_t s, gfp_t gfp) can be deleted if it is not used. Or would be better to move memset to kmalloc. Like this: #define __GFP_ZERO 0x1 static inline void *kmalloc(size_t s, gfp_t gfp) {     void *p;     if (_

Re: [PATCH] tools/virtio: Use the __GFP_ZERO flag of kmalloc to complete the memory initialization.

2024-06-06 Thread Michael S. Tsirkin
On Wed, Jun 05, 2024 at 09:52:45PM +0800, cuitao wrote: > Use the __GFP_ZERO flag of kmalloc to initialize memory while allocating it, > without the need for an additional memset call. > > Signed-off-by: cuitao > --- > tools/virtio/linux/kernel.h | 5 + > 1 file changed, 1 insertion(+), 4 de