Skip to content

RFC init: make sure syscall arguments are marked __user where needed

H Hartley Sweeten lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2init: introduce private syscall wrappers for non-user space pointersinit/do_mounts.h+105 -20 replies
2/2init: use private syscall wrappers for non-user space pointersinit/do_mounts.c init/do_mounts_initrd.c init/do_mounts_md.c +3 more+68 -650 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] init: make sure syscall arguments are marked __user where needed

When using syscall routines in the kernel, some of the arguments should be user pointers but are missing the __user markup. This produces a number of sparse warnings of the format:

warning: incorrect type in argument 1 (different address spaces)
expected char [noderef] <asn:1>*dev_name
got char *name

Wrap the syscall routines in the private do_mounts.h header so that the appropriate __user markups are added for the init mount code.

init: introduce private syscall wrappers for non-user space pointers
init: use private syscall wrappers for non-user space pointers

 init/do_mounts.c        |   14 +++---
 init/do_mounts.h        |  107 ++++++++++++++++++++++++++++++++++++++++++++++-
 init/do_mounts_initrd.c |   28 ++++++------
 init/do_mounts_md.c     |    6 +-
 init/do_mounts_rd.c     |   22 +++++-----
 init/initramfs.c        |   54 ++++++++++++-----------
 init/noinitramfs.c      |    9 ++--
 7 files changed, 173 insertions(+), 67 deletions(-)