{"id":2232301,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2232301/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/patch/20260504-safe_splice-v3-2-e5acf4c9193b@suse.com/","project":{"id":59,"url":"http://patchwork.ozlabs.org/api/1.1/projects/59/?format=json","name":"Linux Test Project development","link_name":"ltp","list_id":"ltp.lists.linux.it","list_email":"ltp@lists.linux.it","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260504-safe_splice-v3-2-e5acf4c9193b@suse.com>","date":"2026-05-04T09:51:01","name":"[v3,2/2] tee01, vmsplice01, af_alg08: Use SAFE_SPLICE()","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"9c851060a605902eb09ace9da3f9a539ca4654cb","submitter":{"id":83220,"url":"http://patchwork.ozlabs.org/api/1.1/people/83220/?format=json","name":"Andrea Cervesato","email":"andrea.cervesato@suse.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ltp/patch/20260504-safe_splice-v3-2-e5acf4c9193b@suse.com/mbox/","series":[{"id":502633,"url":"http://patchwork.ozlabs.org/api/1.1/series/502633/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/list/?series=502633","date":"2026-05-04T09:50:59","name":"Introduce SAFE_SPLICE()","version":3,"mbox":"http://patchwork.ozlabs.org/series/502633/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2232301/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2232301/checks/","tags":{},"headers":{"Return-Path":"<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>","X-Original-To":["incoming@patchwork.ozlabs.org","ltp@lists.linux.it"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ltp@picard.linux.it"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=MeXenIqz;\n\tdkim=fail reason=\"signature verification failed\" header.d=suse.de\n header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519\n header.b=ZOPx902m;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa\n header.b=MeXenIqz;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=ZOPx902m;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=213.254.12.146; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)","smtp-out2.suse.de;\n\tnone"],"Received":["from picard.linux.it (picard.linux.it [213.254.12.146])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8H3r37Zyz1yJ9\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 04 May 2026 19:51:52 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 796AB3E499E\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  4 May 2026 11:51:50 +0200 (CEST)","from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it\n [IPv6:2001:4b78:1:20::2])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 0BF373E6202\n for <ltp@lists.linux.it>; Mon,  4 May 2026 11:51:16 +0200 (CEST)","from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 89D2F60035F\n for <ltp@lists.linux.it>; Mon,  4 May 2026 11:51:15 +0200 (CEST)","from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out2.suse.de (Postfix) with ESMTPS id 9DF415C22A;\n Mon,  4 May 2026 09:51:05 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7EC18593A7;\n Mon,  4 May 2026 09:51:05 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id KDrgHAls+GkOOgAAD6G6ig\n (envelope-from <andrea.cervesato@suse.de>); Mon, 04 May 2026 09:51:05 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777888265;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=+SpRQ4qpNPy0kvh3ohCifi35j0wJQC/8cs2SjjAhawg=;\n b=MeXenIqzK8ZUn0wcPMHECGl6jg1KpRYqo+//XrGZmd5gA6XVwSJ/WadzdBH1nKtUkVOKbZ\n POkgPgNzsvS6X3u2e1Pc+KJxmkiKuMOZoVhdhbzmcTsn4z3YPvFFU0hFp8iwWY3rlhLnNB\n SRfmJUnsX/c6G+xkAlxn8SfjyU9o9UY=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777888265;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=+SpRQ4qpNPy0kvh3ohCifi35j0wJQC/8cs2SjjAhawg=;\n b=ZOPx902mMo1KF+rOupmPabwWf0ntCqKzcWCF+JKY1fa9dzUER98S4OubZIV9fL8fcD0qkh\n 6nujwSCf/vVFyNAg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777888265;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=+SpRQ4qpNPy0kvh3ohCifi35j0wJQC/8cs2SjjAhawg=;\n b=MeXenIqzK8ZUn0wcPMHECGl6jg1KpRYqo+//XrGZmd5gA6XVwSJ/WadzdBH1nKtUkVOKbZ\n POkgPgNzsvS6X3u2e1Pc+KJxmkiKuMOZoVhdhbzmcTsn4z3YPvFFU0hFp8iwWY3rlhLnNB\n SRfmJUnsX/c6G+xkAlxn8SfjyU9o9UY=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777888265;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=+SpRQ4qpNPy0kvh3ohCifi35j0wJQC/8cs2SjjAhawg=;\n b=ZOPx902mMo1KF+rOupmPabwWf0ntCqKzcWCF+JKY1fa9dzUER98S4OubZIV9fL8fcD0qkh\n 6nujwSCf/vVFyNAg=="],"From":"Andrea Cervesato <andrea.cervesato@suse.de>","Date":"Mon, 04 May 2026 11:51:01 +0200","MIME-Version":"1.0","Message-Id":"<20260504-safe_splice-v3-2-e5acf4c9193b@suse.com>","References":"<20260504-safe_splice-v3-0-e5acf4c9193b@suse.com>","In-Reply-To":"<20260504-safe_splice-v3-0-e5acf4c9193b@suse.com>","To":"Linux Test Project <ltp@lists.linux.it>","X-Mailer":"b4 0.14.2","X-Developer-Signature":"v=1; a=ed25519-sha256; t=1777888265; l=3135;\n i=andrea.cervesato@suse.com; s=20251210; h=from:subject:message-id;\n bh=QyWpNceZhIXG0vSHJXxO1KOLkeq+codbGWmzquD+9Mg=;\n b=/1gbtpXeZf0Id91ObC/op51j9PNjsSJzGnNM/ZkU4HWBmmXNUj5wMQbp03ke5GxpXcJr+ZrDa\n uGngEsI3SyfBX1I4aCMV7Od2KVdwrpQ2aRCJFO1AT/LrFQkgN2HKZp4","X-Developer-Key":"i=andrea.cervesato@suse.com; a=ed25519;\n pk=zKY+6GCauOiuHNZ//d8PQ/UL4jFCTKbXrzXAOQSLevI=","X-Spamd-Result":"default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n NEURAL_HAM_LONG(-1.00)[-1.000];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n TO_DN_ALL(0.00)[];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[];\n RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[];\n FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];\n RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[];\n DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid, suse.com:email,\n imap1.dmz-prg2.suse.org:helo]","X-Spam-Score":"-4.30","X-Spam-Level":"","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE,SPF_PASS\n shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-2.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-2.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"[LTP] [PATCH v3 2/2] tee01, vmsplice01, af_alg08: Use SAFE_SPLICE()","X-BeenThere":"ltp@lists.linux.it","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux Test Project <ltp.lists.linux.it>","List-Unsubscribe":"<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>","List-Archive":"<http://lists.linux.it/pipermail/ltp/>","List-Post":"<mailto:ltp@lists.linux.it>","List-Help":"<mailto:ltp-request@lists.linux.it?subject=help>","List-Subscribe":"<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"},"content":"From: Andrea Cervesato <andrea.cervesato@suse.com>\n\nReplace raw splice() calls with SAFE_SPLICE() in tests where splice is\nutility plumbing, not the subject of testing.\n\nSigned-off-by: Andrea Cervesato <andrea.cervesato@suse.com>\n---\n testcases/kernel/crypto/af_alg08.c              | 9 ++-------\n testcases/kernel/syscalls/tee/tee01.c           | 8 ++------\n testcases/kernel/syscalls/vmsplice/vmsplice01.c | 5 +----\n 3 files changed, 5 insertions(+), 17 deletions(-)","diff":"diff --git a/testcases/kernel/crypto/af_alg08.c b/testcases/kernel/crypto/af_alg08.c\nindex 7b95984448bdc5afd3b995a98c3d81ef12e37067..5e04b579c1db464fc5b4f33fd4e13a29709bba79 100644\n--- a/testcases/kernel/crypto/af_alg08.c\n+++ b/testcases/kernel/crypto/af_alg08.c\n@@ -96,13 +96,8 @@ static void try_corrupt(void)\n \n \tSAFE_PIPE(pipefd);\n \n-\tTEST(splice(file_fd, &off_in, pipefd[1], NULL, OVERWRITE_SIZE, 0));\n-\tif (TST_RET < 0)\n-\t\ttst_brk(TBROK | TTERRNO, \"splice(file -> pipe)\");\n-\n-\tTEST(splice(pipefd[0], NULL, reqfd, NULL, OVERWRITE_SIZE, 0));\n-\tif (TST_RET < 0)\n-\t\ttst_brk(TBROK | TTERRNO, \"splice(pipe -> AF_ALG)\");\n+\tSAFE_SPLICE(file_fd, &off_in, pipefd[1], NULL, OVERWRITE_SIZE, 0);\n+\tSAFE_SPLICE(pipefd[0], NULL, reqfd, NULL, OVERWRITE_SIZE, 0);\n \n \t/* Expected to fail (invalid ciphertext); triggers the scratch write */\n \tTST_EXP_FAIL_SILENT(recv(reqfd, recvbuf, sizeof(recvbuf), 0), EBADMSG);\ndiff --git a/testcases/kernel/syscalls/tee/tee01.c b/testcases/kernel/syscalls/tee/tee01.c\nindex d1489d0453f11faab41ab6e8e2dabbb372566f60..436c52a201689e4ffa97f217fd3b1d14e6b6ec36 100644\n--- a/testcases/kernel/syscalls/tee/tee01.c\n+++ b/testcases/kernel/syscalls/tee/tee01.c\n@@ -58,17 +58,13 @@ static void tee_test(void)\n \tSAFE_PIPE(pipe1);\n \tSAFE_PIPE(pipe2);\n \n-\tret = splice(fd_in, NULL, pipe1[1], NULL, TEST_BLOCK_SIZE, 0);\n-\tif (ret < 0)\n-\t\ttst_brk(TBROK | TERRNO, \"splice(fd_in, pipe1) failed\");\n+\tSAFE_SPLICE(fd_in, NULL, pipe1[1], NULL, TEST_BLOCK_SIZE, 0);\n \n \tret = tee(pipe1[0], pipe2[1], TEST_BLOCK_SIZE, SPLICE_F_NONBLOCK);\n \tif (ret < 0)\n \t\ttst_brk(TBROK | TERRNO, \"tee() failed\");\n \n-\tret = splice(pipe2[0], NULL, fd_out, NULL, TEST_BLOCK_SIZE, 0);\n-\tif (ret < 0)\n-\t\ttst_brk(TBROK | TERRNO, \"splice(pipe2, fd_out) failed\");\n+\tSAFE_SPLICE(pipe2[0], NULL, fd_out, NULL, TEST_BLOCK_SIZE, 0);\n \n \tSAFE_CLOSE(pipe2[0]);\n \tSAFE_CLOSE(pipe2[1]);\ndiff --git a/testcases/kernel/syscalls/vmsplice/vmsplice01.c b/testcases/kernel/syscalls/vmsplice/vmsplice01.c\nindex 17486179baa2a897c2efbf0d2b4d39273788aadc..64eed8391797fb01b14c548ebcfe390a403da5ec 100644\n--- a/testcases/kernel/syscalls/vmsplice/vmsplice01.c\n+++ b/testcases/kernel/syscalls/vmsplice/vmsplice01.c\n@@ -50,7 +50,6 @@ static void vmsplice_test(void)\n {\n \tint pipes[2];\n \tlong written;\n-\tint ret;\n \tint fd_out;\n \tstruct iovec v;\n \tloff_t offset;\n@@ -85,9 +84,7 @@ static void vmsplice_test(void)\n \t\t\t}\n \t\t}\n \n-\t\tret = splice(pipes[0], NULL, fd_out, &offset, written, 0);\n-\t\tif (ret < 0)\n-\t\t\ttst_brk(TBROK | TERRNO, \"splice() failed\");\n+\t\tSAFE_SPLICE(pipes[0], NULL, fd_out, &offset, written, 0);\n \t\t//printf(\"offset = %lld\\n\", (long long)offset);\n \t}\n \n","prefixes":["v3","2/2"]}