* [PATCH v2] key: Add placeholder arg to Diffie-Hellman syscall
@ 2016-06-24 22:22 Mat Martineau
2016-06-24 22:36 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Mat Martineau @ 2016-06-24 22:22 UTC (permalink / raw)
To: ell
[-- Attachment #1: Type: text/plain, Size: 828 bytes --]
The final version of the KEYCTL_DH_COMPUTE syscall that went in to
kernel 4.7 added a reserved arg. In the future, this arg will be used
to optionally specify a key derivation function. For now, it's needed
so the system call doesn't return -1 (errno == EINVAL) every time.
---
ell/key.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ell/key.c b/ell/key.c
index adeac04..e6ae92a 100644
--- a/ell/key.c
+++ b/ell/key.c
@@ -99,7 +99,8 @@ static long kernel_dh_compute(int32_t private, int32_t prime, int32_t base,
.prime = prime,
.base = base };
- return syscall(__NR_keyctl, KEYCTL_DH_COMPUTE, ¶ms, payload, len);
+ return syscall(__NR_keyctl, KEYCTL_DH_COMPUTE, ¶ms, payload, len,
+ NULL);
}
static bool setup_internal_keyring(void)
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] key: Add placeholder arg to Diffie-Hellman syscall
2016-06-24 22:22 [PATCH v2] key: Add placeholder arg to Diffie-Hellman syscall Mat Martineau
@ 2016-06-24 22:36 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2016-06-24 22:36 UTC (permalink / raw)
To: ell
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]
Hi Mat,
On 06/24/2016 05:22 PM, Mat Martineau wrote:
> The final version of the KEYCTL_DH_COMPUTE syscall that went in to
> kernel 4.7 added a reserved arg. In the future, this arg will be used
> to optionally specify a key derivation function. For now, it's needed
> so the system call doesn't return -1 (errno == EINVAL) every time.
> ---
> ell/key.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-24 22:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-24 22:22 [PATCH v2] key: Add placeholder arg to Diffie-Hellman syscall Mat Martineau
2016-06-24 22:36 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.