{"id":2229523,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2229523/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/patch/91e8e5a0259ba981e530d099eb053395d8991177.1777377311.git.sayalip@linux.ibm.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":"<91e8e5a0259ba981e530d099eb053395d8991177.1777377311.git.sayalip@linux.ibm.com>","date":"2026-04-28T11:57:29","name":"hugetlb/hugeshmat05: use size_t for hugepage allocation sizes","commit_ref":null,"pull_url":null,"state":"needs-review-ack","archived":false,"hash":"606faf8e4126222409b5947a708b0adf4338fd52","submitter":{"id":92656,"url":"http://patchwork.ozlabs.org/api/1.1/people/92656/?format=json","name":"Sayali Patil","email":"sayalip@linux.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ltp/patch/91e8e5a0259ba981e530d099eb053395d8991177.1777377311.git.sayalip@linux.ibm.com/mbox/","series":[{"id":501834,"url":"http://patchwork.ozlabs.org/api/1.1/series/501834/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/list/?series=501834","date":"2026-04-28T11:57:29","name":"hugetlb/hugeshmat05: use size_t for hugepage allocation sizes","version":1,"mbox":"http://patchwork.ozlabs.org/series/501834/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2229523/comments/","check":"success","checks":"http://patchwork.ozlabs.org/api/patches/2229523/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\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=WrpYwETe;\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 4g4fCQ4Djrz1yJH\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 22:00:50 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 4FA373E49FB\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 14:00:48 +0200 (CEST)","from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it\n [IPv6:2001:4b78:1:20::5])\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 AFDDC3E2D7C\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 13:58:03 +0200 (CEST)","from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n [148.163.158.5])\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-5.smtp.seeweb.it (Postfix) with ESMTPS id B461B60004B\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 13:58:02 +0200 (CEST)","from pps.filterd (m0356516.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63S729vP3293011; Tue, 28 Apr 2026 11:57:38 GMT","from ppma12.dal12v.mail.ibm.com\n (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4drk1jmb2t-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 28 Apr 2026 11:57:38 +0000 (GMT)","from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1])\n by ppma12.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id\n 63SBcmPd024407;\n Tue, 28 Apr 2026 11:57:37 GMT","from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227])\n by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4ds7xq9mme-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 28 Apr 2026 11:57:37 +0000 (GMT)","from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com\n [10.20.54.101])\n by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 63SBvYRA61669644\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Tue, 28 Apr 2026 11:57:34 GMT","from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id EFB2020043;\n Tue, 28 Apr 2026 11:57:33 +0000 (GMT)","from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id CC5FF20040;\n Tue, 28 Apr 2026 11:57:30 +0000 (GMT)","from li-3f69264c-2ce6-11b2-a85c-c3f414d24014.ibm.com.com (unknown\n [9.124.222.20]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP;\n Tue, 28 Apr 2026 11:57:30 +0000 (GMT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=pp1; bh=PaP8vRIrmpra8cJO8Ih+iklb/WEYYdAlCXSpykq7v\n ww=; b=WrpYwETerFnElOBXY+kwu92Yv1AeGmMkE5/YxhMXp2+VAX7JTUNgUfhF/\n hrhK0RSyy8fGmz4I9D8M+o+0nNe7YTKF78hMSL3NmD3J71qJxOjXrYd5NS7gc2ET\n ZKR0KtNDw/AzVJRCF5kcHLGvn5xcIvp9leFYCKznk2dsYMYTOUuW6mrtZKvY80W+\n ltOJ4MnF+AdedfKjax8X+e60BktKuyJbaGtCwVR/guSfc3H0S1XjRKboWa3pU2fI\n pYa3Othc/blPXhQE8ZP+gKbqnX+/li5Vqeo5ndedsKUWvsDjSZpo7INT1qFzRE0Q\n x/xTJc+50zzOVX4Z9x5ABTXWLhcvg==","From":"Sayali Patil <sayalip@linux.ibm.com>","To":"ltp@lists.linux.it","Date":"Tue, 28 Apr 2026 17:27:29 +0530","Message-ID":"\n <91e8e5a0259ba981e530d099eb053395d8991177.1777377311.git.sayalip@linux.ibm.com>","X-Mailer":"git-send-email 2.52.0","MIME-Version":"1.0","X-TM-AS-GCONF":"00","X-Proofpoint-Reinject":"loops=2 maxloops=12","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDI4MDEwOCBTYWx0ZWRfX+Vu76kv6OA3O\n o57KYd1Tgu4Ex5YS0xFbSlIHhkaalBG37V/9ZffYerntlWVOe2yuZESJ9FXM2V3W93HD7WkiIsr\n WJAAWEfYmrsLVasf3wCTLVmI8ix/0JN5MD0BwADQv45o+m63nSHggZct42mUTZHTH6glIxmCVq/\n sWlLLaw1Epw8sz/3XDrzJgHfv0fFOtaIi+U6TFYwL8632tKpMfKpgcS9L6A6Ul/ppyMggkVHxC1\n 6RgGQYitK4QpodxYHfewpOyyJDEkby9z47FsN4Iu7bczTGjWty4+RAtgpmxVWII0l9rm0V3LUib\n 8ZGyitNNftzWjdIJ1g0d7IZs4iKtZ8JtR2o5rBY0jQZWB7PJQ/dTJ9VVSCz8j74uIQaiIYCvRI8\n I9ZAZYkbXD9guKOoswKnzNKD+5GeHI+g4USL8tlh262VbJzGzEEoUvNjvUVN3po1Rg/RRnbpeon\n TNLjM+qsHNZqBc9hztg==","X-Proofpoint-GUID":"azsL-56p7feClyl_Uv5AJ6uOhy67dQcS","X-Proofpoint-ORIG-GUID":"kNBLZ-vPCSnXKvrlloK9co-key5NiKgy","X-Authority-Analysis":"v=2.4 cv=MohiLWae c=1 sm=1 tr=0 ts=69f0a0b2 cx=c_pps\n a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VnNF1IyMAAAA:8 a=AeWIWtLstDOc7VXNyXEA:9","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-28_03,2026-04-21_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 spamscore=0\n priorityscore=1501 malwarescore=0 clxscore=1011 lowpriorityscore=0\n impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000\n definitions=main-2604280108","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-5.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-5.smtp.seeweb.it","X-Virus-Status":"Clean","X-Mailman-Approved-At":"Tue, 28 Apr 2026 14:00:45 +0200","Subject":"[LTP] [PATCH] hugetlb/hugeshmat05: use size_t for hugepage\n allocation sizes","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>","Cc":"Ritesh Harjani <ritesh.list@gmail.com>,\n Pavithra Prakash <pavrampu@linux.ibm.com>, sayalip@linux.ibm.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":"hugeshmat05 stores hugepage allocation sizes in int variables and\npasses them through shm_test(). This can overflow on systems with\n1GB hugepages, where computed test sizes may exceed INT_MAX.\n\nFor example, with 1GB hugepages and N=4, the test generates a 4GB\nallocation size. Storing this in int truncates the value, resulting\nin invalid sizes being passed to shmget() and subsequent failures\nsuch as EINVAL during shared memory attachment.\n\nUse size_t for size-related variables and update the corresponding\nprintf format specifier to correctly represent allocation sizes.\n\nFixes: 46640e176d (\"hugetlb: add new testcase hugeshmat05.c\")\nReported-by: Pavithra Prakash <pavrampu@linux.ibm.com>\nSigned-off-by: Sayali Patil <sayalip@linux.ibm.com>\n---\n testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat05.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)","diff":"diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat05.c b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat05.c\nindex 3b2ae351c..eb8663f2c 100644\n--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat05.c\n+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat05.c\n@@ -39,7 +39,7 @@ void setup(void)\n \thpage_size = SAFE_READ_MEMINFO(\"Hugepagesize:\") * 1024;\n }\n \n-void shm_test(int size)\n+void shm_test(size_t size)\n {\n \tint shmid;\n \tchar *shmaddr;\n@@ -56,7 +56,7 @@ void shm_test(int size)\n \t}\n \n \tshmaddr[0] = 1;\n-\ttst_res(TINFO, \"allocated %d huge bytes\", size);\n+\ttst_res(TINFO, \"allocated %zu huge bytes\", size);\n \n \tif (shmdt((const void *)shmaddr) != 0) {\n \t\tshmctl(shmid, IPC_RMID, NULL);\n@@ -70,7 +70,7 @@ static void test_hugeshmat(void)\n {\n \tunsigned int i;\n \n-\tconst int tst_sizes[] = {\n+\tconst size_t tst_sizes[] = {\n \t\tN * hpage_size - page_size,\n \t\tN * hpage_size - page_size - 1,\n \t\thpage_size,\n","prefixes":[]}