android_kernel_xiaomi_sm8350/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
asm-offsets.c xtensa: Shuffle include statements to fix linker script 2010-05-02 01:05:13 -07:00
coprocessor.S
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
io.c
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
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
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
signal.c
syscall.c
time.c xtensa: Fix unnecessary setting of xtime 2010-03-13 00:36:37 +01:00
traps.c
vectors.S xtensa: includecheck fix: vectors.S 2010-05-25 08:06:56 -07:00
vmlinux.lds.S
xtensa_ksyms.c