WSL2-Linux-Kernel/arch/frv/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
..
Makefile
asm-offsets.c
break.S Rename special text sections in arch/frv from .text.XXX to .text..XXX. 2010-03-03 11:26:01 +01:00
cmode.S
debug-stub.c misc: remove redundant start_kernel prototypes 2009-09-23 10:05:22 -07:00
dma.c
entry-table.S
entry.S Rename special text sections in arch/frv from .text.XXX to .text..XXX. 2010-03-03 11:26:01 +01:00
frv_ksyms.c FRV: Implement atomic64_t 2009-07-01 19:38:09 -07:00
futex.c
gdb-io.c frv: extend gdbstub to support more features of gdb 2010-05-25 08:07:02 -07:00
gdb-io.h
gdb-stub.c FRV: Reinstate null behaviour for the GDB remote protocol 'p' command 2010-06-09 12:42:44 -07:00
head-mmu-fr451.S FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
head-uc-fr401.S FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
head-uc-fr451.S FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
head-uc-fr555.S FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
head.S Rename special text sections in arch/frv from .text.XXX to .text..XXX. 2010-03-03 11:26:01 +01:00
head.inc
init_task.c Use new __init_task_data macro in arch init_task.c files. 2009-09-21 06:27:08 +02:00
irq-mb93091.c
irq-mb93093.c
irq-mb93493.c
irq.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
kernel_execve.S
kernel_thread.S
local.h
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
module.c module: cleanup FIXME comments about trimming exception table entries. 2009-06-12 21:47:05 +09:30
pm-mb93093.c
pm.c sysctl: Drop & in front of every proc_handler. 2009-11-18 08:37:40 -08:00
process.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
ptrace.c ptrace: unify FDPIC implementations 2010-05-27 09:12:44 -07:00
setup.c kbuild: move utsrelease.h to include/generated 2009-12-12 13:08:15 +01:00
signal.c frv: fix check on unsigned in do_signal() 2009-10-29 07:39:32 -07:00
sleep.S
switch_to.S
sys_frv.c Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
sysctl.c frv: remove "struct file *" argument from sysctl ->proc_handler 2010-05-27 09:12:56 -07:00
time.c frv: Convert frv to use read/update_persistent_clock 2010-03-13 01:14:09 +01:00
traps.c
uaccess.c FRV: BUG to BUG_ON changes 2009-06-11 09:01:26 -07:00
vmlinux.lds.S Rename special text sections in arch/frv from .text.XXX to .text..XXX. 2010-03-03 11:26:01 +01:00