All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Masami Hiramatsu" <mhiramat@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>
Cc: <linux-kernel@vger.kernel.org>, <agordeev@linux.ibm.com>,
	<anil.s.keshavamurthy@intel.com>, <aou@eecs.berkeley.edu>,
	<bp@alien8.de>, <catalin.marinas@arm.com>,
	<dave.hansen@linux.intel.com>, <davem@davemloft.net>,
	<gor@linux.ibm.com>, <hca@linux.ibm.com>,
	<jcalvinowens@gmail.com>, <linux-arm-kernel@lists.infradead.org>,
	<mingo@redhat.com>, <mpe@ellerman.id.au>,
	<naveen.n.rao@linux.ibm.com>, <palmer@dabbelt.com>,
	<paul.walmsley@sifive.com>, <tglx@linutronix.de>,
	<will@kernel.org>
Subject: Re: [PATCH 4/4] kprobes: Remove core dependency on modules
Date: Wed, 27 Mar 2024 19:46:50 +0200	[thread overview]
Message-ID: <D04PYD185FIK.WABP6RZDCC06@kernel.org> (raw)
In-Reply-To: <20240327090155.873f1ed32700dbdb75f8eada@kernel.org>

On Wed Mar 27, 2024 at 2:01 AM EET, Masami Hiramatsu (Google) wrote:
> On Tue, 26 Mar 2024 17:38:18 +0000
> Mark Rutland <mark.rutland@arm.com> wrote:
>
> > On Tue, Mar 26, 2024 at 07:13:51PM +0200, Jarkko Sakkinen wrote:
> > > On Tue Mar 26, 2024 at 6:36 PM EET, Mark Rutland wrote:
> > 
> > > > +#ifdef CONFIG_MODULES
> > > >  	/* Check if 'p' is probing a module. */
> > > >  	*probed_mod = __module_text_address((unsigned long) p->addr);
> > > >  	if (*probed_mod) {
> > > > @@ -1605,6 +1606,8 @@ static int check_kprobe_address_safe(struct kprobe *p,
> > > >  			ret = -ENOENT;
> > > >  		}
> > > >  	}
> > > > +#endif
> > > 
> > > This can be scoped a bit more (see v7 of my patch set).
> > 
> > > > +#ifdef CONFIG_MODULES
> > > >  static nokprobe_inline bool trace_kprobe_module_exist(struct trace_kprobe *tk)
> > > >  {
> > > >  	char *p;
> > > > @@ -129,6 +130,9 @@ static nokprobe_inline bool trace_kprobe_module_exist(struct trace_kprobe *tk)
> > > >  
> > > >  	return ret;
> > > >  }
> > > > +#else
> > > > +#define trace_kprobe_module_exist(tk) false /* aka a module never exists */
> > > > +#endif /* CONFIG_MODULES */
> > > >  
> > > >  static bool trace_kprobe_is_busy(struct dyn_event *ev)
> > > >  {
> > > > @@ -670,6 +674,7 @@ static int register_trace_kprobe(struct trace_kprobe *tk)
> > > >  	return ret;
> > > >  }
> > > >  
> > > > +#ifdef CONFIG_MODULES
> > > >  /* Module notifier call back, checking event on the module */
> > > >  static int trace_kprobe_module_callback(struct notifier_block *nb,
> > > >  				       unsigned long val, void *data)
> > > > @@ -699,6 +704,9 @@ static int trace_kprobe_module_callback(struct notifier_block *nb,
> > > >  
> > > >  	return NOTIFY_DONE;
> > > >  }
> > > > +#else
> > > > +#define trace_kprobe_module_callback (NULL)
> > > > +#endif /* CONFIG_MODULES */
> > > 
> > > The last two CONFIG_MODULES sections could be combined. This was also in
> > > v7.
> > 
> > > Other than lgtm.
> > 
> > Great! I've folded your v7 changes in, and pushed that out to:
> > 
> >   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=kprobes/without-modules
> > 
> > I'll hold off sending that out to the list until other folk have had a chance
> > to comment.
>
> Yeah, the updated one looks good to me too.
>
> Thanks!

As for RISC-V:

Tested-by: Jarkko Sakkinen <jarkko@kernel.org> # arch/riscv

I'm fine with adding to all patches because it would be hard
to place tested-by to any specific patch (e.g. if this was a
syscall I would give tested-by just for that patch).

Just adding disclaimer because depending on subsystem people
are more or less strict with this tag :-)

BR, Jarkko

WARNING: multiple messages have this Message-ID (diff)
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Masami Hiramatsu" <mhiramat@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>
Cc: <linux-kernel@vger.kernel.org>, <agordeev@linux.ibm.com>,
	<anil.s.keshavamurthy@intel.com>, <aou@eecs.berkeley.edu>,
	<bp@alien8.de>, <catalin.marinas@arm.com>,
	<dave.hansen@linux.intel.com>, <davem@davemloft.net>,
	<gor@linux.ibm.com>, <hca@linux.ibm.com>,
	<jcalvinowens@gmail.com>, <linux-arm-kernel@lists.infradead.org>,
	<mingo@redhat.com>, <mpe@ellerman.id.au>,
	<naveen.n.rao@linux.ibm.com>, <palmer@dabbelt.com>,
	<paul.walmsley@sifive.com>, <tglx@linutronix.de>,
	<will@kernel.org>
Subject: Re: [PATCH 4/4] kprobes: Remove core dependency on modules
Date: Wed, 27 Mar 2024 19:46:50 +0200	[thread overview]
Message-ID: <D04PYD185FIK.WABP6RZDCC06@kernel.org> (raw)
In-Reply-To: <20240327090155.873f1ed32700dbdb75f8eada@kernel.org>

