Commit 796e46f9 authored by Jann Horn's avatar Jann Horn Committed by David Howells

keys: Remove outdated __user annotations

When the semantics of the ->read() handlers were changed such that "buffer"
is a kernel pointer, some __user annotations survived.
Since they're wrong now, get rid of them.

Fixes: d3ec10aa ("KEYS: Don't write out to userspace while holding key semaphore")
Signed-off-by: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarBen Boeckel <mathstuf@gmail.com>
parent 634c21bb
...@@ -452,7 +452,7 @@ static void keyring_describe(const struct key *keyring, struct seq_file *m) ...@@ -452,7 +452,7 @@ static void keyring_describe(const struct key *keyring, struct seq_file *m)
struct keyring_read_iterator_context { struct keyring_read_iterator_context {
size_t buflen; size_t buflen;
size_t count; size_t count;
key_serial_t __user *buffer; key_serial_t *buffer;
}; };
static int keyring_read_iterator(const void *object, void *data) static int keyring_read_iterator(const void *object, void *data)
...@@ -479,7 +479,7 @@ static int keyring_read_iterator(const void *object, void *data) ...@@ -479,7 +479,7 @@ static int keyring_read_iterator(const void *object, void *data)
* times. * times.
*/ */
static long keyring_read(const struct key *keyring, static long keyring_read(const struct key *keyring,
char __user *buffer, size_t buflen) char *buffer, size_t buflen)
{ {
struct keyring_read_iterator_context ctx; struct keyring_read_iterator_context ctx;
long ret; long ret;
...@@ -491,7 +491,7 @@ static long keyring_read(const struct key *keyring, ...@@ -491,7 +491,7 @@ static long keyring_read(const struct key *keyring,
/* Copy as many key IDs as fit into the buffer */ /* Copy as many key IDs as fit into the buffer */
if (buffer && buflen) { if (buffer && buflen) {
ctx.buffer = (key_serial_t __user *)buffer; ctx.buffer = (key_serial_t *)buffer;
ctx.buflen = buflen; ctx.buflen = buflen;
ctx.count = 0; ctx.count = 0;
ret = assoc_array_iterate(&keyring->keys, ret = assoc_array_iterate(&keyring->keys,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment