mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: iamhswang@gmail.com, richard@nod.at,
	anton.ivanov@cambridgegreys.com,  akpm@linux-foundation.org,
	dave.hansen@linux.intel.com, tiwei.btw@antgroup.com,
		rppt@kernel.org, kevin.brodsky@arm.com, snovitoll@gmail.com,
	linux@weissschuh.net
Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] um: add uml_kmalloc_array() helper to avoid potential
Date: Wed, 22 Jul 2026 16:49:12 +0200	[thread overview]
Message-ID: <6385309c68d6d8a928a01f421b54e1cdf8001c97.camel@sipsolutions.net> (raw)
In-Reply-To: <20260120112938.463596-1-iamhswang@gmail.com> (sfid-20260120_123032_467740_95AB1171)

On Tue, 2026-01-20 at 19:28 +0800, iamhswang@gmail.com wrote:
> From: Haisu Wang <iamhswang@gmail.com>
> 
> Add uml_kmalloc_array to avoid potential dynamic multiplication
> overflow. Since in Documentation/process/deprecated.rst,
> the preferred way is avoid the open-coded arithmetic.

Personally, I think it's kind of pointless because the only two users
have small static arguments ... but if you want to continue with this
then
> 
> +extern void *uml_kmalloc_array(int count, int size, int flags);

the prototype should probably match better and use size_t, size_t,
unsigned int?

johannes

      parent reply	other threads:[~2026-07-22 14:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 11:28 iamhswang
2026-01-20 11:28 ` [PATCH 2/2] um: use uml_kmalloc_array() instead of uml_malloc() iamhswang
2026-07-22 14:49 ` Johannes Berg [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=6385309c68d6d8a928a01f421b54e1cdf8001c97.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=akpm@linux-foundation.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=iamhswang@gmail.com \
    --cc=kevin.brodsky@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=linux@weissschuh.net \
    --cc=richard@nod.at \
    --cc=rppt@kernel.org \
    --cc=snovitoll@gmail.com \
    --cc=tiwei.btw@antgroup.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

all inboxes | Powered by JetHome®