Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2222588/?format=api
{ "id": 2222588, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222588/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20260413062002.20324-1-wegao@suse.com/", "project": { "id": 59, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260413062002.20324-1-wegao@suse.com>", "list_archive_url": null, "date": "2026-04-13T06:19:53", "name": "[v2] shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation", "commit_ref": null, "pull_url": null, "state": "needs-review-ack", "archived": false, "hash": "fd6d121785e3391eee944c9ea13304233f87d195", "submitter": { "id": 85577, "url": "http://patchwork.ozlabs.org/api/1.2/people/85577/?format=api", "name": "Wei Gao", "email": "wegao@suse.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/20260413062002.20324-1-wegao@suse.com/mbox/", "series": [ { "id": 499648, "url": "http://patchwork.ozlabs.org/api/1.2/series/499648/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=499648", "date": "2026-04-13T06:19:53", "name": "[v2] shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/499648/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222588/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2222588/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=CLZADAQQ;\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=cpNYBZsZ;\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) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvHML3Wzwz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 16:20:14 +1000 (AEST)", "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id E65913DC6D1\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 08:20:11 +0200 (CEST)", "from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.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 E19523DC6D1\n for <ltp@lists.linux.it>; Mon, 13 Apr 2026 08:20:06 +0200 (CEST)", "from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n [IPv6:2a00:1450:4864:20::331])\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-2.smtp.seeweb.it (Postfix) with ESMTPS id EB98C60011F\n for <ltp@lists.linux.it>; Mon, 13 Apr 2026 08:20:05 +0200 (CEST)", "by mail-wm1-x331.google.com with SMTP id\n 5b1f17b1804b1-4852b81c73aso37851695e9.3\n for <ltp@lists.linux.it>; Sun, 12 Apr 2026 23:20:05 -0700 (PDT)", "from localhost ([2a07:de40:b240:0:2ad6:ed42:2ad6:ed42])\n by smtp.gmail.com with UTF8SMTPSA id\n 5b1f17b1804b1-488d5380feesm332418555e9.9.2026.04.12.23.20.04\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 12 Apr 2026 23:20:04 -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=1776061211; 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 : cc : content-type :\n content-transfer-encoding : sender : from;\n bh=VQU2VIJL67B/3Xq9XhDDWMZU02mQXWBE01Vs+QjRDuc=;\n b=CLZADAQQVYHtDrQ/oSIKEBHi+2ls9uDAmUZTS6qpHLS4qUJVreDSIfHMDdKHXpkvaiqIc\n wpRdWe5ujE4Sd1AHEBbaj0ahBbzcubt5sLjPo/k0pt6HjCBVM+qO/No5f7qDnm4misBU++k\n BzliYXpkuTh1uyMm7y8gtTlCkNTO4Mk=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=suse.com; s=google; t=1776061205; x=1776666005; 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=/Fi1tV/kcSvfaPXhGwMCK1pn47NjYCFUWkTRTcNfbxE=;\n b=cpNYBZsZIXFckazmGQwbhjFRYef8zNNy4ZK03pp4fdwGFQZZwrCrAG5yKBgQXXcvkA\n 1GOrHVRAGGlugt/lg7GaeihC/bFs89T8J8EVqASTVJjfUVQXkP6xnpzW2AGjq/nfXpSW\n b4RFVUUijDb3HkdxWsO2xE/ZK7Pxrqknpe+xQ1EQyWqje0cSY6dZufLYKlZPkMyHlZRU\n 4SzjsJQCvN+PN+CyMJlBq+wM9X8SKpc7KV2d/RUFfSRIIBZZnVjDNKh7IGHEXfNLXaKT\n 4dYwm0Z4iBFvcxF+4P/wNBzMYZQUankJ1PKFoTPcF2lIM4duVzRtFP3yTou84Qh6HPxx\n Byyw==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776061205; x=1776666005;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=/Fi1tV/kcSvfaPXhGwMCK1pn47NjYCFUWkTRTcNfbxE=;\n b=pRfc3mcLkGisfe2DQ1hIfD7k3elmmEwYZsEfPNAMV1TXBrxg5AtJUsTTbjo7aW3e/l\n v0128oGWc/qHTUlO/6e3/kn88dDqdyFcf3jnP+zcR1aRZZ9bgxsl+vV+0+yrb+a4qk5v\n mvDB78yZAtlxNsJxm01coQBvFPGWaqb4aenl4VTeZnRwClrHzdYwdp8BiGuTtl6T6Xqt\n AkzDQzxXcWgbDsdy0hPJKOfR5yIWfBsf0l3wTLlauD0mJktqQvQFCUMUWHne+vtjLuzg\n 7RpoV3Gu2aBVizdyB4U7KfBWM0S4rptMKiI5IY1GYZ0IWH+irGKAetw25b7WiLHMi0FR\n Cb8Q==", "X-Gm-Message-State": "AOJu0Ywz50sQvWzQFu2PYsxDLsLtBHvrm/mr58vdZBDQYHLI+glcIEcg\n zSFSMrNn9LpWKVaxQxqPVzqQdqcIt3I5+slKjceDMuwOlWPJu8yY8YLJ+xvsD/1MfkSIyUWwg0G\n ODVE=", "X-Gm-Gg": "AeBDiesw21RRDv5nLGLqonvEH8YZLodId5zeNPxMFVB5WvywN1Cfnd92chg7wCIq9zX\n LLfzUVdr7bEXE3lpPA8BhZXhy4DHDEq5i5zsdnhl8KONwhuW0y/77TsjqZ5B41wUcjuYPnZkb84\n YDWHQHdD2mzUNqnxXb4KXMzyAsLKBUSbpp5ibNYP3iUYA8bBFRe2qKIVANllIRPkkKW5jSsNu8o\n 8Gk5uLUl6yaDva2vDelYo81M4eKQ8HVzr98RQVzs1l/vnZx6/S/kOqbNWZH4PAWP9vaUmiiel20\n IY+YU98ZYhArvFtQ99GHvn/svApEVNfZiu8Fu3Pm2z+79hqMseu0BP8skQGG2WMDei45+PGyH0F\n uI+o/Mqvlwy3ORGULk7eUGXApv49VEyy5JAQjtu9TXm3SRxeetnrfHTkHAJQCaW0MCiiIcHdb+M\n IBWy9o2DVCI/k=", "X-Received": "by 2002:a05:600c:890e:b0:485:3dfc:569 with SMTP id\n 5b1f17b1804b1-488d683665dmr106013315e9.16.1776061204807;\n Sun, 12 Apr 2026 23:20:04 -0700 (PDT)", "To": "ltp@lists.linux.it", "Date": "Mon, 13 Apr 2026 06:19:53 +0000", "Message-ID": "<20260413062002.20324-1-wegao@suse.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260407092616.15563-1-wegao@suse.com>", "References": "<20260407092616.15563-1-wegao@suse.com>", "MIME-Version": "1.0", "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 v2] shmctl03: Fix 32-bit compat mode failure by\n adjusting comparisons for compat mode truncation", "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>", "Cc": "Dan Carpenter <dan.carpenter@linaro.org>", "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": "On 64-bit kernels, the default shmmax and shmall values often exceed\nthe range of a 32-bit unsigned long or are clipped differently by the\nkernel's compat syscall layer than they appear in /proc.\n\nLink: https://lore.kernel.org/ltp/aJm5SBOaRoe1e0PB@yuki.lan/\nSigned-off-by: Wei Gao <wegao@suse.com>\nSuggested-by: Cyril Hrubis <chrubis@suse.cz>\nReported-by: Dan Carpenter <dan.carpenter@linaro.org>\n---\n include/tst_assert.h | 10 ++++---\n lib/tst_assert.c | 26 ++++++++++++++-----\n .../kernel/syscalls/ipc/shmctl/shmctl03.c | 12 ++++++---\n 3 files changed, 36 insertions(+), 12 deletions(-)", "diff": "diff --git a/include/tst_assert.h b/include/tst_assert.h\nindex dcb62dfea..5b3bd0e12 100644\n--- a/include/tst_assert.h\n+++ b/include/tst_assert.h\n@@ -21,14 +21,18 @@ void tst_assert_int(const char *file, const int lineno,\n #define TST_ASSERT_FILE_INT(path, prefix, val) \\\n \ttst_assert_file_int(__FILE__, __LINE__, path, prefix, val)\n \n+#define TST_ASSERT_SATURATED_INT 0x01\n+#define TST_ASSERT_SATURATED_ULONG 0x02\n+#define TST_ASSERT_BITWISE 0x04\n+\n /*\n * Same as tst_assert_int() but for unsigned long.\n */\n void tst_assert_ulong(const char *file, const int lineno,\n- const char *path, unsigned long val);\n+ const char *path, unsigned long val, int flags);\n \n-#define TST_ASSERT_ULONG(path, val) \\\n-\ttst_assert_ulong(__FILE__, __LINE__, path, val)\n+#define TST_ASSERT_ULONG(path, val, ...) \\\n+\ttst_assert_ulong(__FILE__, __LINE__, path, val, (0, ##__VA_ARGS__))\n \n /*\n * Asserts that integer value stored in the prefix field of file pointed by path\ndiff --git a/lib/tst_assert.c b/lib/tst_assert.c\nindex b68bd5d39..1598244c0 100644\n--- a/lib/tst_assert.c\n+++ b/lib/tst_assert.c\n@@ -5,6 +5,7 @@\n * Copyright (c) 2020 Cyril Hrubis <chrubis@suse.cz>\n */\n #include <stdio.h>\n+#include <limits.h>\n #define TST_NO_DEFAULT_MAIN\n #include \"tst_assert.h\"\n #include \"tst_test.h\"\n@@ -23,18 +24,31 @@ void tst_assert_int(const char *file, const int lineno, const char *path, int va\n \ttst_res_(file, lineno, TFAIL, \"%s != %d got %d\", path, val, sys_val);\n }\n \n-void tst_assert_ulong(const char *file, const int lineno, const char *path, unsigned long val)\n+void tst_assert_ulong(const char *file, const int lineno, const char *path,\n+\t\t\tunsigned long val, int flags)\n {\n-\tunsigned long sys_val;\n-\n-\tsafe_file_scanf(file, lineno, NULL, path, \"%lu\", &sys_val);\n+\tunsigned long long sys_val_64;\n+\tunsigned long expected_val;\n+\n+\tsafe_file_scanf(file, lineno, NULL, path, \"%llu\", &sys_val_64);\n+\n+\tif (flags & TST_ASSERT_SATURATED_INT) {\n+\t\texpected_val = (sys_val_64 > (unsigned long long)INT_MAX) ? (unsigned long)INT_MAX : (unsigned long)sys_val_64;\n+\t} else if (flags & TST_ASSERT_SATURATED_ULONG) {\n+\t\texpected_val = (sys_val_64 > (unsigned long long)UINT_MAX) ? (unsigned long)UINT_MAX : (unsigned long)sys_val_64;\n+\t} else if (flags & TST_ASSERT_BITWISE) {\n+\t\texpected_val = (unsigned long)(sys_val_64 & 0xFFFFFFFFULL);\n+\t} else {\n+\t\texpected_val = (unsigned long)sys_val_64;\n+\t}\n \n-\tif (val == sys_val) {\n+\tif (val == expected_val) {\n \t\ttst_res_(file, lineno, TPASS, \"%s = %lu\", path, val);\n \t\treturn;\n \t}\n \n-\ttst_res_(file, lineno, TFAIL, \"%s != %lu got %lu\", path, val, sys_val);\n+\ttst_res_(file, lineno, TFAIL, \"%s != %lu got %lu (raw: %llu)\",\n+\t\tpath, val, expected_val, sys_val_64);\n }\n \n void tst_assert_file_int(const char *file, const int lineno, const char *path, const char *prefix, int val)\ndiff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c\nindex a1f53e7c1..6d073789c 100644\n--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c\n+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c\n@@ -30,9 +30,15 @@ static void verify_ipcinfo(void)\n \telse\n \t\ttst_res(TPASS, \"shmmin = 1\");\n \n-\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmmax\", info.shmmax);\n-\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmmni\", info.shmmni);\n-\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmall\", info.shmall);\n+\tif (tst_is_compat_mode()) {\n+\t\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmmax\", info.shmmax, TST_ASSERT_SATURATED_INT);\n+\t\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmmni\", info.shmmni, TST_ASSERT_BITWISE);\n+\t\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmall\", info.shmall, TST_ASSERT_BITWISE);\n+\t} else {\n+\t\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmmax\", info.shmmax);\n+\t\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmmni\", info.shmmni);\n+\t\tTST_ASSERT_ULONG(\"/proc/sys/kernel/shmall\", info.shmall);\n+\t}\n }\n \n static struct tst_test test = {\n", "prefixes": [ "v2" ] }