Re: [PATCH v2 1/2] dt-bindings: pinctrl: qcom,pmic-gpio: Allow gpio-hog nodes

2024-04-10 Thread Krzysztof Kozlowski
On 09/04/2024 20:36, Luca Weiss wrote: > Allow specifying a GPIO hog, as already used on > qcom-msm8974-lge-nexus5-hammerhead.dts. > > Signed-off-by: Luca Weiss > --- > .../devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 12 > > 1 file changed, 12 insertions(+)

Re: [PATCH v2 2/2] ARM: dts: qcom: msm8974-hammerhead: Update gpio hog node name

2024-04-10 Thread Krzysztof Kozlowski
On 09/04/2024 20:36, Luca Weiss wrote: > Follow the gpio-hog bindings and use otg-hog as node name. > > Signed-off-by: Luca Weiss > --- > arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Krzysztof Kozlowski

Re: [PATCHv3 2/2] usb: typec: anx7688: Add driver for ANX7688 USB-C HDMI bridge

2024-04-10 Thread Ondřej Jirman
On Tue, Apr 09, 2024 at 06:35:50PM GMT, Dmitry Baryshkov wrote: > On Tue, Apr 09, 2024 at 01:04:12PM +0200, Pavel Machek wrote: > > Hi! > > > > > > This is driver for ANX7688 USB-C HDMI, with flashing and debugging > > > > features removed. ANX7688 is rather criticial piece on PinePhone, > > > >

Re: [PATCH net-next v3 2/6] rstreason: prepare for passive reset

2024-04-10 Thread Antoine Tenart
Quoting Jason Xing (2024-04-09 12:09:30) > void(*send_reset)(const struct sock *sk, > - struct sk_buff *skb); > + struct sk_buff *skb, > + int reason); I get that 'int'

Re: [PATCHv3 2/2] usb: typec: anx7688: Add driver for ANX7688 USB-C HDMI bridge

2024-04-10 Thread Ondřej Jirman
On Wed, Apr 10, 2024 at 01:32:27PM GMT, megi xff wrote: > On Tue, Apr 09, 2024 at 06:35:50PM GMT, Dmitry Baryshkov wrote: > > On Tue, Apr 09, 2024 at 01:04:12PM +0200, Pavel Machek wrote: > > > Hi! > > > > > > > > This is driver for ANX7688 USB-C HDMI, with flashing and debugging > > > > >

Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-10 Thread Peilin He
>> From: hepeilin >> >> Introduce a tracepoint for icmp_send, which can help users to get more >> detail information conveniently when icmp abnormal events happen. >> >> 1. Giving an usecase example: >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >=3D=3D=3D=3D=3D >>

Re: [PATCH] tracing: Add new_exec tracepoint

2024-04-10 Thread Marco Elver
On Wed, 10 Apr 2024 at 01:54, Masami Hiramatsu wrote: > > On Tue, 9 Apr 2024 16:45:47 +0200 > Marco Elver wrote: > > > On Tue, 9 Apr 2024 at 16:31, Steven Rostedt wrote: > > > > > > On Mon, 8 Apr 2024 11:01:54 +0200 > > > Marco Elver wrote: > > > > > > > Add "new_exec" tracepoint, which is

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-04-10 Thread Jonthan Haslam
Hi Masami, > > > Which is why I was asking to land this patch as is, as it relieves the > > > scalability pains in production and is easy to backport to old > > > kernels. And then we can work on batched APIs and switch to per-CPU rw > > > semaphore. > > OK, then I'll push this to for-next at

[linus:master] [trace_seq] 40fc60e36c: BUG:KASAN:global-out-of-bounds_in_hex_string

2024-04-10 Thread kernel test robot
b l=38182 [ 413.804088][ T494] - [ 413.804885][ T494] tasks-scale: Test complete The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20240410/202404101431.bb9742bf-...@intel.com -- 0-DAY CI Kernel Test Service h

[PATCH v2 09/13] mailbox: omap: Use function local struct mbox_controller

2024-04-10 Thread Andrew Davis
The mbox_controller struct is only needed in the probe function. Make it a local variable instead of storing a copy in omap_mbox_device to simplify that struct. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 21 - 1 file changed, 12 insertions(+), 9

Re: Copying TLS/user register data per perf-sample?

