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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 747C9C6FD1F for ; Sun, 19 Mar 2023 22:28:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230374AbjCSW2X convert rfc822-to-8bit (ORCPT ); Sun, 19 Mar 2023 18:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230347AbjCSW2V (ORCPT ); Sun, 19 Mar 2023 18:28:21 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6480919C5E for ; Sun, 19 Mar 2023 15:28:19 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-181-_IBSa434P-uLEzTnXolkmw-1; Sun, 19 Mar 2023 22:28:14 +0000 X-MC-Unique: _IBSa434P-uLEzTnXolkmw-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.47; Sun, 19 Mar 2023 22:28:12 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.047; Sun, 19 Mar 2023 22:28:12 +0000 From: David Laight To: 'Matthew Wilcox' , Lorenzo Stoakes CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , Andrew Morton , Baoquan He , Uladzislau Rezki , "David Hildenbrand" , Liu Shixin , "Jiri Olsa" Subject: RE: [PATCH 4/4] mm: vmalloc: convert vread() to vread_iter() Thread-Topic: [PATCH 4/4] mm: vmalloc: convert vread() to vread_iter() Thread-Index: AQHZWg2rkT8MGeJf90mcEtrkYLQB2q8Cr6Jw Date: Sun, 19 Mar 2023 22:28:12 +0000 Message-ID: <63c98c518c1e4bfbb36c5295ba7c959d@AcuMS.aculab.com> References: <119871ea9507eac7be5d91db38acdb03981e049e.1679183626.git.lstoakes@gmail.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Matthew Wilcox > Sent: 19 March 2023 02:51 > > On Sun, Mar 19, 2023 at 12:20:12AM +0000, Lorenzo Stoakes wrote: > > /* for /proc/kcore */ > > -extern long vread(char *buf, char *addr, unsigned long count); > > +extern long vread_iter(char *addr, size_t count, struct iov_iter *iter); > > I don't love the order of the arguments here. Usually we follow > memcpy() and have (dst, src, len). This sometimes gets a bit more > complex when either src or dst need two arguments, but that's not the > case here. And, if 'addr' is the source (which Matthew's comment implies) it ought to be 'const char *' (or probably even 'const void *'). David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)