* [PATCH 4/5] keyctl.h: update pointer types
@ 2018-09-27 13:14 Ben Boeckel
2018-09-27 17:08 ` David Howells
2018-09-27 18:37 ` Ben Boeckel
0 siblings, 2 replies; 3+ messages in thread
From: Ben Boeckel @ 2018-09-27 13:14 UTC (permalink / raw)
To: keyrings
These should be `const` since the kernel should not touch them. In
addition `otherinfo` is defined to be opaque, so make it a `void *`.
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
---
include/uapi/linux/keyctl.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/keyctl.h b/include/uapi/linux/keyctl.h
index 1a5a7948606e..6004e05b685b 100644
--- a/include/uapi/linux/keyctl.h
+++ b/include/uapi/linux/keyctl.h
@@ -76,8 +76,8 @@ struct keyctl_dh_params {
};
struct keyctl_kdf_params {
- char __user *hashname;
- char __user *otherinfo;
+ const char __user *hashname;
+ const void __user *otherinfo;
__u32 otherinfolen;
__u32 __spare[8];
};
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 4/5] keyctl.h: update pointer types
2018-09-27 13:14 [PATCH 4/5] keyctl.h: update pointer types Ben Boeckel
@ 2018-09-27 17:08 ` David Howells
2018-09-27 18:37 ` Ben Boeckel
1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2018-09-27 17:08 UTC (permalink / raw)
To: keyrings
Ben Boeckel <mathstuf@gmail.com> wrote:
> These should be `const` since the kernel should not touch them. In
> addition `otherinfo` is defined to be opaque, so make it a `void *`.
You're changing the UAPI - and this no longer matches what's in keyutils.h in
userspace.
The UAPI change might potentially cause userspace to fail to compile if
someone was assigning the char * pointer from the struct to another char *
pointer.
Unless there's an actual bug to fix (see the 'private' problem), I would
strongly recommend living with this.
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/5] keyctl.h: update pointer types
2018-09-27 13:14 [PATCH 4/5] keyctl.h: update pointer types Ben Boeckel
2018-09-27 17:08 ` David Howells
@ 2018-09-27 18:37 ` Ben Boeckel
1 sibling, 0 replies; 3+ messages in thread
From: Ben Boeckel @ 2018-09-27 18:37 UTC (permalink / raw)
To: keyrings
On Thu, Sep 27, 2018 at 18:08:03 +0100, David Howells wrote:
> Ben Boeckel <mathstuf@gmail.com> wrote:
> > These should be `const` since the kernel should not touch them. In
> > addition `otherinfo` is defined to be opaque, so make it a `void *`.
>
> You're changing the UAPI - and this no longer matches what's in keyutils.h in
> userspace.
Please see patch #5/7 of the keyutils patches on this thread for that change.
> The UAPI change might potentially cause userspace to fail to compile if
> someone was assigning the char * pointer from the struct to another char *
> pointer.
Is this in a released kernel? Isn't the KDF code being added in another
pull request of yours[1]?
--Ben
[1]https://lwn.net/Articles/764227/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-27 18:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-27 13:14 [PATCH 4/5] keyctl.h: update pointer types Ben Boeckel
2018-09-27 17:08 ` David Howells
2018-09-27 18:37 ` Ben Boeckel
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.