2024-04-10 Thread Google
On Thu, 4 Apr 2024 12:26:41 -0700 Beau Belgrave wrote: > Hello, > > I'm looking into the possibility of capturing user data that is pointed > to by a user register (IE: fs/gs for TLS on x86/64) for each sample via > perf_events. > > I was hoping to find a way to do this similar to

Re: [PATCH] tracing: Add new_exec tracepoint

2024-04-10 Thread Google
On Mon, 8 Apr 2024 11:01:54 +0200 Marco Elver wrote: > Add "new_exec" tracepoint, which is run right after the point of no > return but before the current task assumes its new exec identity. > > Unlike the tracepoint "sched_process_exec", the "new_exec" tracepoint > runs before flushing the

Re: [PATCH] ftrace: Fix use-after-free issue in ftrace_location()

2024-04-10 Thread Steven Rostedt
On Mon, 1 Apr 2024 20:55:43 +0800 Zheng Yejian wrote: > KASAN reports a bug: > > BUG: KASAN: use-after-free in ftrace_location+0x90/0x120 > Read of size 8 at addr 888141d40010 by task insmod/424 > CPU: 8 PID: 424 Comm: insmod Tainted: GW 6.9.0-rc2+ #213 > [...] >

Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-10 Thread Jason Xing
[...] > >I think my understanding based on what Eric depicted differs from you: > >we're supposed to filter out those many invalid cases and only trace > >the valid action of sending a icmp, so where to add a new tracepoint > >is important instead of adding more checks in the tracepoint itself. >

[PATCH v2 01/13] mailbox: omap: Remove unused omap_mbox_{enable,disable}_irq() functions

2024-04-10 Thread Andrew Davis
These function are not used, remove these here. While here, remove the leading _ from the driver internal functions that do the same thing as the functions removed. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 42 --

[PATCH v2 04/13] mailbox: omap: Move fifo size check to point of use

2024-04-10 Thread Andrew Davis
The mbox_kfifo_size can be changed at runtime, the sanity check on it's value should be done when it is used, not only once at init time. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH v2 00/13] OMAP mailbox FIFO removal

2024-04-10 Thread Andrew Davis
Hello all, Core of this series is the last patch removing the message FIFO from OMAP mailbox. This hurts our real-time performance. It was a legacy leftover from before the common mailbox framework anyway. The rest of the patches are cleanups found along the way. Thanks, Andrew Changes for v2:

[PATCH v2 02/13] mailbox: omap: Remove unused omap_mbox_request_channel() function

2024-04-10 Thread Andrew Davis
This function is not used, remove this function. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 36 -- include/linux/omap-mailbox.h | 6 -- 2 files changed, 42 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c

[PATCH v2 06/13] mailbox: omap: Remove device class

2024-04-10 Thread Andrew Davis
The driver currently creates a new device class "mbox". Then for each mailbox adds a device to that class. This class provides no file operations provided for any userspace users of this device class. It may have been extended to be functional in our vendor tree at some point, but that is not the

Re: [PATCH] tracing: Add new_exec tracepoint

2024-04-10 Thread Marco Elver
On Wed, 10 Apr 2024 at 15:56, Masami Hiramatsu wrote: > > On Mon, 8 Apr 2024 11:01:54 +0200 > Marco Elver wrote: > > > Add "new_exec" tracepoint, which is run right after the point of no > > return but before the current task assumes its new exec identity. > > > > Unlike the tracepoint

[PATCH v2 08/13] mailbox: omap: Merge mailbox child node setup loops

2024-04-10 Thread Andrew Davis
Currently the driver loops through all mailbox child nodes twice, once to read in data from each node, and again to make use of this data. Instead read the data and make use of it in one pass. This removes the need for several temporary data structures and reduces the complexity of this main loop

[PATCH v2 12/13] mailbox: omap: Reverse FIFO busy check logic

2024-04-10 Thread Andrew Davis
It is much more clear to check if the hardware FIFO is full and return EBUSY if true. This allows us to also remove one level of indention from the core of this function. It also makes the similarities between omap_mbox_chan_send_noirq() and omap_mbox_chan_send() more obvious. Signed-off-by:

[PATCH v2 10/13] mailbox: omap: Use mbox_controller channel list directly

2024-04-10 Thread Andrew Davis
The driver stores a list of omap_mbox structs so it can later use it to lookup the mailbox names in of_xlate. This same information is already available in the mbox_controller passed into of_xlate. Simply use that data and remove the extra allocation and storage of the omap_mbox list.

