Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11667929rwl; Tue, 3 Jan 2023 03:00:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXueVWMNTZcpjknH0yvcykoqgMUZqPWntI1UVphJCu5Z7YPDyIeSmMca75nWAEpXwywfQr8k X-Received: by 2002:a17:90a:8986:b0:221:4258:4e8f with SMTP id v6-20020a17090a898600b0022142584e8fmr46993241pjn.29.1672743630991; Tue, 03 Jan 2023 03:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672743630; cv=none; d=google.com; s=arc-20160816; b=o61snSaYmBE1AZhjP76LRW/LWIOMaTKql5sm7QU3A5ZgLT2W9Uf8seAap4BjKAymJE /4NTiAgxBkmT6xf+mRbnwlRXn+jyS38Q6cs10J8gB5u5jK5c9YZ33XdGEE9D0mmcZ6gM 0j4+tA49GztE5OdO8jRSkAHiRNaPHBRLj0v0dfUdbWabbqwfIia1+uc6Hd/kyFJV1Z7P X8aT3KjOCzF5j6adIMl1BsiEFsm0w+bvvpgHdbz4s7F8jBVfyqt8snny3weqCwJyNfiS RtJw1r0dkU20Z/hRs1IPe1qoBk+jkc+NVtxUpzazKlgXwkK43WzkhWsxLbyoKHv8Viay RoLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wXeSdOghItZZjbgZ3atwBf0lWMGr/AGQ3mZ/TpSBJ4s=; b=x/jwIsO+5wJuORJ815xg+IJq8kDAPktD6QB6atXo7ZF/bar9YLD9o851YAQ9X2PgAw OcQk+73EMrccWW5P11eeg5fFuDrLjHGgQKb5UcjjmrI/S+fz2Zk1wqw6VPzH7NOXjS3d ZxlT0Hqiz/iOu2jNaWBRBm2m3g+pnojFkhbkxI5UYCxddMrlNgzVa0vPEDwH9KSRWNC0 C2lQvl9UFxS+QCerRw5q1u0FnjE+Md0mmq9iwb3T/CpbyyLgSMlR7WzVst5RPQQOuhzE 5T9piGto7iK3k8BKHpr2uoyXWDQnsv33Btx5I3zIsZJQCw6DiIDC/IOadLRpVLXMbJyD RdHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=N6Ee4eAL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a17090aa40c00b0022692bdf6c0si2277439pjp.49.2023.01.03.03.00.22; Tue, 03 Jan 2023 03:00:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=N6Ee4eAL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232995AbjACKtZ (ORCPT + 62 others); Tue, 3 Jan 2023 05:49:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbjACKtY (ORCPT ); Tue, 3 Jan 2023 05:49:24 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AF35F20 for ; Tue, 3 Jan 2023 02:49:22 -0800 (PST) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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!