linux/arch/xtensa/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
..
align.S [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
asm-offsets.c xtensa: Shuffle include statements to fix linker script 2010-05-02 01:05:13 -07:00
coprocessor.S [XTENSA] Add support for configurable registers and coprocessors 2008-02-13 17:41:43 -08:00
entry.S xtensa: Shuffle include statements to fix linker script 2010-05-02 01:05:13 -07:00
head.S xtensa: Fixes due to bss boundary symbol name changes. 2010-05-01 23:05:29 -07:00
init_task.c Use new __init_task_data macro in arch init_task.c files. 2009-09-21 06:27:08 +02:00
io.c [XTENSA] Move string-io functions to io.c from pci.c 2007-08-27 13:53:22 -07:00
irq.c xtensa: convert to asm-generic/hardirq.h 2010-05-25 08:06:56 -07:00
Makefile xtensa: Fix linker script patch-up 2010-05-01 23:00:07 -07:00
module.c module: cleanup FIXME comments about trimming exception table entries. 2009-06-12 21:47:05 +09:30
pci-dma.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
pci.c resource/PCI: mark struct resource as const 2010-02-22 16:16:57 -08:00
platform.c xtensa: remove platform rtc hooks 2009-04-02 23:45:07 -07:00
process.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
ptrace.c xtensa: use generic ptrace_resume code 2010-03-12 15:52:39 -08:00
setup.c xtensa: nommu support 2009-04-02 23:41:50 -07:00
signal.c [XTENSA] Add support for the sa_restorer function 2008-02-13 17:42:31 -08:00
syscall.c sanitize do_pipe_flags() callers in arch 2009-12-16 12:16:40 -05:00
time.c xtensa: Fix unnecessary setting of xtime 2010-03-13 00:36:37 +01:00
traps.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
vectors.S xtensa: includecheck fix: vectors.S 2010-05-25 08:06:56 -07:00
vmlinux.lds.S xtensa: Cleanup linker script using new linker script macros. 2009-09-24 17:16:21 -07:00
xtensa_ksyms.c remove unneeded #include <linux/ide.h>'s 2008-08-05 18:17:00 +02:00