From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECC1FC3DA7D for ; Tue, 3 Jan 2023 15:30:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7oRPA2SJalkDdBjMGUEpxmShSWzmEoGM2gb0ujy8HrI=; b=bfNhZsPR/8CJ7O Jw6LKmr9x4SRwKFD1EDwAhrSl9Av/IBwR1ImCaLBSZMajI96rP6nyzEQ2XzZ4tv2CVIpmYSQGaw+T mLPoq734pH5DYhetnF9ID6BJEU+22k5SftaS4Ovesh1f0T1CR2khxMBX2gXsz72F/r3GE6BhhdLc8 JnY1cIwDPUB2VeCTedRTsZp/eeKcjMy2KWQgndoYY/ci0okyNlUpPo6OUf0izQPyNQM0h/UAtQmTz rZc5kBJQGloEqXWqiNly7Pu51FoO+1u4sWeDXwwl/tqDwpwbhu3IQYE4r9MlOwEz50rIBIn4Smv6X F/aRX5kvkSaHOU0/uEyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCjDx-002RTQ-Kq; Tue, 03 Jan 2023 15:29:10 +0000 Received: from msg-1.mailo.com ([213.182.54.11]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCer7-000oOv-Gy for linux-arm-kernel@lists.infradead.org; Tue, 03 Jan 2023 10:49:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1672742942; bh=YSVUc8AUwmy5LJUg0+wk8lgBBJf75FDlmAOX4Fj/1nc=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=N6Ee4eALM3vIoAmLheTPmvIm856Bno9SK+QUEgmM9jR7juMOL5T+8lUcGDx5J+RWE OQSPJJZcvDX0J2xHETt0zeItuotT6U3tT8NtUAbLBuBl/I+fW/8aOeYzku9FDK2R2T OTldSsz7dp4aXkmbhH16UM1CS5o1wVA2mDF9HGro= Received: by b-4.in.mailobj.net [192.168.90.14] with ESMTP via ip-206.mailobj.net [213.182.55.206] Tue, 3 Jan 2023 11:49:02 +0100 (CET) X-EA-Auth: 2KAjtx4HnJXL5wRi5YfPVJGYAfG5azavUVqBYrbEbx5N5TKbpYBBClrVit4FeXmcfKs3v4HfRqYkVRqY06rLeAKf2B2wqvlJ Date: Tue, 3 Jan 2023 16:18:57 +0530 From: Deepak R Varma To: "Russell King (Oracle)" Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Praveen Kumar , Saurabh Singh Sengar , Julia Lawall , Deepak R Varma Subject: Re: [PATCH v2] ARM/dma-mapping: use kvcalloc for fallback memory allocation need Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230103_024918_077717_91ED815F X-CRM114-Status: GOOD ( 21.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 03, 2023 at 10:19:20AM +0000, Russell King (Oracle) wrote: > 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 > > > > 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 when > sending changes for this. Thanks. Sure. Actually the get_maintainer.pl scripts still returns yourself as the maintainer for this driver. Hence the email to you. I will send a v3 and include the change you asked for. I will keep you in cc if you don't mind. Also, let me know if I can help with getting the maintainer list updated for this core subsystem. Thank you, ./drv > > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel