Skip to content

Commit 0fa8ab5

Browse files
committed
linux/syscalls.h: add missing __user annotations
A couple of declarations in linux/syscalls.h are missing __user annotations on their pointers, which can lead to warnings from sparse because these don't match the implementation that have the correct address space annotations. Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 295f100 commit 0fa8ab5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

include/linux/syscalls.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,13 @@ asmlinkage long sys_io_pgetevents(aio_context_t ctx_id,
322322
long nr,
323323
struct io_event __user *events,
324324
struct __kernel_timespec __user *timeout,
325-
const struct __aio_sigset *sig);
325+
const struct __aio_sigset __user *sig);
326326
asmlinkage long sys_io_pgetevents_time32(aio_context_t ctx_id,
327327
long min_nr,
328328
long nr,
329329
struct io_event __user *events,
330330
struct old_timespec32 __user *timeout,
331-
const struct __aio_sigset *sig);
331+
const struct __aio_sigset __user *sig);
332332
asmlinkage long sys_io_uring_setup(u32 entries,
333333
struct io_uring_params __user *p);
334334
asmlinkage long sys_io_uring_enter(unsigned int fd, u32 to_submit,
@@ -441,7 +441,7 @@ asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group);
441441
asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
442442
umode_t mode);
443443
asmlinkage long sys_openat2(int dfd, const char __user *filename,
444-
struct open_how *how, size_t size);
444+
struct open_how __user *how, size_t size);
445445
asmlinkage long sys_close(unsigned int fd);
446446
asmlinkage long sys_close_range(unsigned int fd, unsigned int max_fd,
447447
unsigned int flags);
@@ -555,7 +555,7 @@ asmlinkage long sys_get_robust_list(int pid,
555555
asmlinkage long sys_set_robust_list(struct robust_list_head __user *head,
556556
size_t len);
557557

558-
asmlinkage long sys_futex_waitv(struct futex_waitv *waiters,
558+
asmlinkage long sys_futex_waitv(struct futex_waitv __user *waiters,
559559
unsigned int nr_futexes, unsigned int flags,
560560
struct __kernel_timespec __user *timeout, clockid_t clockid);
561561

@@ -907,7 +907,7 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags,
907907
asmlinkage long sys_getrandom(char __user *buf, size_t count,
908908
unsigned int flags);
909909
asmlinkage long sys_memfd_create(const char __user *uname_ptr, unsigned int flags);
910-
asmlinkage long sys_bpf(int cmd, union bpf_attr *attr, unsigned int size);
910+
asmlinkage long sys_bpf(int cmd, union bpf_attr __user *attr, unsigned int size);
911911
asmlinkage long sys_execveat(int dfd, const char __user *filename,
912912
const char __user *const __user *argv,
913913
const char __user *const __user *envp, int flags);
@@ -960,11 +960,11 @@ asmlinkage long sys_cachestat(unsigned int fd,
960960
struct cachestat_range __user *cstat_range,
961961
struct cachestat __user *cstat, unsigned int flags);
962962
asmlinkage long sys_map_shadow_stack(unsigned long addr, unsigned long size, unsigned int flags);
963-
asmlinkage long sys_lsm_get_self_attr(unsigned int attr, struct lsm_ctx *ctx,
964-
u32 *size, u32 flags);
965-
asmlinkage long sys_lsm_set_self_attr(unsigned int attr, struct lsm_ctx *ctx,
963+
asmlinkage long sys_lsm_get_self_attr(unsigned int attr, struct lsm_ctx __user *ctx,
964+
u32 __user *size, u32 flags);
965+
asmlinkage long sys_lsm_set_self_attr(unsigned int attr, struct lsm_ctx __user *ctx,
966966
u32 size, u32 flags);
967-
asmlinkage long sys_lsm_list_modules(u64 *ids, u32 *size, u32 flags);
967+
asmlinkage long sys_lsm_list_modules(u64 __user *ids, u32 __user *size, u32 flags);
968968

969969
/*
970970
* Architecture-specific system calls

0 commit comments

Comments
 (0)