Skip to contentSkip to conversation

readahead01: pass on pidfd

PATCH In review Murphy Zhou 4 participants 7 messages Apr 23, 2024 – May 15, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 readahead01: pass on pidfd

Linux kernel added pidfs via commit b5683a37c881 in v6.9-rc1 release. This patchset ignores readahead request instead of returning EINVAL, so mark the test pass.

https://lkml.iu.edu/hypermail/linux/kernel/2403.2/00762.html

---
 testcases/kernel/syscalls/readahead/readahead01.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/syscalls/readahead/readahead01.c +1 -0
index d4b3f306f..aed8e7f31 100644
@@ -53,6 +53,7 @@ static void test_invalid_fd(struct tst_fd *fd)
 	case TST_FD_MEMFD:
 	case TST_FD_MEMFD_SECRET:
 	case TST_FD_PROC_MAPS:
+	case TST_FD_PIDFD:
 		return;
 	default:
 		break;
Signature · 5 lines
2.31.1


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

Hi Murphy,

Quoted 3 lines

Linux kernel added pidfs via commit b5683a37c881 in v6.9-rc1 release. This patchset ignores readahead request instead of returning EINVAL, so mark the test pass.

I know that Christian Brauner suggested it (he would deserve Suggested-by: ), but I would still appreciate kernel maintainer opinion, thus not merging yet.

Quoted 1 line

https://lkml.iu.edu/hypermail/linux/kernel/2403.2/00762.html

FYI: lore is more permanent link:
https://lore.kernel.org/lkml/20240318-fegen-bezaubern-57b0a9c6f78b@brauner/

Kind regards,
Petr

Quoted 17 lines
---
 testcases/kernel/syscalls/readahead/readahead01.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/syscalls/readahead/readahead01.c +1 -0
index d4b3f306f..aed8e7f31 100644
@@ -53,6 +53,7 @@ static void test_invalid_fd(struct tst_fd *fd)
 	case TST_FD_MEMFD:
 	case TST_FD_MEMFD_SECRET:
 	case TST_FD_PROC_MAPS:
+	case TST_FD_PIDFD:
 		return;
 	default:
 		break;
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

Hi,

Quoted 9 lines · Petr Vorel

Hi Murphy,

Quoted 3 lines

Linux kernel added pidfs via commit b5683a37c881 in v6.9-rc1 release. This patchset ignores readahead request instead of returning EINVAL, so mark the test pass.

I know that Christian Brauner suggested it (he would deserve Suggested-by: ), but I would still appreciate kernel maintainer opinion, thus not merging yet.

Got it. Thanks!

Quoted 26 lines
Quoted 2 lines

https://lkml.iu.edu/hypermail/linux/kernel/2403.2/00762.html

FYI: lore is more permanent link:
https://lore.kernel.org/lkml/20240318-fegen-bezaubern-57b0a9c6f78b@brauner/

Kind regards,
Petr

Quoted 17 lines
---
 testcases/kernel/syscalls/readahead/readahead01.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/syscalls/readahead/readahead01.c +1 -0
index d4b3f306f..aed8e7f31 100644
@@ -53,6 +53,7 @@ static void test_invalid_fd(struct tst_fd *fd)
      case TST_FD_MEMFD:
      case TST_FD_MEMFD_SECRET:
      case TST_FD_PROC_MAPS:
+     case TST_FD_PIDFD:
              return;
      default:
              break;
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw
In reply to Murphy Zhou
Quoted 16 lines · Murphy Zhou

Linux kernel added pidfs via commit b5683a37c881 in v6.9-rc1 release. This patchset ignores readahead request instead of returning EINVAL, so mark the test pass.

https://lkml.iu.edu/hypermail/linux/kernel/2403.2/00762.html

---
 testcases/kernel/syscalls/readahead/readahead01.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/syscalls/readahead/readahead01.c +0 -0
index d4b3f306f..aed8e7f31 100644

testcases/kernel/syscalls/readahead/readahead01.c static void test_invalid_fd(struct tst_fd *fd) · line 59

Quoted 7 lines
testcases/kernel/syscalls/readahead/readahead01.c +1 -0
@@ -53,6 +53,7 @@ static void test_invalid_fd(struct tst_fd *fd)
 	case TST_FD_MEMFD:
 	case TST_FD_MEMFD_SECRET:
 	case TST_FD_PROC_MAPS:
+	case TST_FD_PIDFD:
 		return;
 	default:
 		break;

Any movement on this?

Android pre-submit CI testing is failing due to the new unconditional enable of PIDFD. I believe this patch is required in order to bring it back to a passing state.

Signature · 4 lines
Lee Jones [李琼斯]

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

Hi Lee,

Quoted 13 lines · Murphy Zhou
Quoted 11 lines

Linux kernel added pidfs via commit b5683a37c881 in v6.9-rc1 release. This patchset ignores readahead request instead of returning EINVAL, so mark the test pass.

https://lkml.iu.edu/hypermail/linux/kernel/2403.2/00762.html

---
 testcases/kernel/syscalls/readahead/readahead01.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

testcases/kernel/syscalls/readahead/readahead01.c static void test_invalid_fd(struct tst_fd *fd) · line 59

Quoted 12 lines
testcases/kernel/syscalls/readahead/readahead01.c +1 -0
index d4b3f306f..aed8e7f31 100644
@@ -53,6 +53,7 @@ static void test_invalid_fd(struct tst_fd *fd)
 	case TST_FD_MEMFD:
 	case TST_FD_MEMFD_SECRET:
 	case TST_FD_PROC_MAPS:
+	case TST_FD_PIDFD:
 		return;
 	default:
 		break;

Any movement on this?

Back to Christian Brauner discussing with Cyril Hrubis [1]

> Wouldn't it make more sense to actually return EINVAL instead of > ignoring the request if readahead() is not implemented?

It would change the return value for a whole bunch of stuff. I'm not sure that wouldn't cause regressions but is in any case a question for the readahead maintainers. For now I'd just remove that test for pidfds imho.

That's why I would like to get ack / oppinion of the readahead maintainers. I already asked them under this patch.

@Andrew gently ping.

Kind regards,
Petr

[1] https://lore.kernel.org/lkml/20240318-fegen-bezaubern-57b0a9c6f78b@brauner/

Below the patch I have asked kernel maintainers to ack if

Quoted 3 lines

Android pre-submit CI testing is failing due to the new unconditional enable of PIDFD. I believe this patch is required in order to bring it back to a passing state.

#5 lore raw
In reply to Lee Jones

Hi!

Quoted 5 lines

Any movement on this?

Android pre-submit CI testing is failing due to the new unconditional enable of PIDFD. I believe this patch is required in order to bring it back to a passing state.

I guess that it's time to accept that kernel will allow strange operations on pidfs and apply this patch. Thanks for the reminder.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp