mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	"Naveen N . Rao" <naveen.n.rao@linux.ibm.com>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
	"David S . Miller" <davem@davemloft.net>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kprobes: Fix build errors with CONFIG_KRETPROBES=n
Date: Thu, 5 May 2022 09:31:40 +0900	[thread overview]
Message-ID: <20220505093140.9a0500813b8d529442c76933@kernel.org> (raw)
In-Reply-To: <CAMo8BfJF_HTZc-PUrK4y5yLEdwWPmpKu2NyzJusjGd1Ste0b3g@mail.gmail.com>

On Wed, 4 May 2022 10:53:42 -0700
Max Filippov <jcmvbkbc@gmail.com> wrote:

> On Tue, May 3, 2022 at 8:36 PM Masami Hiramatsu <mhiramat@kernel.org> wrote:
> >
> > Max Filippov reported:
> >
> > When building kernel with CONFIG_KRETPROBES=n kernel/kprobes.c
> > compilation fails with the following messages:
> >
> >   kernel/kprobes.c: In function ‘recycle_rp_inst’:
> >   kernel/kprobes.c:1273:32: error: implicit declaration of function
> >                                    ‘get_kretprobe’
> >
> >   kernel/kprobes.c: In function ‘kprobe_flush_task’:
> >   kernel/kprobes.c:1299:35: error: ‘struct task_struct’ has no member
> >                                    named ‘kretprobe_instances’
> >
> > This came from the commit d741bf41d7c7 ("kprobes: Remove
> > kretprobe hash") which introduced get_kretprobe() and
> > kretprobe_instances member in task_struct when CONFIG_KRETPROBES=y,
> > but did not make recycle_rp_inst() and kprobe_flush_task()
> > depending on CONFIG_KRETPORBES.
> >
> > Since those functions are only used for kretprobe, move those
> > functions into #ifdef CONFIG_KRETPROBE area.
> >
> > Reported-by: Max Filippov <jcmvbkbc@gmail.com>
> > Fixes: d741bf41d7c7 ("kprobes: Remove kretprobe hash")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> > ---
> >  include/linux/kprobes.h |    2 -
> >  kernel/kprobes.c        |  144 +++++++++++++++++++++++------------------------
> >  2 files changed, 72 insertions(+), 74 deletions(-)
> 
> Tested-by: Max Filippov <jcmvbkbc@gmail.com>

Thank you!

Steve, can you pick this fix?

Thanks,

-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2022-05-05  0:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 18:40 [PATCH] kprobes: fix build " Max Filippov
2022-05-04  2:21 ` Masami Hiramatsu
2022-05-04  3:36 ` [PATCH] kprobes: Fix build errors " Masami Hiramatsu
2022-05-04  4:28   ` Masami Hiramatsu
2022-05-04 17:53   ` Max Filippov
2022-05-05  0:31     ` Masami Hiramatsu [this message]
2022-05-07 13:57       ` Steven Rostedt
2022-05-24 20:30         ` Steven Rostedt

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=20220505093140.9a0500813b8d529442c76933@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=davem@davemloft.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®