On Wed Mar 27, 2024 at 2:01 AM EET, Masami Hiramatsu (Google) wrote:
> On Tue, 26 Mar 2024 17:38:18 +0000
> Mark Rutland <mark.rutland@arm.com> wrote:
>
> > On Tue, Mar 26, 2024 at 07:13:51PM +0200, Jarkko Sakkinen wrote:
> > > On Tue Mar 26, 2024 at 6:36 PM EET, Mark Rutland wrote:
> > 
> > > > +#ifdef CONFIG_MODULES
> > > >  	/* Check if 'p' is probing a module. */
> > > >  	*probed_mod = __module_text_address((unsigned long) p->addr);
> > > >  	if (*probed_mod) {
> > > > @@ -1605,6 +1606,8 @@ static int check_kprobe_address_safe(struct kprobe *p,
> > > >  			ret = -ENOENT;
> > > >  		}
> > > >  	}
> > > > +#endif
> > > 
> > > This can be scoped a bit more (see v7 of my patch set).
> > 
> > > > +#ifdef CONFIG_MODULES
> > > >  static nokprobe_inline bool trace_kprobe_module_exist(struct trace_kprobe *tk)
> > > >  {
> > > >  	char *p;
> > > > @@ -129,6 +130,9 @@ static nokprobe_inline bool trace_kprobe_module_exist(struct trace_kprobe *tk)
> > > >  
> > > >  	return ret;
> > > >  }
> > > > +#else
> > > > +#define trace_kprobe_module_exist(tk) false /* aka a module never exists */
> > > > +#endif /* CONFIG_MODULES */
> > > >  
> > > >  static bool trace_kprobe_is_busy(struct dyn_event *ev)
> > > >  {
> > > > @@ -670,6 +674,7 @@ static int register_trace_kprobe(struct trace_kprobe *tk)
> > > >  	return ret;
> > > >  }
> > > >  
> > > > +#ifdef CONFIG_MODULES
> > > >  /* Module notifier call back, checking event on the module */
> > > >  static int trace_kprobe_module_callback(struct notifier_block *nb,
> > > >  				       unsigned long val, void *data)
> > > > @@ -699,6 +704,9 @@ static int trace_kprobe_module_callback(struct notifier_block *nb,
> > > >  
> > > >  	return NOTIFY_DONE;
> > > >  }
> > > > +#else
> > > > +#define trace_kprobe_module_callback (NULL)
> > > > +#endif /* CONFIG_MODULES */
> > > 
> > > The last two CONFIG_MODULES sections could be combined. This was also in
> > > v7.
> > 
> > > Other than lgtm.
> > 
> > Great! I've folded your v7 changes in, and pushed that out to:
> > 
> >   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=kprobes/without-modules
> > 
> > I'll hold off sending that out to the list until other folk have had a chance
> > to comment.
>
> Yeah, the updated one looks good to me too.
>
> Thanks!

As for RISC-V:

Tested-by: Jarkko Sakkinen <jarkko@kernel.org> # arch/riscv

I'm fine with adding to all patches because it would be hard
to place tested-by to any specific patch (e.g. if this was a
syscall I would give tested-by just for that patch).

Just adding disclaimer because depending on subsystem people
are more or less strict with this tag :-)

BR, Jarkko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-03-27 17:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 16:36 [PATCH 0/4] kprobes: permit use without modules Mark Rutland
2024-03-26 16:36 ` Mark Rutland
2024-03-26 16:36 ` [PATCH 1/4] arm64: patching: always use fixmap Mark Rutland
2024-03-26 16:36   ` Mark Rutland
2024-03-26 16:36 ` [PATCH 2/4] kprobes/treewide: Add kprobes_ prefix to insn alloc/free functions Mark Rutland
2024-03-26 16:36   ` Mark Rutland
2024-03-26 17:11   ` Jarkko Sakkinen
2024-03-26 17:11     ` Jarkko Sakkinen
2024-03-26 16:36 ` [PATCH 3/4] kprobes/treewide: Explicitly override " Mark Rutland
2024-03-26 16:36   ` Mark Rutland
2024-04-13  7:22   ` Alexander Gordeev
2024-04-13  7:22     ` Alexander Gordeev
2024-03-26 16:36 ` [PATCH 4/4] kprobes: Remove core dependency on modules Mark Rutland
2024-03-26 16:36   ` Mark Rutland
2024-03-26 17:13   ` Jarkko Sakkinen
2024-03-26 17:13     ` Jarkko Sakkinen
2024-03-26 17:38     ` Mark Rutland
2024-03-26 17:38       ` Mark Rutland
2024-03-27  0:01       ` Masami Hiramatsu
2024-03-27  0:01         ` Masami Hiramatsu
2024-03-27 13:23         ` Jarkko Sakkinen
2024-03-27 13:23           ` Jarkko Sakkinen
2024-03-27 17:46         ` Jarkko Sakkinen [this message]
2024-03-27 17:46           ` Jarkko Sakkinen
2024-03-27 23:47           ` Masami Hiramatsu
2024-03-27 23:47             ` Masami Hiramatsu
2024-03-30 11:32             ` Jarkko Sakkinen
2024-03-30 11:32               ` Jarkko Sakkinen
2024-04-03 11:20   ` Mark Rutland
2024-04-03 11:20     ` Mark Rutland
2024-04-03 16:10     ` Jarkko Sakkinen
2024-04-03 16:10       ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D04PYD185FIK.WABP6RZDCC06@kernel.org \
    --to=jarkko@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=jcalvinowens@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.