diff options
author | David Howells <dhowells@redhat.com> | 2010-08-11 06:26:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-13 19:53:13 -0400 |
commit | c7887325230aec47d47a32562a6e26014a0fafca (patch) | |
tree | 10535943dace59ddb01d3440aa582bc4640e8016 /arch/arm/kernel | |
parent | b84ae4a1401a731ef5fee987c0cb08743838dda7 (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 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/sys_arm.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/sys_oabi-compat.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index c23501842b98..5b7c541a4c63 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
@@ -62,7 +62,7 @@ asmlinkage int sys_vfork(struct pt_regs *regs) | |||
62 | /* sys_execve() executes a new program. | 62 | /* sys_execve() executes a new program. |
63 | * This is called indirectly via a small wrapper | 63 | * This is called indirectly via a small wrapper |
64 | */ | 64 | */ |
65 | asmlinkage int sys_execve(char __user *filenamei, char __user * __user *argv, | 65 | asmlinkage int sys_execve(const char __user *filenamei, char __user * __user *argv, |
66 | char __user * __user *envp, struct pt_regs *regs) | 66 | char __user * __user *envp, struct pt_regs *regs) |
67 | { | 67 | { |
68 | int error; | 68 | int error; |
@@ -84,7 +84,7 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | |||
84 | int ret; | 84 | int ret; |
85 | 85 | ||
86 | memset(®s, 0, sizeof(struct pt_regs)); | 86 | memset(®s, 0, sizeof(struct pt_regs)); |
87 | ret = do_execve((char *)filename, (char __user * __user *)argv, | 87 | ret = do_execve(filename, (char __user * __user *)argv, |
88 | (char __user * __user *)envp, ®s); | 88 | (char __user * __user *)envp, ®s); |
89 | if (ret < 0) | 89 | if (ret < 0) |
90 | goto out; | 90 | goto out; |
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 33ff678e32f2..4ad8da15ef2b 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -141,7 +141,7 @@ static long cp_oldabi_stat64(struct kstat *stat, | |||
141 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 141 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
142 | } | 142 | } |
143 | 143 | ||
144 | asmlinkage long sys_oabi_stat64(char __user * filename, | 144 | asmlinkage long sys_oabi_stat64(const char __user * filename, |
145 | struct oldabi_stat64 __user * statbuf) | 145 | struct oldabi_stat64 __user * statbuf) |
146 | { | 146 | { |
147 | struct kstat stat; | 147 | struct kstat stat; |
@@ -151,7 +151,7 @@ asmlinkage long sys_oabi_stat64(char __user * filename, | |||
151 | return error; | 151 | return error; |
152 | } | 152 | } |
153 | 153 | ||
154 | asmlinkage long sys_oabi_lstat64(char __user * filename, | 154 | asmlinkage long sys_oabi_lstat64(const char __user * filename, |
155 | struct oldabi_stat64 __user * statbuf) | 155 | struct oldabi_stat64 __user * statbuf) |
156 | { | 156 | { |
157 | struct kstat stat; | 157 | struct kstat stat; |
@@ -172,7 +172,7 @@ asmlinkage long sys_oabi_fstat64(unsigned long fd, | |||
172 | } | 172 | } |
173 | 173 | ||
174 | asmlinkage long sys_oabi_fstatat64(int dfd, | 174 | asmlinkage long sys_oabi_fstatat64(int dfd, |
175 | char __user *filename, | 175 | const char __user *filename, |
176 | struct oldabi_stat64 __user *statbuf, | 176 | struct oldabi_stat64 __user *statbuf, |
177 | int flag) | 177 | int flag) |
178 | { | 178 | { |