Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2113533/?format=api
{ "id": 2113533, "url": "http://patchwork.ozlabs.org/api/patches/2113533/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20250721142531.2223584-1-wegao@suse.com/", "project": { "id": 59, "url": "http://patchwork.ozlabs.org/api/projects/59/?format=api", "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": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20250721142531.2223584-1-wegao@suse.com>", "list_archive_url": null, "date": "2025-07-21T14:25:23", "name": "[v2] splice10.c: New splice tests involving memfd secret", "commit_ref": null, "pull_url": null, "state": "under-review", "archived": false, "hash": "4966474e8daa2bcd9a16caf31aae08501973c454", "submitter": { "id": 85577, "url": "http://patchwork.ozlabs.org/api/people/85577/?format=api", "name": "Wei Gao", "email": "wegao@suse.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/20250721142531.2223584-1-wegao@suse.com/mbox/", "series": [ { "id": 465959, "url": "http://patchwork.ozlabs.org/api/series/465959/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=465959", "date": "2025-07-21T14:25:23", "name": "[v2] splice10.c: New splice tests involving memfd secret", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/465959/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2113533/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2113533/checks/", "tags": {}, "related": [], "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=pass (1024-bit key;\n unprotected) header.d=lists.linux.it header.i=@lists.linux.it\n header.a=rsa-sha256 header.s=picard header.b=hSovTI9+;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256\n header.s=google header.b=fBbxAubb;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4blkmJ6B1fz1xsp\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 21 Jul 2025 12:26:24 +1000 (AEST)", "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 2A03F3CCAF5\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 21 Jul 2025 04:26:33 +0200 (CEST)", "from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7])\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 723CA3CC5C0\n for <ltp@lists.linux.it>; Mon, 21 Jul 2025 04:26:29 +0200 (CEST)", "from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com\n [IPv6:2a00:1450:4864:20::42a])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 73C942002C8\n for <ltp@lists.linux.it>; Mon, 21 Jul 2025 04:26:28 +0200 (CEST)", "by mail-wr1-x42a.google.com with SMTP id\n ffacd0b85a97d-3a50956e5d3so2917132f8f.1\n for <ltp@lists.linux.it>; Sun, 20 Jul 2025 19:26:28 -0700 (PDT)", "from localhost ([202.127.77.110])\n by smtp.gmail.com with UTF8SMTPSA id\n 98e67ed59e1d1-31cc3f161f8sm5078129a91.26.2025.07.20.19.26.26\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 20 Jul 2025 19:26:27 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=lists.linux.it;\n i=@lists.linux.it; q=dns/txt; s=picard; t=1753064793; h=to : date :\n message-id : in-reply-to : references : mime-version : subject :\n list-id : list-unsubscribe : list-archive : list-post : list-help :\n list-subscribe : from : reply-to : content-type :\n content-transfer-encoding : sender : from;\n bh=UecUw0OIe95nvoTfwqoA1GESa7d54vt5FcbNX1vI29w=;\n b=hSovTI9+J7XJSf1v9pr/lvbM/9E9dJGzDJRxlePxBSQ1sNyxK7RnVYPURMk6CKvf/18aO\n AD9Jl/3zwfgL9u36n1g5x3sJ92/fMdXac8IbDAu/c9jmPvwbh1Qatogkso438kLcqbcx26f\n cd9V48v/Nkul45PeRdAfz0U7A1Q6ewM=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=suse.com; s=google; t=1753064788; x=1753669588; darn=lists.linux.it;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=TJZqcW8a8r4K53GNw8Xe8eykfM7Hn3e7jcr/eui/lw8=;\n b=fBbxAubboANmM7Qe4N4GnD6cL+5u3wXvsTs+5IjLtfUfE3DMN1w6qt2MwdJofBag7j\n GdCPZLUoAJSEaZm1u9lUNhorn8hvPTDsthpRC5wRquLV1+t7HCU/AdTIho00kqQZfgO0\n 6oWJ86c2iCKrNJXYMr41RjWM1pbczpsPMMTJ2NP/ClRFHeKut+2jiN6Ew0MS9FUvrlx+\n kJFfwIav+xginfGFNiw3q/i+C2hPnOIPBxXXpM4s0dAAXviCf7auh2I3tPhTTOcdIPJ9\n 3AGCigvdRc3+vk+cyNVMiVDAE57uSA6CCPKeqvf7JZrT7xuh+dzH7mkmYr14/X6oXI2Q\n HEwg==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1753064788; x=1753669588;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=TJZqcW8a8r4K53GNw8Xe8eykfM7Hn3e7jcr/eui/lw8=;\n b=KrYen5rcDPzE4r1ClxFtWJCRAHCcaS7TLDuNpGq0ztx2MhsAtinCbbUdXQC50tqckj\n BgyIfPyVfgNi+3aUb7YaEdXScBeiY8GlbSHAkwXt2xqM1eMTAzLHWjNyRdrFY0kyHDaP\n /nsDlJFgLSQtS2OYt/Cv+ep4gmXlpYllRj2w+rHzj9w93ERF/EL5/SPNtV5QIHnt8p01\n UGjufQo09syysO6NZFdRT7+w9IK580YxLRTjPxtrM4CnX6yjccWPS4e4qamkEHVQH8bJ\n e6TK9FBBCQ3HFCIkyV7/icx4crijAaiokzX0+ABEtebfef9D8DmfAe7EIUMb9DohwATe\n xmzA==", "X-Gm-Message-State": "AOJu0Yz7YubwjgKNsJY+FCtwCOupAKyhQZ1LLR5QZkQBPKsqBiABR2dv\n cOSYEGQ7lCE4yW1Wu0R2A/1ycaaQs7nwpUIlo1t9FW68Wy0bWuGvjQgHBlQ6nZerPRahRiC9P+S\n 9zCs=", "X-Gm-Gg": "ASbGnctku+rWhrmFfVZ6kf6SF6EUjMq8Y/4SNKznZs22wF6UkdmZgTJe12Aka2JmilI\n KXv2u6eOa7pIyQ+qDqjs+BfVZi0wlop1B7I1IZpTRqq9x9JxGh6oPG4w2AEgSfO9pi+xhekLRCe\n O4mDmbmisxLPWBkY68IlNIz9EobNfoU4oNgXu9d/3eujRAU7VYGw+kEgLoWDF0PycP7pB0bNhB5\n 62/ZvKNmrpNGm9qVeUH38OhbOOxBip9sFlQoSeI7GbdkXxCi9CCCc17IJjH/42ZlGNFFwSJJKap\n nb0PKR94VX+J/Uuh5BW+nVYjExIA3fX8k4v3hVME3y7SpF6uko4JPxaA8y87g9KpTOsMHZx7is6\n 7gbM18Jr1mWk=", "X-Google-Smtp-Source": "\n AGHT+IG25IjARmOo0z9riT7lUYvwcVpcqExfsSQ9/krVtGCslyjRCW2Sj+iV8IayGGQAkNP3gJg5UQ==", "X-Received": "by 2002:a5d:5d85:0:b0:3a6:ec41:b9df with SMTP id\n ffacd0b85a97d-3b60dd82984mr14118541f8f.49.1753064787679;\n Sun, 20 Jul 2025 19:26:27 -0700 (PDT)", "To": "ltp@lists.linux.it", "Date": "Mon, 21 Jul 2025 10:25:23 -0400", "Message-ID": "<20250721142531.2223584-1-wegao@suse.com>", "X-Mailer": "git-send-email 2.49.0", "In-Reply-To": "<20250716120600.2855395-1-wegao@suse.com>", "References": "<20250716120600.2855395-1-wegao@suse.com>", "MIME-Version": "1.0", "X-Spam-Status": "No, score=0.1 required=7.0 tests=DATE_IN_FUTURE_06_12,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS shortcircuit=no autolearn=disabled version=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on in-7.smtp.seeweb.it", "X-Virus-Scanned": "clamav-milter 1.0.7 at in-7.smtp.seeweb.it", "X-Virus-Status": "Clean", "Subject": "[LTP] [PATCH v2] splice10.c: New splice tests involving memfd secret", "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>", "From": "Wei Gao via ltp <ltp@lists.linux.it>", "Reply-To": "Wei Gao <wegao@suse.com>", "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": "Linux commit cbe4134ea4bc (\"fs: export anon_inode_make_secure_inode() and fix\nsecretmem LSM bypass\") prevents any access to secret memory pages from other\nkernel subsystems.\n\nSplice operations involving memfd secret are checked within this case.\n\nDiscussed-on: https://lists.linux.it/pipermail/ltp/2025-July/044351.html\nReference: cbe4134ea4bc (\"fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass\")\nSigned-off-by: Wei Gao <wegao@suse.com>\n---\n runtest/syscalls | 1 +\n testcases/kernel/syscalls/splice/.gitignore | 1 +\n testcases/kernel/syscalls/splice/splice10.c | 72 +++++++++++++++++++++\n 3 files changed, 74 insertions(+)\n create mode 100644 testcases/kernel/syscalls/splice/splice10.c", "diff": "diff --git a/runtest/syscalls b/runtest/syscalls\nindex b4a387b28..d6da59bd2 100644\n--- a/runtest/syscalls\n+++ b/runtest/syscalls\n@@ -1585,6 +1585,7 @@ splice06 splice06\n splice07 splice07\n splice08 splice08\n splice09 splice09\n+splice10 splice10\n \n tee01 tee01\n tee02 tee02\ndiff --git a/testcases/kernel/syscalls/splice/.gitignore b/testcases/kernel/syscalls/splice/.gitignore\nindex 96b1727a1..5e98981fe 100644\n--- a/testcases/kernel/syscalls/splice/.gitignore\n+++ b/testcases/kernel/syscalls/splice/.gitignore\n@@ -7,3 +7,4 @@\n /splice07\n /splice08\n /splice09\n+/splice10\ndiff --git a/testcases/kernel/syscalls/splice/splice10.c b/testcases/kernel/syscalls/splice/splice10.c\nnew file mode 100644\nindex 000000000..871899b3f\n--- /dev/null\n+++ b/testcases/kernel/syscalls/splice/splice10.c\n@@ -0,0 +1,72 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+/*\n+ * Copyright (C) 2025 Wei Gao <wegao@suse.com>\n+ */\n+\n+/*\\\n+ * Test if splice syscall prevents any access to secret memory pages from\n+ * other kernel subsystems.\n+ *\n+ * Reference kernel commit:\n+ * commit cbe4134ea4bc493239786220bd69cb8a13493190\n+ * Author: Shivank Garg <shivankg@amd.com>\n+ * Date: Fri Jun 20 07:03:30 2025 +0000\n+ *\n+ * fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass\n+ */\n+\n+#define _GNU_SOURCE\n+#include \"tst_test.h\"\n+#include \"lapi/syscalls.h\"\n+\n+static char *buf;\n+static int fd = -1;\n+static int pipefd[2] = {-1, -1};\n+\n+static void verify_splice(void)\n+{\n+\tSAFE_WRITE(1, pipefd[1], buf, sizeof(buf));\n+\n+\tTST_EXP_FAIL(splice(pipefd[0], NULL, fd, NULL, sizeof(buf), 0), EACCES);\n+\tTST_EXP_FAIL(splice(fd, NULL, pipefd[1], NULL, sizeof(buf), 0), EACCES);\n+}\n+\n+static void setup(void)\n+{\n+\tif (!tst_selinux_enforcing())\n+\t\ttst_brk(TCONF, \"SELinux not running\");\n+\n+\tfd = syscall(__NR_memfd_secret, 0);\n+\tif (fd < 0) {\n+\t\ttst_brk(TCONF | TERRNO,\n+\t\t\t\"Skipping __NR_memfd_secret check\");\n+\t}\n+\n+\tSAFE_PIPE(pipefd);\n+}\n+\n+static void cleanup(void)\n+{\n+\tfor (int i = 0; i < 2; i++) {\n+\t\tif (pipefd[i] >= 0)\n+\t\t\tSAFE_CLOSE(pipefd[i]);\n+\t}\n+\n+\tif (fd >= 0)\n+\t\tSAFE_CLOSE(fd);\n+}\n+\n+static struct tst_test test = {\n+\t.setup = setup,\n+\t.cleanup = cleanup,\n+\t.test_all = verify_splice,\n+\t.min_kver = \"6.16\",\n+\t.bufs = (struct tst_buffers []) {\n+\t\t{&buf, .size = 1024},\n+\t\t{}\n+\t},\n+\t.tags = (const struct tst_tag[]) {\n+\t\t{\"linux-git\", \"cbe4134ea4b\"},\n+\t\t{}\n+\t}\n+};\n", "prefixes": [ "v2" ] }