{"id":2219328,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2219328/?format=json","project":{"id":59,"url":"http://patchwork.ozlabs.org/api/1.0/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":"<20260402205534.224141-3-pvorel@suse.cz>","date":"2026-04-02T20:55:34","name":"[v2,2/2] pidns32: fix PID namespace nesting depth off-by-one","commit_ref":null,"pull_url":null,"state":"needs-review-ack","archived":false,"hash":"f77996b0e32c0cf2d224d0c915ddb41c23248ca9","submitter":{"id":70792,"url":"http://patchwork.ozlabs.org/api/1.0/people/70792/?format=json","name":"Petr Vorel","email":"pvorel@suse.cz"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ltp/patch/20260402205534.224141-3-pvorel@suse.cz/mbox/","series":[{"id":498553,"url":"http://patchwork.ozlabs.org/api/1.0/series/498553/?format=json","date":"2026-04-02T20:55:32","name":"pidns32: fix PID namespace nesting depth off-by-one","version":2,"mbox":"http://patchwork.ozlabs.org/series/498553/mbox/"}],"check":"success","checks":"http://patchwork.ozlabs.org/api/patches/2219328/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.cz header.i=@suse.cz header.a=rsa-sha256\n header.s=susede2_rsa header.b=3RmZIuYV;\n\tdkim=fail reason=\"signature verification failed\" header.d=suse.cz\n header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519\n header.b=u7bnAY3U;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa\n header.b=rNN8N/1c;\n\tdkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=4KCtnzhI;\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)","smtp-out1.suse.de;\n\tnone"],"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 4fmvKM3xxgz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 07:56:23 +1100 (AEDT)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id CB5C63E4E90\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Apr 2026 22:56:20 +0200 (CEST)","from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3])\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 3E9353E5493\n for <ltp@lists.linux.it>; Thu,  2 Apr 2026 22:55:47 +0200 (CEST)","from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])\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-3.smtp.seeweb.it (Postfix) with ESMTPS id A17E01A000A4\n for <ltp@lists.linux.it>; Thu,  2 Apr 2026 22:55:46 +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-out1.suse.de (Postfix) with ESMTPS id 7188A4D2F4;\n Thu,  2 Apr 2026 20:55:44 +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 8D91E4A0B0;\n Thu,  2 Apr 2026 20:55:43 +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 iBnIHc/XzmkJHAAAD6G6ig\n (envelope-from <pvorel@suse.cz>); Thu, 02 Apr 2026 20:55:43 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n t=1775163345;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=gOq40DFLujhKGaq9MONvulfb8Wx+pKPzHL9VsozVUKs=;\n b=3RmZIuYVcb+A5UybVs1Dt+pidJKVOuWZ/ihuSTelq/ogxC9WDMvGf7/AIApRHXTPkh5mF9\n t9EE/RMdY+SzjynibIfhZLw7MyNN5fbyTrU36LxwhusWi2D5U52fP1YFUwV6MjPmOFMmq3\n wJ3zh/6ZcnGCyYWDh1uJxCkh3k08DT8=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_ed25519; t=1775163345;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=gOq40DFLujhKGaq9MONvulfb8Wx+pKPzHL9VsozVUKs=;\n b=u7bnAY3UyxyhPX+UkuId7Cjj8Qop/TT1P33c/Yyfx83SLyV6WrlbsDUauf1h6ovDsTlIKj\n 2uvGKQzWgTEFyQDA==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n t=1775163344;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=gOq40DFLujhKGaq9MONvulfb8Wx+pKPzHL9VsozVUKs=;\n b=rNN8N/1ckNXaqqTjTluxjoUXCS4C8/Knb4RF3baMLm6wdWA90e9kEpBhHGNueDT/0VfDN1\n utNTi3Gbfrn4cTo2/1mnfuJ6gmV9rFUsk3xz9imTjDBkg7MiHN82UFh7ehp/y9ng+3ME5v\n D+YQaJyQdjgNZr3vi/GhvRfRJvak/gE=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_ed25519; t=1775163344;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=gOq40DFLujhKGaq9MONvulfb8Wx+pKPzHL9VsozVUKs=;\n b=4KCtnzhI91W3D8MrRa/tTH3NLWZvnkSfhgrzxT9cnJhht+f02CkuqHjd3ByyTdIxBeA0A7\n zmmz7fQYUAaEWnCA=="],"From":"Petr Vorel <pvorel@suse.cz>","To":"ltp@lists.linux.it","Date":"Thu,  2 Apr 2026 22:55:34 +0200","Message-ID":"<20260402205534.224141-3-pvorel@suse.cz>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260402205534.224141-1-pvorel@suse.cz>","References":"<20260402205534.224141-1-pvorel@suse.cz>","MIME-Version":"1.0","X-Spamd-Result":"default: False [-6.80 / 50.00]; REPLY(-4.00)[];\n BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000];\n MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[];\n MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[];\n TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[];\n FROM_EQ_ENVFROM(0.00)[];\n DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_FIVE(0.00)[5];\n DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,suse.cz:mid,suse.cz:email,imap1.dmz-prg2.suse.org:helo];\n RCVD_TLS_ALL(0.00)[]","X-Spam-Score":"-6.80","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,SPF_HELO_NONE,SPF_PASS shortcircuit=no\n autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-3.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-3.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"[LTP] [PATCH v2 2/2] pidns32: fix PID namespace nesting depth\n off-by-one","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":"Vasileios Almpanis <vasileios.almpanis@virtuozzo.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":"From: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>\n\nThe 2023 refactor used tst_atomic_inc() before clone with a zero-initial\ncounter, which only performed 31 CLONE_NEWPID nests while still expecting\nMAXNEST (32). Use tst_atomic_return_add() so the shared counter runs\n0..32 and the chain reaches 32 nested namespaces again.\n\nFixes: 647cfd468c3b (\"Refactor pidns32 test using new LTP API\")\nReviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>\nReviewed-by: Petr Vorel <pvorel@suse.cz>\nReviewed-by: Cyril Hrubis <chrubis@suse.cz>\nSigned-off-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>\n[ pvorel: use tst_atomic_return_add() ]\nSigned-off-by: Petr Vorel <pvorel@suse.cz>\n---\nv1: https://lore.kernel.org/ltp/20260330100750.858390-1-vasileios.almpanis@virtuozzo.com/\n\n testcases/kernel/containers/pidns/pidns32.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/testcases/kernel/containers/pidns/pidns32.c b/testcases/kernel/containers/pidns/pidns32.c\nindex fc9bf0aaa0..2a9e2827fc 100644\n--- a/testcases/kernel/containers/pidns/pidns32.c\n+++ b/testcases/kernel/containers/pidns/pidns32.c\n@@ -27,7 +27,7 @@ static pid_t child_func(void)\n {\n \tpid_t cpid = 0;\n \n-\tif (tst_atomic_inc(level) == MAXNEST)\n+\tif (tst_atomic_return_add(1, level) == MAXNEST)\n \t\treturn cpid;\n \n \tcpid = SAFE_CLONE(&args);\n@@ -58,7 +58,7 @@ static void run(void)\n \tif (!child_func())\n \t\treturn;\n \n-\tTST_EXP_EQ_LI(*level, MAXNEST);\n+\tTST_EXP_EQ_LI(*level-1, MAXNEST);\n }\n \n static struct tst_test test = {\n","prefixes":["v2","2/2"]}