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

2024-06-27 Thread Oleg Nesterov
On 06/27, Masami Hiramatsu wrote: > > On Thu, 27 Jun 2024 15:44:16 +0200 > Jiri Olsa wrote: > > > Oleg, do you want to send formal patch? > > > > thanks, > > jirka > > Yes, can you send v2 patch? I was waiting for the comments from loongarch maintainers... OK, will do today, but the patch won't

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

2024-06-27 Thread Google
On Thu, 27 Jun 2024 15:44:16 +0200 Jiri Olsa wrote: > On Fri, Jun 21, 2024 at 03:17:58PM +0200, Jiri Olsa wrote: > > On Fri, Jun 21, 2024 at 02:01:50PM +0200, Oleg Nesterov wrote: > > > On 06/20, Andrii Nakryiko wrote: > > > > > > > > On Thu, Jun 20, 2024 at 12:40 PM Oleg Nesterov wrote: > > > >

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

2024-06-27 Thread Jiri Olsa
On Fri, Jun 21, 2024 at 03:17:58PM +0200, Jiri Olsa wrote: > On Fri, Jun 21, 2024 at 02:01:50PM +0200, Oleg Nesterov wrote: > > On 06/20, Andrii Nakryiko wrote: > > > > > > On Thu, Jun 20, 2024 at 12:40 PM Oleg Nesterov wrote: > > > > > > > > But I can't understand what does it do, it calls emit_b

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

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

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

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

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

2024-06-20 Thread Andrii Nakryiko
On Thu, Jun 20, 2024 at 12:40 PM Oleg Nesterov wrote: > > On 06/20, Andrii Nakryiko wrote: > > > > Can we instead ask loongarch folks to rewrite it to be a constant? > > Having this as a function call is both an inconvenience and potential > > performance problem (a minor one, but still). I would

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

2024-06-20 Thread Oleg Nesterov
On 06/20, Andrii Nakryiko wrote: > > Can we instead ask loongarch folks to rewrite it to be a constant? > Having this as a function call is both an inconvenience and potential > performance problem (a minor one, but still). I would imagine it's not > hard to hard-code an instruction as a constant h

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

2024-06-20 Thread Andrii Nakryiko
On Tue, Jun 18, 2024 at 12:43 PM Jiri Olsa wrote: > > Nathan reported compilation fail for loongarch arch: > > kernel/events/uprobes.c: In function 'arch_uprobe_trampoline': > arch/loongarch/include/asm/uprobes.h:12:33: error: initializer element is > not constant > 12 | #define UPROBE_S

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

2024-06-18 Thread Jiri Olsa
Nathan reported compilation fail for loongarch arch: kernel/events/uprobes.c: In function 'arch_uprobe_trampoline': arch/loongarch/include/asm/uprobes.h:12:33: error: initializer element is not constant 12 | #define UPROBE_SWBP_INSNlarch_insn_gen_break(BRK_UPROBE_BP) |