linux-stable-rt/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
Makefile sh: support for platforms without PIO. 2010-06-02 16:31:42 +09:00
asm-offsets.c
clkdev.c fix typos concerning "precedence" 2010-06-17 11:31:19 +02:00
cpufreq.c
crash_dump.c
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
head_64.S
hw_breakpoint.c
idle.c
init_task.c
io.c sh: support for platforms without PIO. 2010-06-02 16:31:42 +09:00
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
irq.c
irq_32.c
irq_64.c
kgdb.c
kprobes.c
localtimer.c
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
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.c
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
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
stacktrace.c
swsusp.c
sys_sh.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
syscalls_32.S
syscalls_64.S
time.c
topology.c
traps.c
traps_32.c
traps_64.c
unwinder.c
vmlinux.lds.S