Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1600220pxb; Fri, 27 Aug 2021 12:35:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy0BM60TCd1uNjleSuxnRvAEnjt+8JKajBUdy8AH088ZD9Ut3AvC4iyb8gK18sSQw39xmF X-Received: by 2002:a05:6e02:1bc8:: with SMTP id x8mr7569819ilv.138.1630092947005; Fri, 27 Aug 2021 12:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630092946; cv=none; d=google.com; s=arc-20160816; b=XCckvHdOj/LHquWcmwrsmsWUbFxDZ5RE4VLQq62utgFxa+WVl50sTxstCqis+M9rzV EFzKHRiGMn3s4FXqlNASQYabiYZLOLy7xnY59JEhiDH/jG+WxRkFUU1ucFww0wfvm0qY /I2nENZV0y6v0gcE102J7dmXCBXEf83pkv6T3nS3HnoAC7wSBKsCshuzwj/byP81Hitp lGxlSqCm4X4RVjr2O93VWj7Mie5yUlzErgeTNbs8eXBcIqGRZfLyQbivXqW5MX0TxsEd ACo35u9YQGB8+h+zkNkes8ZmWpG8WqsDfo9MIUMRCkm5wN7X1dzXigQeRvH4NNtBvGN2 4wZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=noHCPSrtAkyzCrVsyQD6F8PSfdWl+QDD2xq/GV377n4=; b=qLRPv24FAdItzsYYoWg9I9u14mkNwEYrGIzXkBjqFzrVWdWYEXgsfLALDIei9IBPBs zmbxKdwpJMIgfNRipCjGYeBLBi5Ljbm0KEwk2KdGEIxYNYrBpq79+YBgB6Q5swhYxfA6 SRfOMb5bTfl5jGhCqHT96K3vj+v/R0PF3UDe49GM05xDVvqNj0wxYfw3L2zESA2spAHY VCV+FvX4PqwgkaWbMtKnDOQj0svm++k6I0cj8vvg9kQYHWMfOTeBCTtp7lbqR5g20kFd YMAPjTu99gzMgGjJ2bxK3kkZYcJGGw/E/9XgegwHGMnOenpcI20n5k5XwK9pFY67NU4K prAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=OubElFYV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si7139935ili.81.2021.08.27.12.35.35; Fri, 27 Aug 2021 12:35:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=OubElFYV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231215AbhH0TeM (ORCPT + 99 others); Fri, 27 Aug 2021 15:34:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230405AbhH0TeL (ORCPT ); Fri, 27 Aug 2021 15:34:11 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D76CDC0613CF for ; Fri, 27 Aug 2021 12:33:21 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id j4so16511537lfg.9 for ; Fri, 27 Aug 2021 12:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=noHCPSrtAkyzCrVsyQD6F8PSfdWl+QDD2xq/GV377n4=; b=OubElFYVmhZbc+A4cMbmNe0TfihA1IDFIUGNFFLF4+YO14gBPAxD7udrxkX02hDHv8 AfKEsOmsIOPceXNppuc1+woLySYPcxqVPmdyCnzYp/DWgTgYZru2vKMDv0QdVLj5OUdo 9eyfmRKJeFyRGIgCMVyovNvNTjyCKilmw7e2E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=noHCPSrtAkyzCrVsyQD6F8PSfdWl+QDD2xq/GV377n4=; b=FbjlqHy89JW9mR/B/V8ra6clBOiweJli5zVc7bk/+HvJNm1q+v1Ln47d7SNumaJSst 18GQ4jnmwm6PhzJQgka8CAcpTH8Y5Jn9cHTmESfrxTDAXUOC6209JfqlKKVcdEw7RWbm vM+fl9ZnrnEqS2Uz3SY7YqdYLzKS1DwEBpaxkHcSa7R7JPAlnykMeEkJfSiaHJGDRIdN CNnbItrYYJhPp5+qDVSHVEjE9iDrCFmj/yiFekKYSXF3plaER6VHuD5bR0i6whvRTTsI Yg4HqSNSkwLhCEFV5Enq9Gy4pIfk7M4nmau5q30bLCKmzFbbL4CdGfMRMC0CaSqLG5ir X49Q== X-Gm-Message-State: AOAM530qBv0ryYpj6fVni5dTZk2f5naVFoAGNOJulGb3hj6GndBwssch 25YaBnsx8qEkgjnlFQeklsjaBHV7y04egGAQ X-Received: by 2002:ac2:4e0a:: with SMTP id e10mr8167198lfr.66.1630092799565; Fri, 27 Aug 2021 12:33:19 -0700 (PDT) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id u20sm782068ljl.76.2021.08.27.12.33.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Aug 2021 12:33:17 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id m4so13248354ljq.8 for ; Fri, 27 Aug 2021 12:33:17 -0700 (PDT) X-Received: by 2002:a05:651c:908:: with SMTP id e8mr8956231ljq.507.1630092796791; Fri, 27 Aug 2021 12:33:16 -0700 (PDT) MIME-Version: 1.0 References: <20210827164926.1726765-1-agruenba@redhat.com> <20210827164926.1726765-6-agruenba@redhat.com> In-Reply-To: From: Linus Torvalds Date: Fri, 27 Aug 2021 12:33:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 05/19] iov_iter: Introduce fault_in_iov_iter_writeable To: Al Viro Cc: Andreas Gruenbacher , Christoph Hellwig , "Darrick J. Wong" , Jan Kara , Matthew Wilcox , cluster-devel , linux-fsdevel , Linux Kernel Mailing List , ocfs2-devel@oss.oracle.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 27, 2021 at 12:23 PM Al Viro wrote: > > Could you show the cases where "partial copy, so it's OK" behaviour would > break anything? Absolutely. For example, i t would cause an infinite loop in restore_fpregs_from_user() if the "buf" argument is a situation where the first page is fine, but the next page is not. Why? Because __restore_fpregs_from_user() would take a fault, but then fault_in_pages_readable() (renamed) would succeed, so you'd just do that "retry" forever and ever. Probably there are a number of other places too. That was literally the *first* place I looked at. Seriously. The current semantics are "check the whole area". THOSE MUST NOT CHANGE. Linus