public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: "Elly I. Esparza" <ellyesparza8@gmail.com>,
	linux-kernel@vger.kernel.org, will@kernel.org,
	akpm@linux-foundation.org, ast@kernel.org, yangfeng@kylinos.cn,
	gregkh@linuxfoundation.org, hch@lst.de, qperret@google.com
Subject: Re: [PATCH 2/2] kernel/kallsyms: Prevent bypassing of kprobes blacklist
Date: Thu, 19 Feb 2026 08:20:09 +0100	[thread overview]
Message-ID: <20260219072009.GA5597@lst.de> (raw)
In-Reply-To: <20260219102915.2a79f0713032d95814eee79f@kernel.org>

On Thu, Feb 19, 2026 at 10:29:15AM +0900, Masami Hiramatsu wrote:
> On Wed, 18 Feb 2026 11:48:19 -0300
> "Elly I. Esparza" <ellyesparza8@gmail.com> wrote:
> 
> > Kprobes can be used to get the adress of kallsyms_lookup_name() providing
> > access to blacklisted symbols.
> > 
> > Add kallsyms_lookup_name() to kprobes blacklist.
> 
> NACK, this NOKPROBE_SYMBOL() should be used for the functions which
> is called inside the kprobe callback handler. kallsyms_lookup_name()
> is used when setting up the kprobe, not from the callbacks.

I don't think that's the point Elly made.  The point is that
kallsyms_lookup_name + kprobes is used to bypass lacking symbol exports.
So preventing it is a good idea, and this seems like a cute hack for
that.  But it really needs a better commit log, and a big fat comment
explaining the slight abuse of NOKPROBE_SYMBOL in the code.


      reply	other threads:[~2026-02-19  7:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 14:48 [PATCH 2/2] kernel/kallsyms: Prevent bypassing of kprobes blacklist Elly I. Esparza
2026-02-19  1:29 ` Masami Hiramatsu
2026-02-19  7:20   ` Christoph Hellwig [this message]

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=20260219072009.GA5597@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=ellyesparza8@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=qperret@google.com \
    --cc=will@kernel.org \
    --cc=yangfeng@kylinos.cn \
    /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