Skip to contentSkip to conversation

Fix the declaration of sys_execve() in asm-generic/syscalls.h

PATCH In review David Howells 2 participants 2 messages Aug 18, 2010 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix the declaration of sys_execve() in asm-generic/syscalls.h

Fix the declaration of sys_execve() in asm-generic/syscalls.h to have various consts applied to its pointers.

---

 include/asm-generic/syscalls.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
include/asm-generic/syscalls.h +4 -2
index df84e3b..d89dec8 100644
@@ -23,8 +23,10 @@ asmlinkage long sys_vfork(struct pt_regs *regs);
 #endif
 
 #ifndef sys_execve
-asmlinkage long sys_execve(char __user *filename, char __user * __user *argv,
-			char __user * __user *envp, struct pt_regs *regs);
+asmlinkage long sys_execve(const char __user *filename,
+			   const char __user *const __user *argv,
+			   const char __user *const __user *envp,
+			   struct pt_regs *regs);
 #endif
 
 #ifndef sys_mmap2
#1 lore raw
Quoted 3 lines · On Wed, 18 Aug 2010 18:55:33 +0100 David Howells <[email protected]> wrote:

Fix the declaration of sys_execve() in asm-generic/syscalls.h to have various consts applied to its pointers.

crappy changelog :(

Quoted 12 lines

---

 include/asm-generic/syscalls.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
include/asm-generic/syscalls.h +0 -0
index df84e3b..d89dec8 100644
@@ -23,8 +23,10 @@ asmlinkage long sys_vfork(struct pt_regs *regs);
 #endif
 

include/asm-generic/syscalls.h asmlinkage long sys_vfork(struct pt_regs *regs); · line 32

Quoted 10 lines
include/asm-generic/syscalls.h +4 -2
 #ifndef sys_execve
-asmlinkage long sys_execve(char __user *filename, char __user * __user *argv,
-			char __user * __user *envp, struct pt_regs *regs);
+asmlinkage long sys_execve(const char __user *filename,
+			   const char __user *const __user *argv,
+			   const char __user *const __user *envp,
+			   struct pt_regs *regs);
 #endif
 
 #ifndef sys_mmap2

Is this recent breakage?

In what way does the problem exhibit itself?

If we know these things we can then work out if the patch is needed in 2.6.36 and -stable.