[PATCH v2 13/13] mailbox: omap: Remove kernel FIFO message queuing

2024-04-10 Thread Andrew Davis
The kernel FIFO queue has a couple issues. The biggest issue is that it causes extra latency in a path that can be used in real-time tasks, such as communication with real-time remote processors. The whole FIFO idea itself looks to be a leftover from before the unified mailbox framework. The

[PATCH v2 11/13] mailbox: omap: Remove mbox_chan_to_omap_mbox()

2024-04-10 Thread Andrew Davis
This function only checks if mbox_chan *chan is not NULL, but that cannot be the case and if it was returning NULL which is not later checked doesn't save us from this. The second check for chan->con_priv is completely redundant as if it was NULL we would return NULL just the same. Simply

[PATCH v2 07/13] mailbox: omap: Use devm_pm_runtime_enable() helper

2024-04-10 Thread Andrew Davis
Use device life-cycle managed runtime enable function to simplify probe and exit paths. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c

[PATCH v2 03/13] mailbox: omap: Move omap_mbox_irq_t into driver

2024-04-10 Thread Andrew Davis
This is only used internal to the driver, move it out of the public header and into the driver file. While we are here, this is not used as a bitwise, so drop that and make it a simple enum type. Signed-off-by: Andrew Davis --- drivers/mailbox/omap-mailbox.c | 5 +

[PATCH v2 05/13] mailbox: omap: Remove unneeded header omap-mailbox.h

2024-04-10 Thread Andrew Davis
The type of message sent using omap-mailbox is always u32. The definition of mbox_msg_t is uintptr_t which is wrong as that type changes based on the architecture (32bit vs 64bit). This type should have been defined as u32. Instead of making that change here, simply remove the header usage and fix

Re: [PATCH v3] kprobes: Fix possible use-after-free issue on kprobe registration

2024-04-10 Thread Google
On Wed, 10 Apr 2024 09:58:02 +0800 Zheng Yejian wrote: > When unloading a module, its state is changing MODULE_STATE_LIVE -> > MODULE_STATE_GOING -> MODULE_STATE_UNFORMED. Each change will take > a time. `is_module_text_address()` and `__module_text_address()` > works with MODULE_STATE_LIVE and

Re: [PATCH net-next v3 2/6] rstreason: prepare for passive reset

2024-04-10 Thread Jason Xing
Hi Antoine, On Wed, Apr 10, 2024 at 8:14 PM Antoine Tenart wrote: > > Quoting Jason Xing (2024-04-09 12:09:30) > > void(*send_reset)(const struct sock *sk, > > - struct sk_buff *skb); > > + struct sk_buff

Re: [PATCH net-next v3 2/6] rstreason: prepare for passive reset

2024-04-10 Thread Antoine Tenart
Quoting Jason Xing (2024-04-10 14:54:51) > Hi Antoine, > > On Wed, Apr 10, 2024 at 8:14 PM Antoine Tenart wrote: > > > > Quoting Jason Xing (2024-04-09 12:09:30) > > > void(*send_reset)(const struct sock *sk, > > > - struct sk_buff *skb); >

Re: [PATCH net-next v3 2/6] rstreason: prepare for passive reset

