From: Kuniyuki Iwashima <kuniyu@google.com>
To: Kees Cook <kees@kernel.org>,
Joel Granados <joel.granados@kernel.org>,
Thomas Gleixner <tglx@kernel.org>
Cc: Kuniyuki Iwashima <kuniyu@google.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/2] sysctl: Make proc_dointvec_ms_jiffies_minmax() enforce minmax again.
Date: Sat, 5 Sep 2026 23:36:30 +0000 [thread overview]
Message-ID: <20260905233819.1064529-2-kuniyu@google.com> (raw)
In-Reply-To: <20260905233819.1064529-1-kuniyu@google.com>
When the cited commit converted the SYSCTL_INT_CONV_CUSTOM macro to
functions, it accidentally changed do_proc_int_conv_ms_jiffies_minmax()
to pass false for k_ptr_range_check.
Since then, net.ipv[46].neigh.${dev}.interval_probe_time_ms no
longer enforces the lower bound.
# sysctl net.ipv4.neigh.bond0.interval_probe_time_ms=0
net.ipv4.neigh.bond0.interval_probe_time_ms = 0
Let's restore the minmax check.
With this:
# sysctl net.ipv4.neigh.bond0.interval_probe_time_ms=0
sysctl: setting key "net.ipv4.neigh.bond0.interval_probe_time_ms": Invalid argument
Fixes: d174174c6776 ("sysctl: replace SYSCTL_INT_CONV_CUSTOM macro with functions")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
---
kernel/time/jiffies.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 213ae1d6a014..70926b73905a 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -181,7 +181,7 @@ static int do_proc_int_conv_ms_jiffies_minmax(bool *negp, ulong *u_ptr,
int *k_ptr, int dir,
const struct ctl_table *tbl)
{
- return proc_int_conv(negp, u_ptr, k_ptr, dir, tbl, false,
+ return proc_int_conv(negp, u_ptr, k_ptr, dir, tbl, true,
sysctl_u2k_int_conv_ms, sysctl_k2u_int_conv_ms);
}
--
2.55.0.1003.g10538fe699-goog
next prev parent reply other threads:[~2026-09-05 23:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 23:36 [PATCH 0/2] sysctl: Restore minmax check for proc_do{int,ulong}vec_ms_jiffies_minmax() Kuniyuki Iwashima
2026-09-05 23:36 ` Kuniyuki Iwashima [this message]
2026-09-08 11:06 ` [PATCH 1/2] sysctl: Make proc_dointvec_ms_jiffies_minmax() enforce minmax again Joel Granados
2026-09-08 18:38 ` Kuniyuki Iwashima
2026-09-09 13:48 ` Joel Granados
2026-09-05 23:36 ` [PATCH 2/2] sysctl: Make proc_doulongvec_ms_jiffies_minmax() " Kuniyuki Iwashima
2026-09-08 12:15 ` Joel Granados
2026-09-08 18:44 ` Kuniyuki Iwashima
2026-09-09 13:44 ` Joel Granados
2026-09-09 17:07 ` Kuniyuki Iwashima
2026-09-10 9:04 ` Joel Granados
2026-09-10 10:45 ` Joel Granados
2026-09-10 16:43 ` Kuniyuki Iwashima
2026-09-11 8:59 ` Joel Granados
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=20260905233819.1064529-2-kuniyu@google.com \
--to=kuniyu@google.com \
--cc=joel.granados@kernel.org \
--cc=kees@kernel.org \
--cc=kuni1840@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tglx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.