linux/arch/cris/arch-v10/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
..
crisksyms.c [CRIS] Move header files from include to arch/cris/include. 2008-10-29 17:29:44 +01:00
debugport.c [CRIS] Move header files from include to arch/cris/include. 2008-10-29 17:29:44 +01:00
dma.c CRISv10: remove redundant tests on unsigned 2009-06-23 10:05:05 +02:00
entry.S Add generic sys_old_mmap() 2010-03-12 15:52:32 -08:00
fasttimer.c CRIS: Fasttimer: Remove obsolete ifdef 2010-08-04 12:59:42 +02:00
head.S CRIS: Correct address of the romfs in boot image 2010-08-04 12:59:43 +02:00
io_interface_mux.c [CRIS] Move header files from include to arch/cris/include. 2008-10-29 17:29:44 +01:00
irq.c CRIS: Don't use mask_irq as symbol name 2010-05-25 17:48:14 +02:00
kgdb.c [CRIS] Move header files from include to arch/cris/include. 2008-10-29 17:29:44 +01:00
Makefile [PATCH] CRIS update: drivers 2005-07-27 16:25:59 -07:00
process.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
ptrace.c cris arch-v10: use generic ptrace_resume code 2010-03-12 15:52:39 -08:00
setup.c cris: ARRAY_SIZE() cleanup 2007-11-14 18:45:46 -08:00
shadows.c CRIS v10: Remove useless CVS id from kernel/shadows.c 2008-02-08 11:06:31 +01:00
signal.c CRIS v10: correct do_signal to fix oops and clean up signal handling in general 2008-01-14 08:52:23 -08:00
time.c CRIS: GENERIC_TIME fixes 2010-08-04 12:58:55 +02:00
traps.c [CRIS] Move header files from include to arch/cris/include. 2008-10-29 17:29:44 +01:00