key: Change initialization of struct keyctl_dh_params
PATCH 1/1 key: Change initialization of struct keyctl_dh_params
Using a designated initializer with struct keyctl_dh_params has broken due to a kernel header file change to one of the member names, introduced in kernel v4.19-rc3:
https://lore.kernel.org/lkml/1735b3a4-2792-0ce4-3bf4-94fee5b50ff6(a)infradead.org/
If the member names are dropped from the initializer then the code will compile and work correctly before or after the kernel header change.
---
Thanks for reporting the breakage, Andreas.
ell/key.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
ell/key.c +1 -3
@@ -202,9 +202,7 @@ static long kernel_dh_compute(int32_t private, int32_t prime, int32_t base, {long result; -struct keyctl_dh_params params = { .private = private, - .prime = prime, - .base = base }; +struct keyctl_dh_params params = { private, prime, base }; result =syscall (__NR_keyctl,KEYCTL_DH_COMPUTE , ¶ms, payload, len,NULL );
Signature · 1 line
2.19.0
Denis Kenzior
AppliedHi Mat,
Quoted 9 lines · Mat Martineau
Using a designated initializer with struct
keyctl_dh_paramshas broken due to a kernel header file change to one of the member names, introduced in kernel v4.19-rc3:https://lore.kernel.org/lkml/1735b3a4-2792-0ce4-3bf4-94fee5b50ff6(a)infradead.org/
If the member names are dropped from the initializer then the code will compile and work correctly before or after the kernel header change.
---
Applied, thanks.
Regards,
-Denis
Quoted 7 lines · Denis Kenzior
Hi Mat,
Quoted 4 lines · Mat Martineau
Using a designated initializer with struct
keyctl_dh_paramshas broken due to a kernel header file change to one of the member names, introduced in kernel v4.19-rc3:
Quoted 7 lines
Quoted 5 lines
https://lore.kernel.org/lkml/1735b3a4-2792-0ce4-3bf4-94fee5b50ff6(a)infradead.org/
If the member names are dropped from the initializer then the code will compile and work correctly before or after the kernel header change.
---Applied, thanks.
The good news is that the kernel change causing this headache has been reverted for the upcoming v4.19-rc6.
The bad news is that it found its way in to v4.14.{70,71} and v4.18.{8,9}. The revert was cc'd to stable (but I don't see them in stable-queue yet).
--
Mat Martineau
Intel OTC