From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: "Elly I. Esparza" <ellyesparza8@gmail.com>
Cc: 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 10:29:15 +0900 [thread overview]
Message-ID: <20260219102915.2a79f0713032d95814eee79f@kernel.org> (raw)
In-Reply-To: <20260218144819.24326-1-ellyesparza8@gmail.com>
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.
Thanks,
>
> Signed-off-by: Elly I. Esparza <ellyesparza8@gmail.com>
> ---
> kernel/kallsyms.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
> index 1e7635864124..13a7c0fdb5da 100644
> --- a/kernel/kallsyms.c
> +++ b/kernel/kallsyms.c
> @@ -234,6 +234,7 @@ unsigned long kallsyms_lookup_name(const char *name)
>
> return module_kallsyms_lookup_name(name);
> }
> +NOKPROBE_SYMBOL(kallsyms_lookup_name)
>
> /*
> * Iterate over all symbols in vmlinux. For symbols from modules use
> --
> 2.43.0
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2026-02-19 1:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 14:48 Elly I. Esparza
2026-02-19 1:29 ` Masami Hiramatsu [this message]
2026-02-19 7:20 ` Christoph Hellwig
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=20260219102915.2a79f0713032d95814eee79f@kernel.org \
--to=mhiramat@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ast@kernel.org \
--cc=ellyesparza8@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®