Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2144538lqe; Tue, 9 Apr 2024 10:40:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWL5WPuJGjButfVo4ntfOudUYGOUFfq7vfPSmxPBLSH+UCzsK19cGVKE7jOFE5ha4l8wsW3mBrbaINogK7HVBDIPnx9vH0G2mEtkeZAig== X-Google-Smtp-Source: AGHT+IG21cxR2L25dU8ZwZvlhjaspmnfqsvXF7cXmQoTWAyDRy5p0SnERE5f2tqkQjpIzSXNgnYd X-Received: by 2002:a05:6a20:9144:b0:1a3:a89b:a70a with SMTP id x4-20020a056a20914400b001a3a89ba70amr643616pzc.37.1712684437391; Tue, 09 Apr 2024 10:40:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712684437; cv=pass; d=google.com; s=arc-20160816; b=D3l62qY60OvFBdK6cCSuTAK6hjQkU5LIKUXUICsLnNMdsRg73K8GDo2kn8FdGNYcTU WRHpFMtgLsFUk0NHFBwnFEQ7N3toutFlO264OQKSxFZif0cyAUSRAwdCd7qiXK/sKWnI Y0r4tX2Ihlje/H1PjhL49sQSS2yf6dHpABt8cgAoezT3a83qOELID+84Sj/ADgF1BDhO q8QmBYi8PXvBJSJB1LYkkoyXrpefs45ENUvfuAM8qZh1MSmGnjCUIoff3ZmsvPUYrg5I Z9/nZMP8NhTD55mkgSfIw0PduW+1ndvfNzXNTG8jmXH9x2mHhjqogN6RCtb7aKtjEmut O53g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=rCF4brmK1xna8X9dl4JbyVl4tAdSfSlHlPsOdrXYGDA=; fh=VpeVt57Y4+K/OgbTtnk7Qpdp4X3jIC2d64qK+tK1zYA=; b=I9U7UW3TrNSZ8MXAYjsiDWGC4N3YAsAk7QxIWcGMgkY8M06B9lY4/GOuS6wrU1ls8z H5xDXbHiDYG1QUEKom4xfy3Ox6pryYzdPfzSbqzXVkq4wAaoWkVjdBfG0rkhKfWYcPXV zuIobyDrs7EObHA5CnKjtzU+nvOTdBDw3Vab5+amNZA3fGL6IZay5VGwsPSnCO3jJIBq 3OraKaT352Li2HAE1YEG8OMAe3xTtPeRwSl8IHPpBPHKd6BXyN9DVWt65Vpwcdf2CHIn jzYZ2hFRmfSc8XAN5g92hmt+D0xLtnZcn1UxrU5y6jXfoDTvafmII7Y/Wp/ra5xJCxmQ 5ZcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=iBzYfnWv; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-137370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137370-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id km42-20020a056a003c6a00b006eac9744617si8884143pfb.127.2024.04.09.10.40.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 10:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=iBzYfnWv; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-137370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137370-linux.lists.archive=gmail.com@vger.kernel.org" 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 66559B25338 for ; Tue, 9 Apr 2024 17:10:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCFEA1553A9; Tue, 9 Apr 2024 17:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="iBzYfnWv" Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D78B153BD8 for ; Tue, 9 Apr 2024 17:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712682644; cv=none; b=EtpUWQKZlfXKEal/oaCA/oqElh6fF6bOc8PjS24JohZfNTBXtIrEpDNZfmZSCBvpTZ81BJCfGqbQAYlW5na+wBkQ9Ub4OUXGWB5hhZ8/eDxTalwIEjSQ1FbLZMw2C3cJGN69NEftFU/SsrHCXnzGDR7zSZMpDwzsRCR1CNOvlNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712682644; c=relaxed/simple; bh=DaPCXUGC5SI+VvCrK6iY6VKR70jtnLy+38KfZddgl/o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ggkikmI/2lo8IPMAzYjF0q6NO2uIGu6lAWwmy80BOyAyS7Mf0m5YdW+QOSXk5tJIR/Eatwvnb4LzP05cbxzkGJUgImjahW/tzWg7rTYODxIaGJa2Rb+dqRO9ZJFJAlPxyLNKFedLgx3lONyM1bsctgUQs1gh0pins/2FNLpZ4QQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=iBzYfnWv; arc=none smtp.client-ip=209.85.161.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-5aa34ec9a54so76983eaf.0 for ; Tue, 09 Apr 2024 10:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712682640; x=1713287440; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rCF4brmK1xna8X9dl4JbyVl4tAdSfSlHlPsOdrXYGDA=; b=iBzYfnWvTTgUTCdTUIKYJcav2CXcE99UyyXqPEFifHVrBSQNBC+wDwuPXNyuR9FGEP /UfI+b4bmsZdxJpOE1wKPvvGFiForg+zpX6Gv3ZP0EJd239nTI/GrYAKi5TfZX1pQXny r4mMlAoMaB87vKLH8H/xjCt0x140+VvoQHB9vF6HQGuK/27Z/vrlp03HG6coqqqd5xXm SxosxqAYJtmI0NfPgSbYLhrBSQqQXz9MsithjCwyzGOBYU6E36exuhkOsd5wJ9aUgyS7 4oAcZ4l82d50odbKdEDGZ2KRC0WPK89VMcEl7H1wqbyyYPBnADO7CbdG8ZMegtPjkVT0 w0rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712682640; x=1713287440; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rCF4brmK1xna8X9dl4JbyVl4tAdSfSlHlPsOdrXYGDA=; b=PGwuuCx76CG2XUMeUrY+ongcCTZzIuuvyTrdnDK2BJuqivO1+bfKiKk5GdgD1ODW4o EsS764YL1kKbOX9ymCmxLh9mlIE9lb5G/Ppzhjn8lqE3/hAtqQemIWysOnVNySCUcH5l 56vdS/JwopkgqnoLpFqf0vjTxsey3k7MEfB3DWgaMh4BSlCicslceYI4GeQxreqI89dw VBBl8E7vZJpCQk0VEOyNcwnGFQ6a4k0PLU9qIFUuuG3oGvX/oNUjvMX+U5vUkuN92L3T j/xRgNWxBkocPlnqmhIGbPUKfApaGIONCr26XIV8sLy/dYLcgG1mGkvw0CD2+OYriKz3 VszA== X-Forwarded-Encrypted: i=1; AJvYcCUGWvdNadFXHzHZ3DdYddIYKqKN7okDFTFvi0mMsLSdSgMnRL2AyXE57Ej8vKZCkA7C92J/2CY7C75O2RCtAvWx0Q9mFl+1tWUGpAzQ X-Gm-Message-State: AOJu0YzBKQ5ukd7OEpJ6gzmmMo9Fn+gQyeQ0/S+jfx+xOKosLhcnNQX1 4DX9mc/q12i1rMwnKPaVS+6LxAhrtGS9fWCdSQz00k6WFTGhInN9ZP34twRiU4o= X-Received: by 2002:a05:6359:2ea3:b0:186:10ee:b04 with SMTP id rp35-20020a0563592ea300b0018610ee0b04mr431149rwb.1.1712682640194; Tue, 09 Apr 2024 10:10:40 -0700 (PDT) Received: from [192.168.1.150] ([198.8.77.194]) by smtp.gmail.com with ESMTPSA id w9-20020a63fb49000000b005bd980cca56sm8397770pgj.29.2024.04.09.10.10.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Apr 2024 10:10:39 -0700 (PDT) Message-ID: <8187c490-b1e1-4c7d-9f7c-590ade4777c4@kernel.dk> Date: Tue, 9 Apr 2024 11:10:38 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] iov_iter: add copy_to_iter_full() Content-Language: en-US To: Al Viro Cc: linux-fsdevel@vger.kernel.org, brauner@kernel.org, linux-kernel@vger.kernel.org References: <20240409152438.77960-1-axboe@kernel.dk> <20240409152438.77960-2-axboe@kernel.dk> <20240409170644.GE2118490@ZenIV> From: Jens Axboe In-Reply-To: <20240409170644.GE2118490@ZenIV> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/9/24 11:06 AM, Al Viro wrote: > 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. No reason to split it, I'll have a dependency regardless. I'll just pull your branch in, so ignore patch 1 here, 2-4 will remain the same. -- Jens Axboe