From patchwork Fri Oct 27 14:42:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 158976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp655710vqb; Fri, 27 Oct 2023 07:43:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFte1odszc/ctNWa79ylDYuzZ+qURbmE0Lhv74aUn1ScAks775b+LwrqC3OtDv3PuFW4dIS X-Received: by 2002:a81:e90a:0:b0:5a8:1844:124d with SMTP id d10-20020a81e90a000000b005a81844124dmr2857389ywm.9.1698417802220; Fri, 27 Oct 2023 07:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698417802; cv=none; d=google.com; s=arc-20160816; b=oHTXfrN87C6kZ9rIAEUu4ZV6sJ3UQG+xPJbnRRtL36XwDCJP+24dftS2GVjeDvHF2P LhjtDdwEpwYHowNIeyaxlc/cfxvSzWCd3OSWz7I3snuyPKXwn/3ZqFtVBTc6VMqZ8Ydr Z3b3vRGhH6enri964jQ6TbjnncseIeiu5b+CirCg2dgK9PnQ4+YWOzCBpi2l+3GirYiQ 0Kbpl9Si3uD5BPV/1k9lqaVFKb0W/NRuBo61X878gvItmgrSq5EuZZI+Ng7k4i0CAnNB Rey555twlL/oSy/9GHXF4dTTOMuR5YsaCREPOOYep+JH2OF7RQ7c4dXnKlyUH00UfxEc 3ieQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HdFDC6hUQ2qTdH/RlQf6zU1iAvdE21adGkQZQx6It7s=; fh=qDZ+YnS9HJbCVOaeWFr2FnYZt7eE+vt5IJIDIlhBdxU=; b=IykWl0v1IRb+X5GY2mu+nKlJZjKjds+dDJG4egxb3i51gR64zOT2R830IF4Lq+ljgE MteAPa0JOYHjySrQtibvuFH1oet0OI20y7VyCMZhJ3ZVoIQaewfzzRQd94UOYokEB6C+ BlUC+Tetp9MMb3NP4zQPhy/4JkN2ywAOYMTyuvZjtXsqlih/o0HPacrLKb1I5vWrVTi7 oR3qIwsTbLf3q0tyUPHaHeMIAKJcPXJ0KHISEZuu0c2Fqd8ZPdx9qMqjtXBNxG3+KRcX s0LhfEHLFPdS57P07dMw1a6xvDLIavHh0/QOh/mQMadgNVahYxJE8E7Vsqvm8Y6KcyQT zVdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="O26UC/Uu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h13-20020a81b40d000000b005a7fa15b90bsi2514578ywi.166.2023.10.27.07.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 07:43:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="O26UC/Uu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 089BF834031A; Fri, 27 Oct 2023 07:43:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345833AbjJ0Om7 (ORCPT + 25 others); Fri, 27 Oct 2023 10:42:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231627AbjJ0Om5 (ORCPT ); Fri, 27 Oct 2023 10:42:57 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12CABC4 for ; Fri, 27 Oct 2023 07:42:55 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4474C433C8; Fri, 27 Oct 2023 14:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698417774; bh=Fo/Q1tCDWCMX1UtKnc1Cp7UAgDSwFYYmaR8Bh6BaonY=; h=From:To:Cc:Subject:Date:From; b=O26UC/UuNw0xh6Zdv/uqfIDo9PzFFgslo71++vldE9+ovHIqcDtcdJ32DOklnNysD 8vw8fNJ/Koxx0NIs4H3bUoW04tOt+U5nFt08FIbLWvIH7626CeDqFpsxRsTJ26qT4i AsGJhlHelTxBGjM3+OOdVG2Rg/6uFjZONyM1nB9jAo+P8u2PkJJmvTK33WXrsiHFJW RTPmxtr7U1qyd3Gmj6zWfeCKJDLaTiHzLAztaNDEIwgLDQwWi1s6QDVU4okFRXsR7P P7DnfSZvHM7Sp0kcivY0fqivsp2D4QAErP3xfOTJ8enJXdeMFIuzHXCc+c4wSO8y8K kSf0cgoU/fItw== From: Christian Brauner To: Linus Torvalds Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL for v6.7] vfs io updates Date: Fri, 27 Oct 2023 16:42:35 +0200 Message-Id: <20231027-vfs-io-82cd868e9b4f@brauner> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4203; i=brauner@kernel.org; h=from:subject:message-id; bh=bS0RKv9WrQ4+qTFajR4rqczirZYMqhCIdwgz1AYwIEk=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaRanzpzjdFP5IDQkfiD9x6btUcWKmVN2dZx/XiV9Hr17uS4 lS1WHaUsDGJcDLJiiiwO7Sbhcst5KjYbZWrAzGFlAhnCwMUpABMpDGL4K2JfWBvDWxY5u0bUV17YyW e22pKr971PCV3/Fpp6/fH9Awz/XRrTfmROncllfFR3wxOBYzumuBtITJz5ezv/k5qzohIerAA= X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 27 Oct 2023 07:43:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780920145397643859 X-GMAIL-MSGID: 1780920145397643859 Hey Linus, /* Summary */ This contain's David's iov_iter cleanup work to convert the iov_iter iteration macros to inline functions: * Remove last_offset from iov_iter as it was only used by ITER_PIPE. * Add a __user tag on copy_mc_to_user()'s dst argument on x86 to match that on powerpc and get rid of a sparse warning. * Convert iter->user_backed to user_backed_iter() in the sound PCM driver. * Convert iter->user_backed to user_backed_iter() in a couple of infiniband drivers. * Renumber the type enum so that the ITER_* constants match the order in iterate_and_advance*(). * Since the preceding patch puts UBUF and IOVEC at 0 and 1, change user_backed_iter() to just use the type value and get rid of the extra flag. * Convert the iov_iter iteration macros to always-inline functions to make the code easier to follow. It uses function pointers, but they get optimised away. * Move the check for ->copy_mc to _copy_from_iter() and copy_page_from_iter_atomic() rather than in memcpy_from_iter_mc() where it gets repeated for every segment. Instead, we check once and invoke a side function that can use iterate_bvec() rather than iterate_and_advance() and supply a different step function. * Move the copy-and-csum code to net/ where it can be in proximity with the code that uses it. * Fold memcpy_and_csum() in to its two users. * Move csum_and_copy_from_iter_full() out of line and merge in csum_and_copy_from_iter() since the former is the only caller of the latter. * Move hash_and_copy_to_iter() to net/ where it can be with its only caller. /* Testing */ clang: Debian clang version 16.0.6 (16) gcc: gcc (Debian 13.2.0-5) 13.2.0 All patches are based on v6.6-rc2 and have been sitting in linux-next. No build failures or warnings were observed. /* Conflicts */ At the time of creating this PR no merge conflicts were reported from linux-next and no merge conflicts showed up doing a test-merge with current mainline. The following changes since commit ce9ecca0238b140b88f43859b211c9fdfd8e5b70: Linux 6.6-rc2 (2023-09-17 14:40:24 -0700) are available in the Git repository at: git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.7.iov_iter for you to fetch changes up to b5f0e20f444cd150121e0ce912ebd3f2dabd12bc: iov_iter, net: Move hash_and_copy_to_iter() to net/ (2023-10-09 09:35:14 +0200) Please consider pulling these changes from the signed vfs-6.7.iov_iter tag. Thanks! Christian ---------------------------------------------------------------- vfs-6.7.iov_iter ---------------------------------------------------------------- David Howells (12): iov_iter: Remove last_offset from iov_iter as it was for ITER_PIPE iov_iter, x86: Be consistent about the __user tag on copy_mc_to_user() sound: Fix snd_pcm_readv()/writev() to use iov access functions infiniband: Use user_backed_iter() to see if iterator is UBUF/IOVEC iov_iter: Renumber ITER_* constants iov_iter: Derive user-backedness from the iterator type iov_iter: Convert iterate*() to inline funcs iov_iter: Don't deal with iter->copy_mc in memcpy_from_iter_mc() iov_iter, net: Move csum_and_copy_to/from_iter() to net/ iov_iter, net: Fold in csum_and_memcpy() iov_iter, net: Merge csum_and_copy_from_iter{,_full}() together iov_iter, net: Move hash_and_copy_to_iter() to net/ arch/x86/include/asm/uaccess.h | 2 +- arch/x86/lib/copy_mc.c | 8 +- drivers/infiniband/hw/hfi1/file_ops.c | 2 +- drivers/infiniband/hw/qib/qib_file_ops.c | 2 +- include/linux/iov_iter.h | 274 +++++++++++++++++++ include/linux/skbuff.h | 3 + include/linux/uio.h | 34 +-- lib/iov_iter.c | 437 ++++++++++--------------------- net/core/datagram.c | 75 +++++- net/core/skbuff.c | 40 +++ sound/core/pcm_native.c | 4 +- 11 files changed, 540 insertions(+), 341 deletions(-) create mode 100644 include/linux/iov_iter.h