2024-04-10 Thread Jason Xing
On Wed, Apr 10, 2024 at 9:21 PM Antoine Tenart wrote: > > Quoting Jason Xing (2024-04-10 14:54:51) > > Hi Antoine, > > > > On Wed, Apr 10, 2024 at 8:14 PM Antoine Tenart wrote: > > > > > > Quoting Jason Xing (2024-04-09 12:09:30) > > > > void(*send_reset)(const struct sock

Re: [PATCH v1 0/5] livepatch: klp-convert tool - Minimal version

2024-04-10 Thread Marcos Paulo de Souza
On Mon, 6 Nov 2023 17:25:08 +0100 Lukas Hruska wrote: > Summary > --- > > This is a significantly simplified version of the original klp-convert tool. > The klp-convert code has never got a proper review and also clean ups > were not easy. The last version was v7, see >

Re: Copying TLS/user register data per perf-sample?

2024-04-10 Thread Beau Belgrave
On Wed, Apr 10, 2024 at 10:06:28PM +0900, Masami Hiramatsu wrote: > On Thu, 4 Apr 2024 12:26:41 -0700 > Beau Belgrave wrote: > > > Hello, > > > > I'm looking into the possibility of capturing user data that is pointed > > to by a user register (IE: fs/gs for TLS on x86/64) for each sample via >

Re: Copying TLS/user register data per perf-sample?

2024-04-10 Thread Beau Belgrave
On Tue, Apr 09, 2024 at 04:32:46PM -0700, Namhyung Kim wrote: > Hello, > > On Thu, Apr 4, 2024 at 12:26 PM Beau Belgrave > wrote: > > > > Hello, > > > > I'm looking into the possibility of capturing user data that is pointed > > to by a user register (IE: fs/gs for TLS on x86/64) for each

Re: [PATCH] SUNRPC: Fix rpcgss_context trace event acceptor field

2024-04-10 Thread Steven Rostedt
On Wed, 10 Apr 2024 13:07:20 -0400 Chuck Lever wrote: > Well I guess I could test it for you. I'll take it for nfsd v6.9-rc. Thanks! -- Steve

[PATCH v11 03/14] cgroup/misc: Export APIs for SGX driver

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi The SGX EPC cgroup will reclaim EPC pages when usage in a cgroup reaches its or ancestor's limit. This requires a walk from the current cgroup up to the root similar to misc_cg_try_charge(). Export misc_cg_parent() to enable this walk. The SGX driver also needs

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

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi The misc cgroup controller (subsystem) currently does not perform resource type specific action for Cgroups Subsystem State (CSS) events: the 'css_alloc' event when a cgroup is created and the 'css_free' event when a cgroup is destroyed. Define callbacks for those

[PATCH v11 00/14] Add Cgroup support for SGX EPC memory

2024-04-10 Thread Haitao Huang
SGX Enclave Page Cache (EPC) memory allocations are separate from normal RAM allocations, and are managed solely by the SGX subsystem. The existing cgroup memory controller cannot be used to limit or account for SGX EPC memory, which is a desirable feature in some environments, e.g., support for

[PATCH v11 01/14] x86/sgx: Replace boolean parameters with enums

2024-04-10 Thread Haitao Huang
Replace boolean parameters for 'reclaim' in the function sgx_alloc_epc_page() and its callers with an enum. Also opportunistically remove non-static declaration of __sgx_alloc_epc_page() and a typo Signed-off-by: Haitao Huang Suggested-by: Jarkko Sakkinen Suggested-by: Dave Hansen ---

[PATCH v11 04/14] cgroup/misc: Add SGX EPC resource type

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi Add SGX EPC memory, MISC_CG_RES_SGX_EPC, to be a valid resource type for the misc controller. Signed-off-by: Kristen Carlson Accardi Co-developed-by: Haitao Huang Signed-off-by: Haitao Huang Reviewed-by: Jarkko Sakkinen --- V6: - Split the original patch into

[PATCH] SUNRPC: Fix rpcgss_context trace event acceptor field

2024-04-10 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The rpcgss_context trace event acceptor field is a dynamically sized string that records the "data" parameter. But this parameter is also dependent on the "len" field to determine the size of the data. It needs to use __string_len() helper macro where the length

[PATCH] rpmsg: qcom_glink_ssr: fix module autoloading

2024-04-10 Thread Krzysztof Kozlowski
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Krzysztof Kozlowski --- drivers/rpmsg/qcom_glink_ssr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/rpmsg/qcom_glink_ssr.c

Re: [PATCH] SUNRPC: Fix rpcgss_context trace event acceptor field

2024-04-10 Thread Steven Rostedt
On Wed, 10 Apr 2024 12:38:53 -0400 Chuck Lever wrote: > On Wed, Apr 10, 2024 at 12:38:13PM -0400, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > > > The rpcgss_context trace event acceptor field is a dynamically sized > > string that records the "data" parameter. But this

Re: [External] Re: [PATCH v11 2/2] memory tier: create CPUless memory tiers after obtaining HMAT info

2024-04-10 Thread Jonathan Cameron
On Tue, 9 Apr 2024 12:02:31 -0700 "Ho-Ren (Jack) Chuang" wrote: > Hi Jonathan, > > On Tue, Apr 9, 2024 at 9:12 AM Jonathan Cameron > wrote: > > > > On Fri, 5 Apr 2024 15:43:47 -0700 > > "Ho-Ren (Jack) Chuang" wrote: > > > > > On Fri, Apr 5, 2024 at 7:03 AM Jonathan Cameron > > > wrote: >

Re: [PATCH v20 1/5] ring-buffer: allocate sub-buffers with __GFP_COMP

2024-04-10 Thread Steven Rostedt
Hi Vincent, Thanks for sending this. Nit: Subject should start with a capital: ring-buffer: Allocate sub-buffers with __GFP_COMP -- Steve On Sat, 6 Apr 2024 18:36:45 +0100 Vincent Donnefort wrote: > In preparation for the ring-buffer memory mapping, allocate compound > pages for the

Re: [PATCH v20 0/5] Introducing trace buffer mapping by user-space

2024-04-10 Thread Steven Rostedt
Hi Andrew, et.al. Linus said it's a hard requirement that this code gets an Acked-by (or Reviewed-by) from the memory sub-maintainers before he will accept it. He was upset that we faulted in pages one at a time instead of mapping it in one go:

Re: [PATCH] rpmsg: qcom_glink_ssr: fix module autoloading

2024-04-10 Thread Konrad Dybcio
On 4/10/24 18:40, Krzysztof Kozlowski wrote: Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Krzysztof Kozlowski --- Reviewed-by: Konrad Dybcio Konrad

Re: [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-10 Thread Steven Rostedt
On Sat, 6 Apr 2024 18:36:46 +0100 Vincent Donnefort wrote: > +int ring_buffer_map(struct trace_buffer *buffer, int cpu, > + struct vm_area_struct *vma) > +{ > + struct ring_buffer_per_cpu *cpu_buffer; > + unsigned long flags, *subbuf_ids; > + int err = 0; > + > +

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

2024-04-10 Thread Haitao Huang
To run selftests for EPC cgroup: sudo ./run_epc_cg_selftests.sh To watch misc cgroup 'current' changes during testing, run this in a separate terminal: ./watch_misc_for_tests.sh current With different cgroups, the script starts one or multiple concurrent SGX selftests (test_sgx), each to run

[PATCH v11 12/14] x86/sgx: Turn on per-cgroup EPC reclamation

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi Previous patches have implemented all infrastructure needed for per-cgroup EPC page tracking and reclaiming. But all reclaimable EPC pages are still tracked in the global LRU as sgx_lru_list() returns hard coded reference to the global LRU. Change sgx_lru_list() to

[PATCH v11 11/14] x86/sgx: Abstract check for global reclaimable pages

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi For the global reclaimer to determine if any page available for reclamation at the global level, it currently only checks for emptiness of the global LRU. That will be inadequate when pages are tracked in multiple LRUs, one per cgroup. For this purpose, create a new

[PATCH v11 13/14] Docs/x86/sgx: Add description for cgroup support

2024-04-10 Thread Haitao Huang
From: Sean Christopherson Add initial documentation of how to regulate the distribution of SGX Enclave Page Cache (EPC) memory via the Miscellaneous cgroup controller. Signed-off-by: Sean Christopherson Co-developed-by: Kristen Carlson Accardi Signed-off-by: Kristen Carlson Accardi

Re: [PATCH] SUNRPC: Fix rpcgss_context trace event acceptor field

2024-04-10 Thread Chuck Lever
On Wed, Apr 10, 2024 at 12:38:13PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The rpcgss_context trace event acceptor field is a dynamically sized > string that records the "data" parameter. But this parameter is also > dependent on the "len" field to determine the size

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

2024-04-10 Thread Mathieu Poirier
On Mon, Apr 08, 2024 at 01:53:14PM -0700, Tanmay Shah wrote: > 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 v14: > - Add Versal

[PATCH v11 10/14] x86/sgx: Charge mem_cgroup for per-cgroup reclamation

2024-04-10 Thread Haitao Huang
Enclave Page Cache(EPC) memory can be swapped out to regular system memory, and the consumed memory should be charged to a proper mem_cgroup. Currently the selection of mem_cgroup to charge is done in sgx_encl_get_mem_cgroup(). But it considers all contexts other than the ksgxd thread are user

[PATCH v11 08/14] x86/sgx: Add basic EPC reclamation flow for cgroup

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi Currently in the EPC page allocation, the kernel simply fails the allocation when the current EPC cgroup fails to charge due to its usage reaching limit. This is not ideal. When that happens, a better way is to reclaim EPC page(s) from the current EPC cgroup

[PATCH v11 05/14] x86/sgx: Implement basic EPC misc cgroup functionality

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi SGX Enclave Page Cache (EPC) memory allocations are separate from normal RAM allocations, and are managed solely by the SGX subsystem. The existing cgroup memory controller cannot be used to limit or account for SGX EPC memory, which is a desirable feature in some

[PATCH v11 06/14] x86/sgx: Add sgx_epc_lru_list to encapsulate LRU list

2024-04-10 Thread Haitao Huang
From: Sean Christopherson Introduce a data structure to wrap the existing reclaimable list and its spinlock. Each cgroup later will have one instance of this structure to track EPC pages allocated for processes associated with the same cgroup. Just like the global SGX reclaimer (ksgxd), an EPC

[PATCH v11 09/14] x86/sgx: Implement async reclamation for cgroup

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi In cases EPC pages need be allocated during a page fault and the cgroup usage is near its limit, an asynchronous reclamation needs be triggered to avoid blocking the page fault handling. Create a workqueue, corresponding work item and function definitions for EPC

[PATCH v11 07/14] x86/sgx: Abstract tracking reclaimable pages in LRU

2024-04-10 Thread Haitao Huang
From: Kristen Carlson Accardi The functions, sgx_{mark,unmark}_page_reclaimable(), manage the tracking of reclaimable EPC pages: sgx_mark_page_reclaimable() adds a newly allocated page into the global LRU list while sgx_unmark_page_reclaimable() does the opposite. Abstract the hard coded global

Re: [PATCH] SUNRPC: Fix rpcgss_context trace event acceptor field

2024-04-10 Thread Chuck Lever
On Wed, Apr 10, 2024 at 01:07:41PM -0400, Steven Rostedt wrote: > On Wed, 10 Apr 2024 12:38:53 -0400 > Chuck Lever wrote: > > > On Wed, Apr 10, 2024 at 12:38:13PM -0400, Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > > > The rpcgss_context trace event acceptor field is a

Re: Re: [PATCH v10 12/14] x86/sgx: Turn on per-cgroup EPC reclamation

2024-04-10 Thread Haitao Huang
On Tue, 09 Apr 2024 10:34:06 -0500, Haitao Huang wrote: On Tue, 09 Apr 2024 04:03:22 -0500, Michal Koutný wrote: On Mon, Apr 08, 2024 at 11:23:21PM -0500, Haitao Huang wrote: It's always non-NULL based on testing. It's hard for me to say definitely by reading the code. But IIUC

Re: [PATCH] uprobes: reduce contention on uprobes_tree access

2024-04-10 Thread Google
On Wed, 10 Apr 2024 11:38:11 +0100 Jonthan Haslam wrote: > Hi Masami, > > > > > Which is why I was asking to land this patch as is, as it relieves the > > > > scalability pains in production and is easy to backport to old > > > > kernels. And then we can work on batched APIs and switch to

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

2024-04-10 Thread Tanmay Shah
On 4/10/24 11:59 AM, Mathieu Poirier wrote: > On Mon, Apr 08, 2024 at 01:53:14PM -0700, Tanmay Shah wrote: >> 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:

[PATCH v2 09/11] tracing/ring-buffer: Add last_boot_info file to boot instance

2024-04-10 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

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

2024-04-10 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()

[PATCH v2 03/11] ring-buffer: Add ring_buffer_meta data

2024-04-10 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

[PATCH v2 05/11] ring-buffer: Add output of ring buffer meta page

2024-04-10 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 v2 04/11] tracing: Implement creating an instance based on a given memory region

2024-04-10 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

[PATCH v2 02/11] ring-buffer: Add ring_buffer_alloc_range()

2024-04-10 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 evening for the per CPU ring buffers. If there's not

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

2024-04-10 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

[PATCH v2 00/11] tracing: Persistent traces across a reboot or crash

2024-04-10 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

[PATCH v2 07/11] ring-buffer: Validate boot range memory events

2024-04-10 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

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

2024-04-10 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

[PATCH v2 08/11] ring-buffer: Save text and data locations in mapped meta data

2024-04-10 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

Re: [PATCH 0/4] KVM, mm: remove the .change_pte() MMU notifier and set_pte_at_notify()

2024-04-10 Thread Andrew Morton
On Fri, 5 Apr 2024 07:58:11 -0400 Paolo Bonzini wrote: > Please review! Also feel free to take the KVM patches through the mm > tree, as I don't expect any conflicts. It's mainly a KVM thing and the MM changes are small and simple. I'd say that the KVM tree would be a better home?

[PATCH] openrisc: Add support for more module relocations

2024-04-10 Thread Stafford Horne
When testing modules in OpenRISC I found R_OR32_AHI16 (signed adjusted high 16-bit) and R_OR32_SLO16 (split low 16-bit) relocations are used in modules but not implemented yet. This patch adds the relocations. Note, we use the old naming R_OR32_* instead or the new naming R_OR1K_* to avoid change

[PATCH v2 11/11] tracing: Update function tracing output for previous boot buffer

2024-04-10 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.

Re: [PATCH] ftrace: Fix use-after-free issue in ftrace_location()

2024-04-10 Thread Zheng Yejian
On 2024/4/10 23:28, Steven Rostedt wrote: On Mon, 1 Apr 2024 20:55:43 +0800 Zheng Yejian wrote: KASAN reports a bug: BUG: KASAN: use-after-free in ftrace_location+0x90/0x120 Read of size 8 at addr 888141d40010 by task insmod/424 CPU: 8 PID: 424 Comm: insmod Tainted: GW

Re: [PATCH] tracing: Limit trace_seq size to just 8K and not depend on architecture PAGE_SIZE

2024-04-10 Thread Google
On Mon, 4 Mar 2024 19:13:42 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The trace_seq buffer is used to print out entire events. It's typically > set to PAGE_SIZE * 2 as there's some events that can be quite large. > > As a side effect, writes to trace_marker is limited

Re: [PATCH v3 1/7] mm: Add a bitmap into mmu_notifier_{clear,test}_young

2024-04-10 Thread James Houghton
On Tue, Apr 9, 2024 at 12:35 PM David Hildenbrand wrote: > > On 09.04.24 20:31, James Houghton wrote: > > Ah, I didn't see this in my inbox, sorry David! > > No worries :) > > > > > On Thu, Apr 4, 2024 at 11:52 AM David Hildenbrand wrote: > >> > >> On 02.04.24 01:29, James Houghton wrote: > >>>

[PATCH 1/2] dt-bindings: remoteproc: mediatek: Support MT8188 dual-core SCP

2024-04-10 Thread olivia . wen
Under different applications, the MT8188 SCP can be used as single-core or dual-core. Signed-off-by: olivia.wen --- Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 2/2] remoteproc: mediatek: Support MT8188 SCP core 1

2024-04-10 Thread olivia . wen
To Support MT8188 SCP core 1 for ISP driver. The SCP on different chips will require different code sizes and IPI buffer sizes based on varying requirements. Signed-off-by: olivia.wen --- drivers/remoteproc/mtk_common.h| 5 +-- drivers/remoteproc/mtk_scp.c | 62

[PATCH 0/2] Support MT8188 SCP core 1

2024-04-10 Thread olivia . wen
Add below patches to support MT8188 SCP core 1 [PATCH 1/2] dt-bindings: remoteproc: mediatek: Support MT8188 dual-core SCP [PATCH 2/2] remoteproc: mediatek: Support MT8188 SCP core 1 olivia.wen (2): dt-bindings: remoteproc: mediatek: Support MT8188 dual-core SCP remoteproc:

Re: Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-10 Thread Jason Xing
On Thu, Apr 11, 2024 at 10:34 AM Peilin He wrote: > > >[...] > >> >I think my understanding based on what Eric depicted differs from you: > >> >we're supposed to filter out those many invalid cases and only trace > >> >the valid action of sending a icmp, so where to add a new tracepoint > >> >is

Re: Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-10 Thread Peilin He
>[...] >> >I think my understanding based on what Eric depicted differs from you: >> >we're supposed to filter out those many invalid cases and only trace >> >the valid action of sending a icmp, so where to add a new tracepoint >> >is important instead of adding more checks in the tracepoint

Re: Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-10 Thread Peilin He
>> >[...] >> >> >I think my understanding based on what Eric depicted differs from you: >> >> >we're supposed to filter out those many invalid cases and only trace >> >> >the valid action of sending a icmp, so where to add a new tracepoint >> >> >is important instead of adding more checks in the