Received: by 2002:a05:7208:31d3:b0:81:e143:7c29 with SMTP id v19csp2640027rbd; Tue, 9 Apr 2024 12:40:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVutyB1kp2ZnnVTxtLkIEsvw0mfRoabcp2QytEPwDJyzQMNRia3PaTBK3Mxag4X4eC6VQPnEvDhPwND5zwBVA6yhfzrl1c8kB0+3mhEyg== X-Google-Smtp-Source: AGHT+IHhGCkjvMiUCD1VPPbTA0PbL/uHK/RXQFQ0KYlBqhJIZzn4iiw/qlh/yADup0gNWdVwupx8 X-Received: by 2002:a05:6870:ac2c:b0:22e:e0ef:3d29 with SMTP id kw44-20020a056870ac2c00b0022ee0ef3d29mr664669oab.13.1712691617248; Tue, 09 Apr 2024 12:40:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712691617; cv=pass; d=google.com; s=arc-20160816; b=bMEqbDB8Y8gJJ+kmQS3r2l76bg0EbZ7RJLnkGHo/ORIQp26DOVEziNhDo5sR2jWLiD VBYfwxMCmRhdfUb11V/4SKT9YLY3cJH5Am/1+v2aqARlkhMl7r2w60dXJQOe1V9yrd// B/IS1w6YtjBkDzYy8SfwP2a/a9OdsEraTCk/8VAp4yFZiXD+YDUZLkG6U1sk3AGHKees 7UGw24nss6wzNCeuXc06Pbqo//kYtJmJ0YhELxgauy6HpyrjPwrShXnK6je8X1dMTP4T SgAL0G2Gz7FgVWV82dEs7q10vkVoN0ZVNe5Y1OVvySpmPVmyvWtj9/ALIRLKy0JxpjV0 UFfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=SU/lIZjorLYT/0gn8Ivk/IkYaTA7K0Unxbh+QSYRN84=; fh=oA3V8ARPOSpr84T+i6QYtNgpLHOc/8pugSGyO/YUNHo=; b=Qei1YPG+vsfiErhiw1h9BJ186LM+ACsa5GwwniWTyVRAg/j3aIQncan1dYFGn7BD9+ bdUU4uz7q618FVIA1fI12zSEm4BShT+sPf0mQ7QVHEIqArEWdJx/7YZjyYaAxqX6hyMs 3veRLIXNoocqaDgW8TzlUnmncaJ8VzBBHo7qSZhU2qZy6GT0MRZ9EH91Fsk87fk1werJ I12whyRYBfD76fzBs8CHq2T8FbmGUz2lmuCB8Ie2J9qB4X/7sFxg0b+mpDqT0uXupn5q ShzyuqtQiu2O+7dsJbEn2rNDWz1BAK8F1IjTcxdjDG+gsR+JRsWRTBx2LsTNS3s8L3o0 GQ9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=OAwGOJjb; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-137365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137365-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id n27-20020a634d5b000000b005db38f35248si9104685pgl.395.2024.04.09.12.40.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 12:40:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=OAwGOJjb; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-137365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137365-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 76515B264D1 for ; Tue, 9 Apr 2024 17:07:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A9F115383E; Tue, 9 Apr 2024 17:06:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="OAwGOJjb" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F26713E3E3; Tue, 9 Apr 2024 17:06:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712682409; cv=none; b=Du19XjtcdNfOD78M+Qw9DVoWZiTUhc3z/C7OumDmP4CeYKcvw2H+Em9A/lCNtwGTA3n2sOUkD8kveOKOdUe1/L7JrXJCNb5cz1k2H/wYJMpJGs9mghK5nVDM0Zr0vH/mt8N5QTucVcm8jVo1cydQChOudsMSNJnIPr1KUj/4dBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712682409; c=relaxed/simple; bh=SU/lIZjorLYT/0gn8Ivk/IkYaTA7K0Unxbh+QSYRN84=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rR7X/PyQ/HACnD585NxsNUgB4WEZNWlsXyK5TExNpW7D7lVzMq+XNefwAqGeyTqX2JgwPJH17zolapmKuF+PdfzI4Q/88Dxy+yN6ra+PTqyPsSEfgljufOAl78JLQtnFk1c8gGufFPGxWNgFEAIIiu+Hca9w4gkkR4sJGBA/69A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=OAwGOJjb; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SU/lIZjorLYT/0gn8Ivk/IkYaTA7K0Unxbh+QSYRN84=; b=OAwGOJjbH3VyJN6C/JQx2eHqDl L6MBrNPuxjVIC/3iVlvU40CtZjaRS9iKd/G/fWJ4MwqmO5ppVaLxueAHwoOojyzqZ0moH1XmuxHtL yuSVvOEjppa1fcyBL90f8sFclfNIwgQy4acr/3hlrlJGzLm632vl+fqrdrcy0tF3xmJ7+9ohSvAIs /kTJyOiH9zbC+AbqCw3pIi8mgEIy6FvTTwLGJqEpogltTzljTRvsVTeNtLN7uh33DK+0bmvMUrtlD GqHp0buy79XsBLsZufqboxbgT7vyi5ZN5t/3DA5OzzKMkk2gjLP8jY3MyoqOmgH3BIRYzLC4I5S0R kHfYxYKg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1ruEvk-009F9r-11; Tue, 09 Apr 2024 17:06:44 +0000 Date: Tue, 9 Apr 2024 18:06:44 +0100 From: Al Viro To: Jens Axboe Cc: linux-fsdevel@vger.kernel.org, brauner@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] iov_iter: add copy_to_iter_full() Message-ID: <20240409170644.GE2118490@ZenIV> References: <20240409152438.77960-1-axboe@kernel.dk> <20240409152438.77960-2-axboe@kernel.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240409152438.77960-2-axboe@kernel.dk> Sender: Al Viro On Tue, Apr 09, 2024 at 09:22:15AM -0600, Jens Axboe wrote: > Add variant of copy_to_iter() that either copies the full amount asked > for and return success, or ensures that the iov_iter is back to where > it started on failure and returns false. FWIW, see git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #work.iov_iter There was an open-coded instance (skb_copy_linear()) that I'd converted to that helper in the same commit; I can split it, of course, but I don't see much point in that.