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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6395C34022 for ; Tue, 18 Feb 2020 00:03:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 994E520801 for ; Tue, 18 Feb 2020 00:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725997AbgBRADR (ORCPT ); Mon, 17 Feb 2020 19:03:17 -0500 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:37372 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgBRADR (ORCPT ); Mon, 17 Feb 2020 19:03:17 -0500 Received: from dread.disaster.area (pa49-179-138-28.pa.nsw.optusnet.com.au [49.179.138.28]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 3F4807E9BD4; Tue, 18 Feb 2020 11:03:14 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1j3qM5-00048T-Km; Tue, 18 Feb 2020 11:03:13 +1100 Date: Tue, 18 Feb 2020 11:03:13 +1100 From: Dave Chinner To: Christoph Hellwig Cc: linux-xfs@vger.kernel.org, Allison Collins , Chandan Rajendra , "Darrick J . Wong" Subject: Re: [PATCH 26/31] xfs: lift cursor copy in/out into xfs_ioc_attr_list Message-ID: <20200218000313.GA10776@dread.disaster.area> References: <20200217125957.263434-1-hch@lst.de> <20200217125957.263434-27-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200217125957.263434-27-hch@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=X6os11be c=1 sm=1 tr=0 a=zAxSp4fFY/GQY8/esVNjqw==:117 a=zAxSp4fFY/GQY8/esVNjqw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=l697ptgUJYAA:10 a=pGLkceISAAAA:8 a=yPCof4ZbAAAA:8 a=20KFwNOVAAAA:8 a=7-415B0cAAAA:8 a=yJeJCC5Ka_Efzq78hjEA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Mon, Feb 17, 2020 at 01:59:52PM +0100, Christoph Hellwig wrote: > Lift the common code to copy the cursor from and to user space into > xfs_ioc_attr_list. Note that this means we copy in twice now as > the cursor is in the middle of the conaining structure, but we never > touch the memory for the original copy. Doing so keeps the cursor > handling isolated in the common helper. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Chandan Rajendra > Reviewed-by: Darrick J. Wong > --- > fs/xfs/xfs_ioctl.c | 36 +++++++++++++++--------------------- > fs/xfs/xfs_ioctl.h | 2 +- > fs/xfs/xfs_ioctl32.c | 19 ++++--------------- > 3 files changed, 20 insertions(+), 37 deletions(-) Still a maze of twisty passages, but it's a bit straighter now. Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com