aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2010-08-11 06:26:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-13 19:53:13 -0400
commitc7887325230aec47d47a32562a6e26014a0fafca (patch)
tree10535943dace59ddb01d3440aa582bc4640e8016 /include
parentb84ae4a1401a731ef5fee987c0cb08743838dda7 (diff)
Mark arguments to certain syscalls as being const
Mark arguments to certain system calls as being const where they should be but aren't. The list includes: (*) The filename arguments of various stat syscalls, execve(), various utimes syscalls and some mount syscalls. (*) The filename arguments of some syscall helpers relating to the above. (*) The buffer argument of various write syscalls. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/compat.h6
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/syscalls.h20
-rw-r--r--include/linux/time.h2
4 files changed, 17 insertions, 17 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 168f7daa7bde..9ddc8780e8db 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -331,7 +331,7 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
331 const compat_sigset_t __user *sigmask, 331 const compat_sigset_t __user *sigmask,
332 compat_size_t sigsetsize); 332 compat_size_t sigsetsize);
333 333
334asmlinkage long compat_sys_utimensat(unsigned int dfd, char __user *filename, 334asmlinkage long compat_sys_utimensat(unsigned int dfd, const char __user *filename,
335 struct compat_timespec __user *t, int flags); 335 struct compat_timespec __user *t, int flags);
336 336
337asmlinkage long compat_sys_signalfd(int ufd, 337asmlinkage long compat_sys_signalfd(int ufd,
@@ -348,9 +348,9 @@ asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
348 const int __user *nodes, 348 const int __user *nodes,
349 int __user *status, 349 int __user *status,
350 int flags); 350 int flags);
351asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, 351asmlinkage long compat_sys_futimesat(unsigned int dfd, const char __user *filename,
352 struct compat_timeval __user *t); 352 struct compat_timeval __user *t);
353asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, 353asmlinkage long compat_sys_newfstatat(unsigned int dfd, const char __user * filename,
354 struct compat_stat __user *statbuf, 354 struct compat_stat __user *statbuf,
355 int flag); 355 int flag);
356asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, 356asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7a0625e26a39..5f0ca2fbb2a0 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2320,10 +2320,10 @@ void inode_set_bytes(struct inode *inode, loff_t bytes);
2320 2320
2321extern int vfs_readdir(struct file *, filldir_t, void *); 2321extern int vfs_readdir(struct file *, filldir_t, void *);
2322 2322
2323extern int vfs_stat(char __user *, struct kstat *); 2323extern int vfs_stat(const char __user *, struct kstat *);
2324extern int vfs_lstat(char __user *, struct kstat *); 2324extern int vfs_lstat(const char __user *, struct kstat *);
2325extern int vfs_fstat(unsigned int, struct kstat *); 2325extern int vfs_fstat(unsigned int, struct kstat *);
2326extern int vfs_fstatat(int , char __user *, struct kstat *, int); 2326extern int vfs_fstatat(int , const char __user *, struct kstat *, int);
2327 2327
2328extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, 2328extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
2329 unsigned long arg); 2329 unsigned long arg);
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 1b67bd333b5e..6e5d19788634 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -394,7 +394,7 @@ asmlinkage long sys_umount(char __user *name, int flags);
394asmlinkage long sys_oldumount(char __user *name); 394asmlinkage long sys_oldumount(char __user *name);
395asmlinkage long sys_truncate(const char __user *path, long length); 395asmlinkage long sys_truncate(const char __user *path, long length);
396asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length); 396asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length);
397asmlinkage long sys_stat(char __user *filename, 397asmlinkage long sys_stat(const char __user *filename,
398 struct __old_kernel_stat __user *statbuf); 398 struct __old_kernel_stat __user *statbuf);
399asmlinkage long sys_statfs(const char __user * path, 399asmlinkage long sys_statfs(const char __user * path,
400 struct statfs __user *buf); 400 struct statfs __user *buf);
@@ -403,21 +403,21 @@ asmlinkage long sys_statfs64(const char __user *path, size_t sz,
403asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user *buf); 403asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user *buf);
404asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz, 404asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz,
405 struct statfs64 __user *buf); 405 struct statfs64 __user *buf);
406asmlinkage long sys_lstat(char __user *filename, 406asmlinkage long sys_lstat(const char __user *filename,
407 struct __old_kernel_stat __user *statbuf); 407 struct __old_kernel_stat __user *statbuf);
408asmlinkage long sys_fstat(unsigned int fd, 408asmlinkage long sys_fstat(unsigned int fd,
409 struct __old_kernel_stat __user *statbuf); 409 struct __old_kernel_stat __user *statbuf);
410asmlinkage long sys_newstat(char __user *filename, 410asmlinkage long sys_newstat(const char __user *filename,
411 struct stat __user *statbuf); 411 struct stat __user *statbuf);
412asmlinkage long sys_newlstat(char __user *filename, 412asmlinkage long sys_newlstat(const char __user *filename,
413 struct stat __user *statbuf); 413 struct stat __user *statbuf);
414asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf); 414asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf);
415asmlinkage long sys_ustat(unsigned dev, struct ustat __user *ubuf); 415asmlinkage long sys_ustat(unsigned dev, struct ustat __user *ubuf);
416#if BITS_PER_LONG == 32 416#if BITS_PER_LONG == 32
417asmlinkage long sys_stat64(char __user *filename, 417asmlinkage long sys_stat64(const char __user *filename,
418 struct stat64 __user *statbuf); 418 struct stat64 __user *statbuf);
419asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf); 419asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf);
420asmlinkage long sys_lstat64(char __user *filename, 420asmlinkage long sys_lstat64(const char __user *filename,
421 struct stat64 __user *statbuf); 421 struct stat64 __user *statbuf);
422asmlinkage long sys_truncate64(const char __user *path, loff_t length); 422asmlinkage long sys_truncate64(const char __user *path, loff_t length);
423asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length); 423asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length);
@@ -760,7 +760,7 @@ asmlinkage long sys_linkat(int olddfd, const char __user *oldname,
760 int newdfd, const char __user *newname, int flags); 760 int newdfd, const char __user *newname, int flags);
761asmlinkage long sys_renameat(int olddfd, const char __user * oldname, 761asmlinkage long sys_renameat(int olddfd, const char __user * oldname,
762 int newdfd, const char __user * newname); 762 int newdfd, const char __user * newname);
763asmlinkage long sys_futimesat(int dfd, char __user *filename, 763asmlinkage long sys_futimesat(int dfd, const char __user *filename,
764 struct timeval __user *utimes); 764 struct timeval __user *utimes);
765asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode); 765asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode);
766asmlinkage long sys_fchmodat(int dfd, const char __user * filename, 766asmlinkage long sys_fchmodat(int dfd, const char __user * filename,
@@ -769,13 +769,13 @@ asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user,
769 gid_t group, int flag); 769 gid_t group, int flag);
770asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, 770asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
771 int mode); 771 int mode);
772asmlinkage long sys_newfstatat(int dfd, char __user *filename, 772asmlinkage long sys_newfstatat(int dfd, const char __user *filename,
773 struct stat __user *statbuf, int flag); 773 struct stat __user *statbuf, int flag);
774asmlinkage long sys_fstatat64(int dfd, char __user *filename, 774asmlinkage long sys_fstatat64(int dfd, const char __user *filename,
775 struct stat64 __user *statbuf, int flag); 775 struct stat64 __user *statbuf, int flag);
776asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, 776asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf,
777 int bufsiz); 777 int bufsiz);
778asmlinkage long sys_utimensat(int dfd, char __user *filename, 778asmlinkage long sys_utimensat(int dfd, const char __user *filename,
779 struct timespec __user *utimes, int flags); 779 struct timespec __user *utimes, int flags);
780asmlinkage long sys_unshare(unsigned long unshare_flags); 780asmlinkage long sys_unshare(unsigned long unshare_flags);
781 781
diff --git a/include/linux/time.h b/include/linux/time.h
index 12612701b1ae..9f15ac7ab92a 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -150,7 +150,7 @@ extern void do_gettimeofday(struct timeval *tv);
150extern int do_settimeofday(struct timespec *tv); 150extern int do_settimeofday(struct timespec *tv);
151extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); 151extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
152#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) 152#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
153extern long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags); 153extern long do_utimes(int dfd, const char __user *filename, struct timespec *times, int flags);
154struct itimerval; 154struct itimerval;
155extern int do_setitimer(int which, struct itimerval *value, 155extern int do_setitimer(int which, struct itimerval *value,
156 struct itimerval *ovalue); 156 struct itimerval *ovalue);