Re: [PATCH] kprobes: Remove unnecessary initial values of variables

2023-09-18 Thread Google
On Tue, 19 Sep 2023 09:28:23 +0800 Li zeming wrote: > ri and sym is assigned first, so it does not need to initialize the > assignment. > Yes, thanks for fixing! Acked-by: Masami Hiramatsu (Google) > Signed-off-by: Li zeming > --- > kernel/kprobes.c | 4 ++-- > 1 file changed, 2

Re: [PATCH v17 00/14] Add support for MT8195 SCP 2nd core

2023-09-18 Thread Chen-Yu Tsai
On Tue, Sep 19, 2023 at 9:17 AM Mathieu Poirier wrote: > > On Mon, Sep 18, 2023 at 06:44:25PM +0800, Chen-Yu Tsai wrote: > > On Mon, Sep 18, 2023 at 6:32 PM Laura Nao wrote: > > > > > > > Other than patch 2 and 14, I have applied this set. The remaining > > > > patches will > > > > have to be

[PATCH] remoteproc: mediatek: Detect single/multi core SCP with rpmsg-name property

2023-09-18 Thread Chen-Yu Tsai
old device trees working again. Reported-by: Laura Nao Fixes: 1fdbf0cdde98 ("remoteproc: mediatek: Probe SCP cluster on multi-core SCP") Signed-off-by: Chen-Yu Tsai --- The patch is based on next-20230918 with a whole bunch of local patches stacked on top. None of my local patches are r

[PATCH] vmscan: add trace events for lru_gen

2023-09-18 Thread Jaewon Kim
As the legacy lru provides, the lru_gen needs some trace events for debugging. This commit introduces 2 trace events. trace_mm_vmscan_lru_gen_scan trace_mm_vmscan_lru_gen_evict Each event is similar to the following legacy events. trace_mm_vmscan_lru_isolate,

Re: [PATCH v2 2/2] powerpc: Replace GPL 2.0+ README.legal boilerplate with SPDX

2023-09-18 Thread Michael Ellerman
Geert Uytterhoeven writes: > Upstream Linux never had a "README.legal" file, but it was present > in early source releases of Linux/m68k. It contained a simple copyright > notice and a link to a version of the "COPYING" file that predated the > addition of the "only valid GPL version is v2"

[PATCH] kprobes: Remove unnecessary initial values of variables

2023-09-18 Thread Li zeming
ri and sym is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/kprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index ca385b61d546..82b2a366d496 100644 ---

Re: [PATCH v17 00/14] Add support for MT8195 SCP 2nd core

2023-09-18 Thread Mathieu Poirier
On Mon, Sep 18, 2023 at 06:44:25PM +0800, Chen-Yu Tsai wrote: > On Mon, Sep 18, 2023 at 6:32 PM Laura Nao wrote: > > > > > Other than patch 2 and 14, I have applied this set. The remaining > > > patches will > > > have to be resent to Matthias. > > > > > Thanks, > > > Mathieu > > > > Hello, > >

Re: [PATCH v17 00/14] Add support for MT8195 SCP 2nd core

2023-09-18 Thread Mathieu Poirier
On Mon, Sep 18, 2023 at 12:31:41PM +0200, Laura Nao wrote: > > Other than patch 2 and 14, I have applied this set. The remaining patches > > will > > have to be resent to Matthias. > > > Thanks, > > Mathieu > > Hello, > > With patch 2 missing, the SCP is not probed correctly anymore on

Re: [PATCH 1/2 v3] eventfs: Remove eventfs_file and just use eventfs_inode

2023-09-18 Thread Steven Rostedt
On Tue, 19 Sep 2023 00:01:29 +0900 Masami Hiramatsu (Google) wrote: > > Thanks for this great work! Thanks! > I have some questions below. > I tried to understand this, but maybe some of them are pointless. Sure. > > > Signed-off-by: Steven Rostedt (Google) > > --- > >

Re: [PATCH] nd_btt: Make BTT lanes preemptible

