From patchwork Tue Nov 28 22:27:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 13471909 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.b="dG3HqqGR" Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C4E885 for ; Tue, 28 Nov 2023 14:28:08 -0800 (PST) Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.17.1.19/8.17.1.19) with ESMTP id 3ASMGMfm014696 for ; Tue, 28 Nov 2023 14:28:07 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=x1zlHo3Q0pSUeyHRtLLKebQeFEuwDiMtVQDgTgJdZPI=; b=dG3HqqGRFHXTBBk8APEbObBCyu6vU73Q5nDlkLQx6qbOii2BB8NLtdrkPx6jHU/HUkQM EUnowuO0q6U0Ts75TU2c+HbFYwlmgBOPaw+e1k2d/3OXDJCTD4nM6L1vQDEgBkmsbyHC oDeRHnfPFriji3t4PyJzlM25VDjaetmAzQ6Xgy8DVscC7UpNEmyEYhCEMvxqERyrgskj PQkMNdZFJ/z7xW6GjzhB8fPsTdi5TFDdScoqYV9T2IzLROyJabEjC52eBw1AOagk35FV Y/1HzQWe6v552XUrq1fzRFAh8Prclt+KM/lUycE3DHOLADv5vUroJQnmL+y5IRPvIV3E eA== Received: from mail.thefacebook.com ([163.114.132.120]) by m0089730.ppops.net (PPS) with ESMTPS id 3unf81cty6-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 28 Nov 2023 14:28:07 -0800 Received: from twshared34392.14.frc2.facebook.com (2620:10d:c085:108::8) by mail.thefacebook.com (2620:10d:c085:11d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 28 Nov 2023 14:28:05 -0800 Received: by devbig007.nao1.facebook.com (Postfix, from userid 544533) id 3AE362252F0C0; Tue, 28 Nov 2023 14:27:53 -0800 (PST) From: Keith Busch To: , , CC: , , , , , Keith Busch Subject: [PATCHv4 0/4] block integrity: directly map user space addresses Date: Tue, 28 Nov 2023 14:27:48 -0800 Message-ID: <20231128222752.1767344-1-kbusch@meta.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-GUID: 5ttxMssCP44LYMZ3wjqz8W7yuSFAWcP4 X-Proofpoint-ORIG-GUID: 5ttxMssCP44LYMZ3wjqz8W7yuSFAWcP4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-28_24,2023-11-27_01,2023-05-22_02 From: Keith Busch Handling passthrough metadata ("integrity") today introduces overhead and complications that we can avoid if we just map user space addresses directly. This patch series implements that, falling back to a kernel bounce buffer if necessary. v3->v4: Code organization suggestions (Jens, Christoph) Spelling and unnecessary punctionation (Anuj) Open code the final user page unpin (Ming) Eliminate another allocation for the bounce copy by moving the bvec into the bip rather than just a pointer to it (me) Keith Busch (4): block: bio-integrity: directly map user buffers nvme: use bio_integrity_map_user iouring: remove IORING_URING_CMD_POLLED io_uring: remove uring_cmd cookie block/bio-integrity.c | 203 ++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/ioctl.c | 197 ++++++------------------------------ include/linux/bio.h | 9 ++ include/linux/io_uring.h | 9 +- io_uring/uring_cmd.c | 1 - 5 files changed, 243 insertions(+), 176 deletions(-) Reviewed-by: Martin K. Petersen