linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: I Viswanath <viswanathiyyappan@gmail.com>
Cc: vbabka@suse.cz, akpm@linux-foundation.org, cl@gentwo.org,
	rientjes@google.com, roman.gushchin@linux.dev,
	harry.yoo@oracle.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, skhan@linuxfoundation.org,
	david.hunter.linux@gmail.com,
	linux-kernel-mentees@lists.linux.dev,
	syzbot+94d20db923b9f51be0df@syzkaller.appspotmail.com
Subject: Re: [RFC PATCH] mm/slab: Add size validation in kmalloc_array_* functions
Date: Mon, 22 Sep 2025 22:36:16 +0100	[thread overview]
Message-ID: <aNHBUJxAs-vomIF3@casper.infradead.org> (raw)
In-Reply-To: <20250922170357.148588-1-viswanathiyyappan@gmail.com>

On Mon, Sep 22, 2025 at 10:33:57PM +0530, I Viswanath wrote:
> This occurs when the size argument fits into a u32 but is too large 
> to allocate, i.e., when it's between KMALLOC_MAX_SIZE + 1 
> and UINT_MAX (both limits included)

Is it really a good idea to support 2^28 vclocks?  Surely there's a
limit that makes sense to the PTP driver.

Beyond that, this should probably be using kvmalloc_array rather than
kcalloc_array().


  parent reply	other threads:[~2025-09-22 21:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 17:03 I Viswanath
2025-09-22 17:59 ` Harry Yoo
2025-09-23  5:11   ` viswanath
2025-09-23  6:14     ` Harry Yoo
2025-09-22 21:36 ` Matthew Wilcox [this message]
2025-09-23  4:28   ` viswanath

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=aNHBUJxAs-vomIF3@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=david.hunter.linux@gmail.com \
    --cc=harry.yoo@oracle.com \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=skhan@linuxfoundation.org \
    --cc=syzbot+94d20db923b9f51be0df@syzkaller.appspotmail.com \
    --cc=vbabka@suse.cz \
    --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