2023-09-18 Thread Ira Weiny
Tomas Glozar wrote: > čt 14. 9. 2023 v 22:18 odesílatel Ira Weiny napsal: > > Is the bug in 1 of 2 places? > > > > 1) When btt_write_pg()->lock_map() (when the number of lanes is < number > >of cpus) and the lane is acquired is called? > > > > *or* > > > > 2) When nd_region_acquire_lane()

Re: [PATCH] tracing/timerlat: Hotplug support for the user-space interface

2023-09-18 Thread Daniel Bristot de Oliveira
On 9/16/23 02:21, kernel test robot wrote: > Hi Daniel, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on linus/master] > [also build test WARNING on v6.6-rc1 next-20230915] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And

Re: [PATCH 1/2 v3] eventfs: Remove eventfs_file and just use eventfs_inode

2023-09-18 Thread Google
Hi Steve, On Thu, 14 Sep 2023 12:35:05 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of having a descriptor for every file represented in the eventfs > directory, only have the directory itself represented. Change the API to > send in a list of entries that

Re: [PATCH v2 00/14] Clean up RPM bus clocks remnants

2023-09-18 Thread Will Deacon
On Tue, 12 Sep 2023 15:31:38 +0200, Konrad Dybcio wrote: > After the recent cleanups ([1], [2]) some in-tree abusers that directly > accessed the RPM bus clocks, effectively circumventing and working > against the efforts of the interconnect framework, were found. > > Patches 1-5 drop deprecated

Re: [PATCH v17 00/14] Add support for MT8195 SCP 2nd core

2023-09-18 Thread Chen-Yu Tsai
On Mon, Sep 18, 2023 at 6:32 PM Laura Nao wrote: > > > Other than patch 2 and 14, I have applied this set. The remaining patches > > will > > have to be resent to Matthias. > > > Thanks, > > Mathieu > > Hello, > > With patch 2 missing, the SCP is not probed correctly anymore on asurada >

Re: [PATCH v17 00/14] Add support for MT8195 SCP 2nd core

2023-09-18 Thread Laura Nao
> Other than patch 2 and 14, I have applied this set. The remaining patches > will > have to be resent to Matthias. > Thanks, > Mathieu Hello, With patch 2 missing, the SCP is not probed correctly anymore on asurada (MT8192) and kukui (MT8183). The mtk-scp driver relies on the existence of

[PATCH v2 2/2] powerpc: Replace GPL 2.0+ README.legal boilerplate with SPDX

2023-09-18 Thread Geert Uytterhoeven
Upstream Linux never had a "README.legal" file, but it was present in early source releases of Linux/m68k. It contained a simple copyright notice and a link to a version of the "COPYING" file that predated the addition of the "only valid GPL version is v2" clause. Get rid of the references to

[PATCH v2 0/2] m68k/powerpc: Kill references to non-existent README.legal

2023-09-18 Thread Geert Uytterhoeven
Hi all, Several source files contain license boilerplate that refers to the file "README.legal", which never existed in upstream Linux. This is a relic from the early port of Linux to the m68k processor family, before it was merged in v1.3.94. Later, copies of this boilerplate ended up

[PATCH v2 1/2] m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX

2023-09-18 Thread Geert Uytterhoeven
Upstream Linux never had a "README.legal" file, but it was present in early source releases of Linux/m68k. It contained a simple copyright notice and a link to a version of the "COPYING" file that predated the addition of the "only valid GPL version is v2" clause. Get rid of the references to

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-18 Thread Clément Léger
On 17/09/2023 23:09, David Laight wrote: > From: Clément Léger >> Sent: 14 September 2023 14:11 >> >> enabler->uaddr can be aligned on 32 or 64 bits. If aligned on 32 bits, >> this will result in a misaligned access on 64 bits architectures since >> set_bit()/clear_bit() are expecting an

[PATCH v3 03/13] mm/execmem, arch: convert simple overrides of module_alloc to execmem

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Several architectures override module_alloc() only to define address range for code allocations different than VMALLOC address space. Provide a generic implementation in execmem that uses the parameters for address space ranges, required alignment and page

