From: Jakub Kicinski <kuba@kernel.org>
To: I Viswanath <viswanathiyyappan@gmail.com>
Cc: richardcochran@gmail.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev,
david.hunter.linux@gmail.com,
syzbot+94d20db923b9f51be0df@syzkaller.appspotmail.com
Subject: Re: [PATCH net v3] ptp: Add a upper bound on max_vclocks
Date: Fri, 26 Sep 2025 15:30:21 -0700 [thread overview]
Message-ID: <20250926153021.46848cca@kernel.org> (raw)
In-Reply-To: <20250925155908.5034-1-viswanathiyyappan@gmail.com>
On Thu, 25 Sep 2025 21:29:08 +0530 I Viswanath wrote:
> This can be reproduced by executing:
>
> echo x > /sys/devices/virtual/ptp/ptp0/max_vclocks
>
> where x > KMALLOC_MAX_SIZE/(sizeof(int)) which computes to 1048576 on
> my system
>
> What would be a reasonable value for PTP_MAX_VCLOCKS_LIMIT?
I wonder about that, too. Perhaps tying uAPI behavior to
KMALLOC_MAX_SIZE is going to come back to bite us. But I don't
have a great idea for what the max should be.
> KMALLOC_MAX_SIZE/(sizeof(int)) is the absolute max value for which the
> memory allocation won't fail
next prev parent reply other threads:[~2025-09-26 22:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 15:59 [PATCH net v3] ptp: Add a upper bound on max_vclocks I Viswanath
2025-09-26 12:58 ` Richard Cochran
2025-09-26 22:30 ` Jakub Kicinski [this message]
2025-09-26 22:40 ` patchwork-bot+netdevbpf
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=20250926153021.46848cca@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.hunter.linux@gmail.com \
--cc=edumazet@google.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=syzbot+94d20db923b9f51be0df@syzkaller.appspotmail.com \
--cc=viswanathiyyappan@gmail.com \
/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