linux/arch/sh/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
..
cpu sh: fix up sh7786 dmaengine build. 2010-05-22 17:12:23 +09:00
vsyscall
.gitignore
asm-offsets.c
clkdev.c fix typos concerning "precedence" 2010-06-17 11:31:19 +02:00
cpufreq.c
crash_dump.c sh: shuffle the elfcorehdr handling over to the crash dump code. 2010-05-07 17:58:55 +09:00
debugtraps.S
disassemble.c
dma-nommu.c
dumpstack.c
dwarf.c sh: handle early calls to return_address() when using dwarf unwinder. 2010-05-25 16:16:40 +09:00
entry-common.S
ftrace.c
head_32.S sh: Use correct mask when comparing PMB DATA array values 2010-04-25 20:44:23 +01:00
head_64.S
hw_breakpoint.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-05-19 11:36:03 -07:00
idle.c sh: CPU hotplug support. 2010-04-26 19:08:55 +09:00
init_task.c
io_generic.c sh: support for platforms without PIO. 2010-06-02 16:31:42 +09:00
io_trapped.c sh: support for platforms without PIO. 2010-06-02 16:31:42 +09:00
io.c sh: support for platforms without PIO. 2010-06-02 16:31:42 +09:00
irq_32.c
irq_64.c
irq.c sh: CPU hotplug support. 2010-04-26 19:08:55 +09:00
kgdb.c kgdb,sh: update superh kgdb exception handling 2010-05-20 21:04:20 -05:00
kprobes.c
localtimer.c sh: CPU hotplug support. 2010-04-26 19:08:55 +09:00
machine_kexec.c lmb: rename to memblock 2010-07-14 17:14:00 +10:00
machvec.c sh: support for platforms without PIO. 2010-06-02 16:31:42 +09:00
Makefile sh: support for platforms without PIO. 2010-06-02 16:31:42 +09:00
module.c
nmi_debug.c
perf_callchain.c
perf_event.c perf: Convert perf_event to local_t 2010-06-09 11:12:37 +02:00
process_32.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
process_64.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
process.c Merge branch 'sh/stable-updates' 2010-04-26 16:08:27 +09:00
ptrace_32.c ptrace: unify FDPIC implementations 2010-05-27 09:12:44 -07:00
ptrace_64.c
reboot.c
relocate_kernel.S
return_address.c sh: handle early calls to return_address() when using dwarf unwinder. 2010-05-25 16:16:40 +09:00
setup.c lmb: rename to memblock 2010-07-14 17:14:00 +10:00
sh_bios.c
sh_ksyms_32.c
sh_ksyms_64.c
signal_32.c
signal_64.c
smp.c sh: native_cpu_disable() build error when CONFIG_HOTPLUG_CPU=n 2010-04-29 23:28:38 +09:00
stacktrace.c
swsusp.c
sys_sh32.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
sys_sh64.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
sys_sh.c
syscalls_32.S
syscalls_64.S
time.c
topology.c sh: Flag present CPUs hotpluggable in topology registration. 2010-04-26 18:20:29 +09:00
traps_32.c
traps_64.c sh64: provide a stub per_cpu_trap_init() definition. 2010-05-18 15:23:48 +09:00
traps.c
unwinder.c
vmlinux.lds.S