[PATCH v3 13/13] bpf: remove CONFIG_BPF_JIT dependency on CONFIG_MODULES of

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" BPF just-in-time compiler depended on CONFIG_MODULES because it used module_alloc() to allocate memory for the generated code. Since code allocations are now implemented with execmem, drop dependency of CONFIG_BPF_JIT on CONFIG_MODULES and make it select

[PATCH v3 12/13] kprobes: remove dependency on CONFIG_MODULES

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" kprobes depended on CONFIG_MODULES because it has to allocate memory for code. Since code allocations are now implemented with execmem, kprobes can be enabled in non-modular kernels. Add #ifdef CONFIG_MODULE guards for the code dealing with kprobes inside modules,

[PATCH v3 04/13] mm/execmem, arch: convert remaining overrides of module_alloc to execmem

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Extend execmem parameters to accommodate more complex overrides of module_alloc() by architectures. This includes specification of a fallback range required by arm, arm64 and powerpc and support for allocation of KASAN shadow required by arm64, s390 and x86. The

[PATCH v3 08/13] riscv: extend execmem_params for generated code allocations

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The memory allocations for kprobes and BPF on RISC-V are not placed in the modules area and these custom allocations are implemented with overrides of alloc_insn_page() and bpf_jit_alloc_exec(). Slightly reorder execmem_params initialization to support both 32 and

[PATCH v3 05/13] modules, execmem: drop module_alloc

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Define default parameters for address range for code allocations using the current values in module_alloc() and make execmem_text_alloc() use these defaults when an architecture does not supply its specific parameters. With this, execmem_text_alloc() implements

[PATCH v3 09/13] powerpc: extend execmem_params for kprobes allocations

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" powerpc overrides kprobes::alloc_insn_page() to remove writable permissions when STRICT_MODULE_RWX is on. Add definition of EXECMEM_KRPOBES to execmem_params to allow using the generic kprobes::alloc_insn_page() with the desired permissions. As powerpc uses

[PATCH v3 02/13] mm: introduce execmem_text_alloc() and execmem_free()

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" module_alloc() is used everywhere as a mean to allocate memory for code. Beside being semantically wrong, this unnecessarily ties all subsystems that need to allocate code, such as ftrace, kprobes and BPF to modules and puts the burden of code allocation to the

[PATCH v3 10/13] arch: make execmem setup available regardless of CONFIG_MODULES

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" execmem does not depend on modules, on the contrary modules use execmem. To make execmem available when CONFIG_MODULES=n, for instance for kprobes, split execmem_params initialization out from arch/kernel/module.c and compile it when CONFIG_EXECMEM=y Signed-off-by:

[PATCH v3 11/13] x86/ftrace: enable dynamic ftrace without CONFIG_MODULES

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Dynamic ftrace must allocate memory for code and this was impossible without CONFIG_MODULES. With execmem separated from the modules code, execmem_text_alloc() is available regardless of CONFIG_MODULES. Remove dependency of dynamic ftrace on CONFIG_MODULES and make

[PATCH v3 07/13] arm64, execmem: extend execmem_params for generated code allocations

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The memory allocations for kprobes and BPF on arm64 can be placed anywhere in vmalloc address space and currently this is implemented with overrides of alloc_insn_page() and bpf_jit_alloc_exec() in arm64. Define EXECMEM_KPROBES and EXECMEM_BPF ranges in

[PATCH v3 06/13] mm/execmem: introduce execmem_data_alloc()

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Data related to code allocations, such as module data section, need to comply with architecture constraints for its placement and its allocation right now was done using execmem_text_alloc(). Create a dedicated API for allocating data related to code allocations and

[PATCH v3 00/13] mm: jit/text allocator

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, module_alloc() is used everywhere as a mean to allocate memory for code. Beside being semantically wrong, this unnecessarily ties all subsystmes that need to allocate code, such as ftrace, kprobes and BPF to modules and puts the burden of code allocation to the

[PATCH v3 01/13] nios2: define virtual address space for modules

2023-09-18 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" nios2 uses kmalloc() to implement module_alloc() because CALL26/PCREL26 cannot reach all of vmalloc address space. Define module space as 32MiB below the kernel base and switch nios2 to use vmalloc for module allocations. Suggested-by: Thomas Gleixner Acked-by: