ioctl_pidfd06: Update kernel version
PATCH 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).
--- testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1 -1
@@ -54,7 +54,7 @@ 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 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 ) err_nr =EREMOTE ; }
Signature · 5 lines
2.53.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Petr, Wei,
Quoted 3 lines · Petr Vorel
Kernel commit
ab89060fbc92e("pidfs: return-EREMOTEwhenPIDFD_GET_INFOis called on another ns") from v7.0 was backported into stable/LTS kernels v6.18.14 (7446125afb6d9) and v6.19.10 (2920abaf56c09).
Is this backport just a single stable kernel or a range of version?
Quoted 11 lines
Reported-by Wei Gao <[email protected]>Signed-off-by Petr Vorel <[email protected]>--- testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +0
-0
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c static void setup(void) · line 57
Quoted 5 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1
-1@@ -54,7 +54,7 @@ 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 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 )
What will happen if this test is run on kernel range: v6.19.0 ~ v6.19.9?
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Li,
[ Discussion => Cc Cyril and Jan ]
Quoted 9 lines
Hi Petr, Wei,
Quoted 3 lines · Petr Vorel
Kernel commit
ab89060fbc92e("pidfs: return-EREMOTEwhenPIDFD_GET_INFOis called on another ns") from v7.0 was backported into stable/LTS kernels v6.18.14 (7446125afb6d9) and v6.19.10 (2920abaf56c09).Is this backport just a single stable kernel or a range of version?
It was backported into 6.18 stable (in v6.18.14) and in 6.19 (in v6.19.10).
Quoted 14 lines
Quoted 13 lines
Reported-by Wei Gao <[email protected]>Signed-off-by Petr Vorel <[email protected]>--- testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +0
-0@@ -54,7 +54,7 @@ static void setup(void)if (!ioctl_pidfd_info_exit_supported ())tst_brk (TCONF ,"PIDFD_INFO_EXIT is not supported by ioctl()" );
Quoted 4 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c static void setup(void) · line 57
Quoted 2 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1
-1-if (tst_kvercmp (7 ,0 ,0 ) >=0 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 )What will happen if this test is run on kernel range: v6.19.0 ~ v6.19.9?
FYI I haven't tested that, but it should fail on 6.18.0..v6.18.13 and on v6.19.0..v6.19.9 due missing backport.
I'd assume that's correct, because on stable/LTS we should IMHO be more strict to ensure it behaves as expected. WDYT?
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 11 lines
Quoted 10 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c static void setup(void) · line 57
Quoted 8 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1
-1@@ -54,7 +54,7 @@ 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 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 )What will happen if this test is run on kernel range: v6.19.0 ~ v6.19.9?
Quoted 5 lines
FYI I haven't tested that, but it should fail on 6.18.0..v6.18.13 and on v6.19.0..v6.19.9 due missing backport.
I'd assume that's correct, because on stable/LTS we should IMHO be more strict to ensure it behaves as expected. WDYT?
Hmm, maybe that's acceptable. Or just:
if ((tst_kvercmp(6, 18, 14) == 0 ||
tst_kvercmp(6, 19, 10) == 0) ||
tst_kvercmp(7, 0, 0) >= 0)And it'd be great to have Jan's comments, he is an expert in the kernel maintenance area:).
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 18 lines · Li Wang
Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1
-1@@ -54,7 +54,7 @@ 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 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 )Quoted 7 lines
Quoted 1 line
What will happen if this test is run on kernel range: v6.19.0 ~ v6.19.9?
FYI I haven't tested that, but it should fail on 6.18.0..v6.18.13 and on v6.19.0..v6.19.9 due missing backport.
I'd assume that's correct, because on stable/LTS we should IMHO be more strict to ensure it behaves as expected. WDYT?
Quoted 8 lines
Hmm, maybe that's acceptable. Or just:
if ((
tst_kvercmp(6, 18, 14)== 0 ||tst_kvercmp(6, 19, 10) == 0) || tst_kvercmp(7, 0, 0) >= 0)And it'd be great to have Jan's comments, he is an expert in the kernel maintenance area:).
ehm, not sure about that :-).
This is change in error code, we didn't treat previous value as error for older releases, so why do that now? I don't see it covered in man pages (yet), so why be strict?
I think the patch should either use more specific version ranges or allow both errnos on versions <= 7.0.0.
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 28 lines · Jan Stancek
Quoted 18 lines · Li Wang
Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1
-1@@ -54,7 +54,7 @@ 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 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 )Quoted 7 lines
Quoted 1 line
What will happen if this test is run on kernel range: v6.19.0 ~ v6.19.9?
FYI I haven't tested that, but it should fail on 6.18.0..v6.18.13 and on v6.19.0..v6.19.9 due missing backport.
I'd assume that's correct, because on stable/LTS we should IMHO be more strict to ensure it behaves as expected. WDYT?
Quoted 8 lines
Hmm, maybe that's acceptable. Or just:
if ((
tst_kvercmp(6, 18, 14)== 0 ||tst_kvercmp(6, 19, 10) == 0) || tst_kvercmp(7, 0, 0) >= 0)And it'd be great to have Jan's comments, he is an expert in the kernel maintenance area:).
Quoted 9 lines
ehm, not sure about that :-).
This is change in error code, we didn't treat previous value as error for older releases, so why do that now? I don't see it covered in man pages (yet), so why be strict?
I think the patch should either use more specific version ranges or allow both errnos on versions <= 7.0.0.
I agree, i prefer use my patch :)
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi all,
first, thanks for a review!
Quoted 16 lines · Li Wang
Quoted 14 lines
Quoted 14 lines
Quoted 11 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c static void setup(void) · line 57
Quoted 9 lines
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1
-1@@ -54,7 +54,7 @@ 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 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 )What will happen if this test is run on kernel range: v6.19.0 ~ v6.19.9?
FYI I haven't tested that, but it should fail on 6.18.0..v6.18.13 and on v6.19.0..v6.19.9 due missing backport.
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
I'd assume that's correct, because on stable/LTS we should IMHO be more strict to ensure it behaves as expected. WDYT?
Hmm, maybe that's acceptable. Or just:
if ((
tst_kvercmp(6, 18, 14)== 0 ||
'==' I guess you mean '>=', this would not work on v6.18.15..v6.18.24
Quoted 1 line
Quoted 1 line
tst_kvercmp(6, 19, 10) == 0) ||
'==': although 6.19.14 is EOL, that might change.
Quoted 1 line
Quoted 1 line
tst_kvercmp(7, 0, 0) >= 0)
Before sending I was thinking about:
if ((tst_kvercmp(6, 19, 10) >= 0) ||
(tst_kvercmp(6, 18, 14) >= 0 && tst_kvercmp(6, 19, 0) < 0)
Because the only version which should be avoided is v6.19.0..v6.19.9. I can send v2.
Quoted 11 lines
Quoted 2 lines
And it'd be great to have Jan's comments, he is an expert in the kernel maintenance area:).
ehm, not sure about that :-).
This is change in error code, we didn't treat previous value as error for older releases, so why do that now? I don't see it covered in man pages (yet), so why be strict?
I think the patch should either use more specific version ranges or allow both errnos on versions <= 7.0.0.
FYI Wei's approach was not to be strict:
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
I did not supersede it (somebody did), feel free to ack this approach (and I will not send v2).
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Petr,
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c static void setup(void) · line 58
Quoted 5 lines · Petr Vorel
ioctl_pidfd06: Update kernel versiontestcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1
-1-if (tst_kvercmp (7 ,0 ,0 ) >=0 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 ) err_nr =EREMOTE ;
tst_kvercmp(6, 18, 14) >= 0 is too broad: because tst_kvercmp compares (major, minor, patch) as ordered integers, it evaluates true for all v6.19.x, including v6.19.0-v6.19.9 which do not carry the backport (which landed in v6.19.10). Those kernels would see a false EREMOTE expectation and TFAIL.
The check needs to handle both stable branches independently, e.g.:
if (tst_kvercmp(7, 0, 0) >= 0 || (tst_kvercmp(6, 18, 14) >= 0 && tst_kvercmp(6, 19, 0) < 0) || tst_kvercmp(6, 19, 10) >= 0) err_nr = EREMOTE;
Also, since this corrects a bug (TFAIL on kernels with the backport), please add a Fixes: tag referencing the commit that introduced the original tst_kvercmp(7, 0, 0) check.
---
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/24879016987
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
Quoted 15 lines
Hi Petr,
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c static void setup(void) · line 58
Quoted 5 lines · Petr Vorel
ioctl_pidfd06: Update kernel versiontestcases/kernel/syscalls/ioctl/ioctl_pidfd06.c +1
-1-if (tst_kvercmp (7 ,0 ,0 ) >=0 ) +if (tst_kvercmp (6 ,18 ,14 ) >=0 ) err_nr =EREMOTE ;
tst_kvercmp(6, 18, 14)>= 0 is too broad: becausetst_kvercmpcompares (major, minor, patch) as ordered integers, it evaluates true for all v6.19.x, including v6.19.0-v6.19.9 which do not carry the backport (which landed in v6.19.10). Those kernels would see a false EREMOTE expectation and TFAIL.
Quoted 6 lines
The check needs to handle both stable branches independently, e.g.:
if (tst_kvercmp(7, 0, 0) >= 0 || (tst_kvercmp(6, 18, 14) >= 0 && tst_kvercmp(6, 19, 0) < 0) || tst_kvercmp(6, 19, 10) >= 0) err_nr = EREMOTE;
Obviously tst_kvercmp(6, 19, 10) >= 0 will match also tst_kvercmp(7, 0, 0) >= 0, therefore "tst_kvercmp(7, 0, 0) >= 0" is not needed.
Kind regards,
Petr
Quoted 3 lines
Also, since this corrects a bug (TFAIL on kernels with the backport), please add a Fixes: tag referencing the commit that introduced the original
tst_kvercmp(7, 0, 0)check.
Do we want to add Fixes when original commit was correct?
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
...
Quoted 5 lines
Quoted 3 lines
Also, since this corrects a bug (TFAIL on kernels with the backport), please add a Fixes: tag referencing the commit that introduced the original
tst_kvercmp(7, 0, 0)check.Do we want to add Fixes when original commit was correct?
Shouldn't be Follow-up: used?
Kind regards,
Petr
Quoted 2 lines
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp