Skip to contentSkip to conversation

syscalls/keyctl09: test encrypted keys with provided decrypted data.

PATCH In review Yael Tzur 3 participants 12 messages Feb 23, 2022 – Mar 24, 2022 Keys-trusted

lore
Share & tools
lore

Yael Tzur

author
#0 lore raw

PATCH v4 1/1 syscalls/keyctl09: test encrypted keys with provided decrypted data.

Test that encrypted keys can be instantiated using hex-ascii encoded user-provided decrypted data.
(https://lore.kernel.org/lkml/[email protected]/).

---

Notes:

    v -> v2: added key revocation and made styling changes.
    
    v2 -> v3: updated per latest kernel patch version.
    
    v3 -> v4: made styling changes.
 runtest/syscalls                            |  1 +
 testcases/kernel/syscalls/keyctl/.gitignore |  1 +
 testcases/kernel/syscalls/keyctl/keyctl09.c | 53 +++++++++++++++++++++
 3 files changed, 55 insertions(+)
 create mode 100644 testcases/kernel/syscalls/keyctl/keyctl09.c
runtest/syscalls +1 -0
index bcf3d56c9..ccea1ddbd 100644
@@ -643,6 +643,7 @@ keyctl05 keyctl05
 keyctl06 keyctl06
 keyctl07 keyctl07
 keyctl08 keyctl08
+keyctl09 keyctl09
 
 kcmp01 kcmp01
 kcmp02 kcmp02
testcases/kernel/syscalls/keyctl/.gitignore +1 -0
index 3544ac79c..f9948c176 100644
@@ -6,3 +6,4 @@
 /keyctl06
 /keyctl07
 /keyctl08
+/keyctl09
testcases/kernel/syscalls/keyctl/keyctl09.c new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.35.1.473.g83b2b277ed-goog
Reviewed-by on v4 1/1
#1 lore raw

Hi!
The test looks good to me now.

Looking at the kernel counterpart it is still in the next tree. We usually wait until the kernel functionality is part of a kernel release in order to make sure that there are no changes done to the kernel-userspace API.

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#2 lore raw
Quoted 11 lines · Cyril Hrubis

Hi!
The test looks good to me now.

Looking at the kernel counterpart it is still in the next tree. We usually wait until the kernel functionality is part of a kernel release in order to make sure that there are no changes done to the kernel-userspace API.

Quoted 6 lines

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

--
Cyril Hrubis
[email protected]

Sounds good. Thank you!

#3 lore raw
In reply to Cyril Hrubis

Hi Cyril, Yael,

Quoted 9 lines

Hi!
The test looks good to me now.

Looking at the kernel counterpart it is still in the next tree. We usually wait until the kernel functionality is part of a kernel release in order to make sure that there are no changes done to the kernel-userspace API.

Good (last time I checked it wasn't there).
For my record:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20220302&id=cd3bc044af483422cc81a93f23c78c20c978b17c

Quoted 2 lines

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

Cyril, maybe we could finally merge our policy (waiting ack for you):
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
and put keyctl09 into runtest/staging now.

Kind regards,
Petr

#4 lore raw

Hi!

Quoted 5 lines
Quoted 2 lines

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

Cyril, maybe we could finally merge our policy (waiting ack for you):
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
and put keyctl09 into runtest/staging now.

I guess that we still did not agree on exactly how this should be handled or did we?

Signature · 2 lines
Cyril Hrubis
[email protected]
#5 lore raw

Hi Cyril,

Quoted 9 lines

Hi!

Quoted 5 lines
Quoted 2 lines

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

Cyril, maybe we could finally merge our policy (waiting ack for you):
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
and put keyctl09 into runtest/staging now.

I guess that we still did not agree on exactly how this should be handled or did we?

Isn't it enough "Once a feature is part of the stable kernel ABI the associated test must be moved out of staging." ?

If not, we should raise this question on that patch thread to find a conclusion.

Kind regards,
Petr

#6 lore raw

Hi!

Quoted 11 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

Cyril, maybe we could finally merge our policy (waiting ack for you):
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
and put keyctl09 into runtest/staging now.

I guess that we still did not agree on exactly how this should be handled or did we?

Isn't it enough "Once a feature is part of the stable kernel ABI the associated test must be moved out of staging." ?

The main problem is that someone has to make sure that it happens and the process would be prone to errors. What I proposed instead was a flag that would set a kernel version in which the ABI is going to be merged and put the test right into the final runtest files. Then we can simply skip the test on older kernels or do anything else we see as a reasonable solution. At the same time we can easily add automatic checker that would look for these flags in metadata into the CI which would, for instance, send email to the ML once the flag is supposed to be removed.

In this case it does not actually matter, since the test is guarded by a kernel config option that is introduced by the patchset and the change is fairly miniminal, so I do not think that there would be any changes to the ABI anyways.

Signature · 2 lines
Cyril Hrubis
[email protected]
#7 lore raw

Hi Cyril,

[ Cc Richie, Li, Jan ]

Quoted 13 lines

Hi!

Quoted 11 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

Cyril, maybe we could finally merge our policy (waiting ack for you):
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
and put keyctl09 into runtest/staging now.

I guess that we still did not agree on exactly how this should be handled or did we?

Isn't it enough "Once a feature is part of the stable kernel ABI the associated test must be moved out of staging." ?

Quoted 9 lines

The main problem is that someone has to make sure that it happens and the process would be prone to errors. What I proposed instead was a flag that would set a kernel version in which the ABI is going to be merged and put the test right into the final runtest files. Then we can simply skip the test on older kernels or do anything else we see as a reasonable solution. At the same time we can easily add automatic checker that would look for these flags in metadata into the CI which would, for instance, send email to the ML once the flag is supposed to be removed.

OK, you're missing that kernel version. OTOH things get sometimes backported, thus it's not error prone (if we forget to leave that flag after kernel being released).

Also version is hard to say if you use maintainer tree (which applies patches on previous rc1 than what is being in Linus tree). Thus maintainer's tree would be left, also IMHO next tree has no specific version in uname, thus we'd only support rc from Linus' tree.

But anyway, if all agree that this is better than both solutions Richie implemented I'd try to find time to implement it so that we have finally a solution.

Quoted 4 lines

In this case it does not actually matter, since the test is guarded by a kernel config option that is introduced by the patchset and the change is fairly miniminal, so I do not think that there would be any changes to the ABI anyways.

Correct. At this stage IMHO we can dare to merge it.

Kind regards,
Petr

author
#8 lore raw
Quoted 40 lines · Petr Vorel

Hi Cyril,

[ Cc Richie, Li, Jan ]

Quoted 13 lines

Hi!

Quoted 11 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

Cyril, maybe we could finally merge our policy (waiting ack for you):
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
and put keyctl09 into runtest/staging now.

I guess that we still did not agree on exactly how this should be handled or did we?

Isn't it enough "Once a feature is part of the stable kernel ABI the associated test must be moved out of staging." ?

Quoted 9 lines

The main problem is that someone has to make sure that it happens and the process would be prone to errors. What I proposed instead was a flag that would set a kernel version in which the ABI is going to be merged and put the test right into the final runtest files. Then we can simply skip the test on older kernels or do anything else we see as a reasonable solution. At the same time we can easily add automatic checker that would look for these flags in metadata into the CI which would, for instance, send email to the ML once the flag is supposed to be removed.

OK, you're missing that kernel version. OTOH things get sometimes backported, thus it's not error prone (if we forget to leave that flag after kernel being released).

Also version is hard to say if you use maintainer tree (which applies patches on previous rc1 than what is being in Linus tree). Thus maintainer's tree would be left, also IMHO next tree has no specific version in uname, thus we'd only support rc from Linus' tree.

But anyway, if all agree that this is better than both solutions Richie implemented I'd try to find time to implement it so that we have finally a solution.

Quoted 8 lines
Quoted 4 lines

In this case it does not actually matter, since the test is guarded by a kernel config option that is introduced by the patchset and the change is fairly miniminal, so I do not think that there would be any changes to the ABI anyways.

Correct. At this stage IMHO we can dare to merge it.

Kind regards,
Petr

Hi Petr and Cyril,

I wanted to check whether there is pending action left on my end?

Thanks,
Yael

#9 lore raw
Quoted 45 lines · Petr Vorel
Quoted 44 lines

Hi Cyril,

[ Cc Richie, Li, Jan ]

Quoted 13 lines

Hi!

Quoted 11 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I this case I guess that in this case the change is so minimal that we can add this test into LTP once it reaches Linus tree.

Cyril, maybe we could finally merge our policy (waiting ack for you):
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
and put keyctl09 into runtest/staging now.

I guess that we still did not agree on exactly how this should be handled or did we?

Isn't it enough "Once a feature is part of the stable kernel ABI the associated test must be moved out of staging." ?

Quoted 9 lines

The main problem is that someone has to make sure that it happens and the process would be prone to errors. What I proposed instead was a flag that would set a kernel version in which the ABI is going to be merged and put the test right into the final runtest files. Then we can simply skip the test on older kernels or do anything else we see as a reasonable solution. At the same time we can easily add automatic checker that would look for these flags in metadata into the CI which would, for instance, send email to the ML once the flag is supposed to be removed.

OK, you're missing that kernel version. OTOH things get sometimes backported, thus it's not error prone (if we forget to leave that flag after kernel being released).

Also version is hard to say if you use maintainer tree (which applies patches on previous rc1 than what is being in Linus tree). Thus maintainer's tree would be left, also IMHO next tree has no specific version in uname, thus we'd only support rc from Linus' tree.

But anyway, if all agree that this is better than both solutions Richie implemented I'd try to find time to implement it so that we have finally a solution.

Quoted 4 lines

In this case it does not actually matter, since the test is guarded by a kernel config option that is introduced by the patchset and the change is fairly miniminal, so I do not think that there would be any changes to the ABI anyways.

Quoted 8 lines
Quoted 4 lines

Correct. At this stage IMHO we can dare to merge it.

Kind regards,
Petr

Hi Petr and Cyril,

I wanted to check whether there is pending action left on my end?

@Yael nothing needed from you.

@Cyril cd3bc044af48 ("KEYS: encrypted: Instantiate key with user-provided decrypted data") is in Mimi Zohar's git tree and in next tree, going to be merged in next merge window. Can we merge it now as is?

Kind regards,
Petr

Quoted 2 lines

Thanks,
Yael

#10 lore raw

Hi all,

Quoted 8 lines
Quoted 3 lines

Hi Petr and Cyril,

I wanted to check whether there is pending action left on my end?

@Yael nothing needed from you.

@Cyril cd3bc044af48 ("KEYS: encrypted: Instantiate key with user-provided decrypted data") is in Mimi Zohar's git tree and in next tree, going to be merged in next merge window. Can we merge it now as is?

@Cyril cd3bc044af48 is in the next tree. Are we going to wait till it reaches Linus' tree (in 5.18-rc1) or can I merge it now?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20220323&id=cd3bc044af483422cc81a93f23c78c20c978b17c

Kind regards,
Petr

Quoted 2 lines

Kind regards,
Petr