From: Steven Rostedt <rostedt@goodmis.org>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Jonathan Corbet <corbet@lwn.net>, Philipp Rudo <prudo@redhat.com>,
Eric Biederman <ebiederm@xmission.com>,
"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
kexec@lists.infradead.org, Ross Zwisler <zwisler@kernel.org>,
"Joel Fernandes (Google)" <joel@joelfernandes.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v4 3/3] kexec: Introduce sysctl parameters kexec_load_limit_*
Date: Wed, 21 Dec 2022 09:14:35 -0500 [thread overview]
Message-ID: <20221221091435.5ed368cb@gandalf.local.home> (raw)
In-Reply-To: <20221114-disable-kexec-reset-v4-3-ab809c8d988c@chromium.org>
On Wed, 21 Dec 2022 13:50:03 +0100
Ricardo Ribalda <ribalda@chromium.org> wrote:
> @@ -941,6 +995,20 @@ static struct ctl_table kexec_core_sysctls[] = {
> .extra1 = SYSCTL_ONE,
> .extra2 = SYSCTL_ONE,
> },
> + {
> + .procname = "kexec_load_limit_panic",
> + .data = &load_limit_panic,
> + .maxlen = sizeof(load_limit_panic),
If I understand the sysctl logic correctly, the .maxlen is the maxlen of
the input to the sysctl, and not the data. Usually set to sizeof(data)
because most proc_handlers write to data directly.
In this case, I believe it's not even used (you override it with the
struct ctl_table tmp). I guess it doesn't really matter what it's set to.
Perhaps just set it to zero and leave it out?
> + .mode = 0644,
> + .proc_handler = kexec_limit_handler,
> + },
> + {
> + .procname = "kexec_load_limit_reboot",
> + .data = &load_limit_reboot,
> + .maxlen = sizeof(load_limit_reboot),
Same here.
-- Steve
> + .mode = 0644,
> + .proc_handler = kexec_limit_handler,
> + },
> { }
> };
>
prev parent reply other threads:[~2022-12-21 14:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 12:50 [PATCH v4 0/3] kexec: Add new parameter to limit the access to kexec Ricardo Ribalda
2022-12-21 12:50 ` [PATCH v4 1/3] Documentation: sysctl: Correct kexec_load_disabled Ricardo Ribalda
2022-12-21 12:50 ` [PATCH v4 2/3] kexec: Factor out kexec_load_permitted Ricardo Ribalda
2022-12-21 12:50 ` [PATCH v4 3/3] kexec: Introduce sysctl parameters kexec_load_limit_* Ricardo Ribalda
2022-12-21 14:14 ` Steven Rostedt [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=20221221091435.5ed368cb@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=corbet@lwn.net \
--cc=ebiederm@xmission.com \
--cc=gpiccoli@igalia.com \
--cc=joel@joelfernandes.org \
--cc=kexec@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prudo@redhat.com \
--cc=ribalda@chromium.org \
--cc=senozhatsky@chromium.org \
--cc=zwisler@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox