mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Aleksander Mazur" <deweloper@wp.pl>,
	"Sergey Senozhatsky" <senozhatsky@chromium.org>
Cc: linux-kernel@vger.kernel.org, "Jiri Olsa" <jolsa@kernel.org>
Subject: Re: [PATCH] /proc/modules: honor kptr_restrict even without CONFIG_KALLSYMS
Date: Sat, 27 May 2023 11:44:35 +0200	[thread overview]
Message-ID: <b1435818-2cba-4270-9933-282029f5449c@app.fastmail.com> (raw)
In-Reply-To: <20230527005539.5b06df24@mocarz>

On Sat, May 27, 2023, at 00:55, Aleksander Mazur wrote:
> Have you had a chance to review my patch?

I don't seem to have the original submission from you.

> Dnia 2022-06-05, o godz. 22:43:47
> Aleksander Mazur <deweloper@wp.pl> napisał(a):
>
>> Commit e4a8ca3baa55 fixed building without CONFIG_KALLSYMS by providing
>> dummy kallsyms_show_value(). Unfortunately -- due to hard-coded "false"
>> being returned -- access to addresses in /proc/modules became permanently
>> disabled.
>> 
>> My proposal is to change this unconditional "false" to !kptr_restrict.
>> This re-enables addresses in /proc/modules even without CONFIG_KALLSYSMS
>> unless restricted by means of sysctl (kernel.kptr_restrict).

I just looked at the original 516fb7f2e73dc ("/proc/module: use the
same logic as /proc/kallsyms for address exposure") commit again,
the intention here was to use the same logic for /proc/modules
and /proc/kallsyms.

I agree that this means my patch went too far, but I'm not sure
about yours either. Maybe we can just move kallsyms_show_value()
into a different location that is always built and rename it
accordingly. Then it can be used by both kallsyms and /proc/modules
regardless of which combination of these two is enabled in the
kernel.

     Arnd

  reply	other threads:[~2023-05-27  9:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05 20:43 Aleksander Mazur
2023-05-26 22:55 ` Aleksander Mazur
2023-05-27  9:44   ` Arnd Bergmann [this message]
2023-08-21 15:13     ` Aleksander Mazur

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=b1435818-2cba-4270-9933-282029f5449c@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=deweloper@wp.pl \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=senozhatsky@chromium.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®