WSL2-Linux-Kernel/arch/tile/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 arch/tile: Add driver to enable access to the user dynamic network. 2010-07-06 13:34:15 -04:00
asm-offsets.c arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
backtrace.c arch/tile: support backtracing on TILE-Gx 2010-08-13 08:40:57 -04:00
compat.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
compat_signal.c arch/tile: Fix a couple of issues with the COMPAT code for TILE-Gx. 2010-08-13 08:32:21 -04:00
early_printk.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
entry.S arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
hardwall.c arch/tile: check kmalloc() result 2010-07-16 13:37:14 -04:00
head_32.S arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
hvglue.lds arch/tile: Enable more sophisticated IRQ model for 32-bit chips. 2010-07-06 13:34:01 -04:00
init_task.c arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
intvec_32.S arch/tile: extend syscall ABI to set r1 on return as well. 2010-08-13 16:37:00 -04:00
irq.c arch/tile: Enable more sophisticated IRQ model for 32-bit chips. 2010-07-06 13:34:01 -04:00
machine_kexec.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
messaging.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
module.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
pci-dma.c arch/tile: Do not use GFP_KERNEL for dma_alloc_coherent(). 2010-06-05 10:26:55 -04:00
proc.c arch: tile: kernel/proc.c Removed duplicated #include 2010-08-13 08:10:16 -04:00
process.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
ptrace.c arch/tile: avoid erroneous error return for PTRACE_POKEUSR. 2010-07-06 13:42:10 -04:00
reboot.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
regs_32.S arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
relocate_kernel.S arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
setup.c arch/tile: correct a bug in freeing bootmem by VA for the optional second initrd. 2010-08-13 08:23:07 -04:00
signal.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
single_step.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
smp.c arch/tile: Enable more sophisticated IRQ model for 32-bit chips. 2010-07-06 13:34:01 -04:00
smpboot.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
stack.c arch/tile: support backtracing on TILE-Gx 2010-08-13 08:40:57 -04:00
sys.c arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00
tile-desc_32.c arch/tile: Shrink the tile-opcode files considerably. 2010-07-06 13:40:56 -04:00
time.c arch/tile: Use separate, better minsec values for clocksource and sched_clock. 2010-08-13 08:24:22 -04:00
tlb.c arch/tile: core support for Tilera 32-bit chips. 2010-06-04 17:11:18 -04:00
traps.c arch/tile: support backtracing on TILE-Gx 2010-08-13 08:40:57 -04:00
vmlinux.lds.S arch/tile: Miscellaneous cleanup changes. 2010-07-06 13:41:51 -04:00