UPSTREAM: seccomp: Remove bogus __user annotations
Buffers that are passed to read_actions_logged() and write_actions_logged() are in kernel memory; the sysctl core takes care of copying from/to userspace. Fixes:32927393dc("sysctl: pass kernel pointers to ->proc_handler") Reviewed-by: Tyler Hicks <code@tyhicks.com> Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20201120170545.1419332-1-jannh@google.com (cherry picked from commitfab686eb03) Signed-off-by: Jeff Vander Stoep <jeffv@google.com> Change-Id: I378d1eb73ff01928d3255191ed4443cd7b87c720 Bug: 176068146
This commit is contained in:
committed by
Jeffrey Vander Stoep
parent
3f6dfb0123
commit
6212e56b38
@@ -2198,7 +2198,7 @@ static bool seccomp_actions_logged_from_names(u32 *actions_logged, char *names)
|
||||
return true;
|
||||
}
|
||||
|
||||
static int read_actions_logged(struct ctl_table *ro_table, void __user *buffer,
|
||||
static int read_actions_logged(struct ctl_table *ro_table, void *buffer,
|
||||
size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
char names[sizeof(seccomp_actions_avail)];
|
||||
@@ -2216,7 +2216,7 @@ static int read_actions_logged(struct ctl_table *ro_table, void __user *buffer,
|
||||
return proc_dostring(&table, 0, buffer, lenp, ppos);
|
||||
}
|
||||
|
||||
static int write_actions_logged(struct ctl_table *ro_table, void __user *buffer,
|
||||
static int write_actions_logged(struct ctl_table *ro_table, void *buffer,
|
||||
size_t *lenp, loff_t *ppos, u32 *actions_logged)
|
||||
{
|
||||
char names[sizeof(seccomp_actions_avail)];
|
||||
|
||||
Reference in New Issue
Block a user