From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Deepak R Varma <drv@mailo.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Praveen Kumar <kumarpraveen@linux.microsoft.com>,
Saurabh Singh Sengar <ssengar@microsoft.com>,
Julia Lawall <julia.lawall@inria.fr>
Subject: Re: [PATCH v2] ARM/dma-mapping: use kvcalloc for fallback memory allocation need
Date: Tue, 3 Jan 2023 10:19:20 +0000 [thread overview]
Message-ID: <Y7QBKMzuzNQAdKyY@shell.armlinux.org.uk> (raw)
In-Reply-To: <Y6wYQNvloBeW1oq4@qemulion>
On Wed, Dec 28, 2022 at 03:49:44PM +0530, Deepak R Varma wrote:
> On Tue, Dec 20, 2022 at 07:46:32PM +0530, Deepak R Varma wrote:
> > Current conditional determination of whether to use kzalloc or vzalloc
> > has known issues such as "indefinite retry" when less than PAGE_SIZE
> > memory is needed, but is unavailable. This LWN article [1] describes
> > these issues in greater detail. Use helper function kvcalloc() instead
> > which is more efficient in terms of performance and security.
> >
> > [1] https://lwn.net/Articles/711653/
> >
> > This patch proposal is based on following Coccinelle warning using the
> > kvmalloc.cocci semantic patch.
> > arch/arm/mm/dma-mapping.c:858:28-29: WARNING opportunity for kvmalloc
> >
> > The semantic patch suggests using kvzalloc() helper function, however,
> > this patch proposes to use kvcalloc instead. kvcalloc() helper function
> > uses 2-factor argument form which is better from a security perspective
> > as described in the following KSPP project commit.
> >
> > Commit 4e3fd7217105 ("wireguard: ratelimiter: use kvcalloc() instead of kvzalloc()")
> >
> > Signed-off-by: Deepak R Varma <drv@mailo.com>
>
> Hello,
> May I please request a review and feedback on this patch proposal?
The DMA API on ARM has been maintained by others recently, so it's no
longer up to me. Please include Christoph Hellwig <hch@lst.de> when
sending changes for this. Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2023-01-03 10:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 14:16 [PATCH v2] ARM/dma-mapping: use kvcalloc for fallback memory allocation need Deepak R Varma
2022-12-28 10:19 ` Deepak R Varma
2023-01-03 10:19 ` Russell King (Oracle) [this message]
2023-01-03 10:48 ` Deepak R Varma
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=Y7QBKMzuzNQAdKyY@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=drv@mailo.com \
--cc=julia.lawall@inria.fr \
--cc=kumarpraveen@linux.microsoft.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ssengar@microsoft.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