Skip to contentSkip to conversation

ioctl_pidfd06: Update kernel version

PATCH In review Petr Vorel 4 participants 5 messages Apr 24 – Apr 28

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/1 ioctl_pidfd06: Update kernel version

Kernel commit ab89060fbc92e ("pidfs: return -EREMOTE when PIDFD_GET_INFO is called on another ns") from v7.0 was backported into stable/LTS kernels v6.18.14 (7446125afb6d9) and v6.19.10 (2920abaf56c09). Update errnos for these stable/LTS kernels (do not treat older behavior as an error).

Follow-up: f630471a6520 ("ioctl_pidfd06: Select expected errno for PIDFD_GET_INFO across pidns")

---
Alternative approach for Wei's fix:
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://lore.kernel.org/ltp/[email protected]/

Changes v1->v2:
* Cover also 6.19.0..v6.19.9
* Add Follow-up: tag (not Fixme: tag), commit was correct at the time.

Link to v1:
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#t

 testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +6 -1
index 0f24d4741f..bc90aafd17 100644
@@ -54,7 +54,12 @@ static void setup(void)
 	if (!ioctl_pidfd_info_exit_supported())
 		tst_brk(TCONF, "PIDFD_INFO_EXIT is not supported by ioctl()");
 
-	if (tst_kvercmp(7, 0, 0) >= 0)
+	/*
+	 * ab89060fbc92e ("pidfs: return -EREMOTE when PIDFD_GET_INFO is called on another ns")
+	 * from v7.0, backported to v6.18.14 and v6.19.10.
+	 */
+	if (tst_kvercmp(6, 19, 10) >= 0 ||
+	    (tst_kvercmp(6, 18, 14) >= 0 && tst_kvercmp(6, 19, 0) < 0))
 		err_nr = EREMOTE;
 }
 
Signature · 5 lines
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by LTP AI Reviewer on v2 1/1
#1 lore raw

Hi Petr,

testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c static void setup(void) · line 63

Quoted 6 lines · Petr Vorel

ioctl_pidfd06: Update kernel version

testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +2 -1
-       if (tst_kvercmp(7, 0, 0) >= 0)
+       if (tst_kvercmp(6, 19, 10) >= 0 ||
+           (tst_kvercmp(6, 18, 14) >= 0 && tst_kvercmp(6, 19, 0) < 0))
                err_nr = EREMOTE;

---
Note:

Our agent completed the review of the patch. The full review can be found at: https://github.com/linux-test-project/ltp-agent/actions/runs/24884569804

The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Acked-by Jan Stancek on v2 1/1
#2 lore raw
In reply to Petr Vorel
Quoted 32 lines · Petr Vorel

Kernel commit ab89060fbc92e ("pidfs: return -EREMOTE when PIDFD_GET_INFO is called on another ns") from v7.0 was backported into stable/LTS kernels v6.18.14 (7446125afb6d9) and v6.19.10 (2920abaf56c09). Update errnos for these stable/LTS kernels (do not treat older behavior as an error).

Follow-up: f630471a6520 ("ioctl_pidfd06: Select expected errno for PIDFD_GET_INFO across pidns")

---
Alternative approach for Wei's fix:
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://lore.kernel.org/ltp/[email protected]/

Changes v1->v2:
* Cover also 6.19.0..v6.19.9
* Add Follow-up: tag (not Fixme: tag), commit was correct at the time.

Link to v1:
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://lore.kernel.org/ltp/20260424095900.GA500158@pevik/T/#t

 testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +0 -0
index 0f24d4741f..bc90aafd17 100644
@@ -54,7 +54,12 @@ static void setup(void)
        if (!ioctl_pidfd_info_exit_supported())

testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c static void setup(void) · line 63

Quoted 10 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +6 -1
                tst_brk(TCONF, "PIDFD_INFO_EXIT is not supported by ioctl()");
 
-       if (tst_kvercmp(7, 0, 0) >= 0)
+       /*
+        * ab89060fbc92e ("pidfs: return -EREMOTE when PIDFD_GET_INFO is called on another ns")
+        * from v7.0, backported to v6.18.14 and v6.19.10.
+        */
+       if (tst_kvercmp(6, 19, 10) >= 0 ||
+           (tst_kvercmp(6, 18, 14) >= 0 && tst_kvercmp(6, 19, 0) < 0))
                err_nr = EREMOTE;

lgtm as well,

Quoted 5 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +0 -1
 }
 
--

2.53.0

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v2 1/1
#3 lore raw
In reply to Petr Vorel
Quoted 9 lines · Petr Vorel

Kernel commit ab89060fbc92e ("pidfs: return -EREMOTE when PIDFD_GET_INFO is called on another ns") from v7.0 was backported into stable/LTS kernels v6.18.14 (7446125afb6d9) and v6.19.10 (2920abaf56c09). Update errnos for these stable/LTS kernels (do not treat older behavior as an error).

Follow-up: f630471a6520 ("ioctl_pidfd06: Select expected errno for PIDFD_GET_INFO across pidns")

Works for me as well:

Signature · 5 lines
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#4 lore raw

Hi all,

thanks for your ack, merged.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp