linux/arch/um/kernel
David Howells d7627467b7 Make do_execve() take a const filename pointer
Make do_execve() take a const filename pointer so that kernel_execve() compiles
correctly on ARM:

arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type

This also requires the argv and envp arguments to be consted twice, once for
the pointer array and once for the strings the array points to.  This is
because do_execve() passes a pointer to the filename (now const) to
copy_strings_kernel().  A simpler alternative would be to cast the filename
pointer in do_execve() when it's passed to copy_strings_kernel().

do_execve() may not change any of the strings it is passed as part of the argv
or envp lists as they are some of them in .rodata, so marking these strings as
const should be fine.

Further kernel_execve() and sys_execve() need to be changed to match.

This has been test built on x86_64, frv, arm and mips.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-17 18:07:43 -07:00
..
skas arch/um: fix kunmap_atomic() call in skas/uaccess.c 2010-06-04 15:21:45 -07:00
asm-offsets.c
config.c.in uml: remove useless comments 2009-04-01 08:59:17 -07:00
dyn.lds.S Rename .data.init_irqstack to .data..init_irqstack. 2010-03-03 11:25:59 +01:00
exec.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
exitcode.c uml: convert to seq_file/proc_fops 2009-12-15 08:53:25 -08:00
gmon_syms.c uml: style fixes in arch/um/kernel 2008-02-05 09:44:30 -08:00
gprof_syms.c uml: style fixes in arch/um/kernel 2008-02-05 09:44:30 -08:00
init_task.c Rename .data.init_irqstack to .data..init_irqstack. 2010-03-03 11:25:59 +01:00
initrd.c uml: fix initrd printk 2008-02-23 17:12:13 -08:00
internal.h Mark arguments to certain syscalls as being const 2010-08-13 16:53:13 -07:00
irq.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ksyms.c Deal with missing exports for hostfs 2010-08-09 16:47:25 -04:00
Makefile arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 2009-09-20 12:28:22 +02:00
mem.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
physmem.c UML: make several more things static 2008-07-24 10:47:24 -07:00
process.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ptrace.c arch/um/kernel/ptrace.c: remove dead PROC_MM 2010-08-09 20:45:04 -07:00
reboot.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sigio.c uml: style fixes in arch/um/kernel 2008-02-05 09:44:30 -08:00
signal.c x86, um: sanitize uml sigcontext.h uses 2008-10-22 22:55:20 -07:00
smp.c cpumask: Use accessors for cpu_*_mask: um 2009-09-24 09:34:49 +09:30
syscall.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
sysrq.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
time.c um: Fix read_persistent_clock fallout 2010-08-03 20:36:07 +02:00
tlb.c uml: style fixes in arch/um/kernel 2008-02-05 09:44:30 -08:00
trap.c Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
uaccess.c UML: make several more things static 2008-07-24 10:47:24 -07:00
um_arch.c uml: deal with inaccessible address space start 2008-06-06 11:29:10 -07:00
umid.c uml: style fixes in arch/um/kernel 2008-02-05 09:44:30 -08:00
uml.lds.S Rename .data.init_irqstack to .data..init_irqstack. 2010-03-03 11:25:59 +01:00
vmlinux.lds.S arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 2009-09-20 12:28:22 +02:00