WSL2-Linux-Kernel/arch/mips/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
..
cpufreq MIPS: Use set_cpus_allowed_ptr 2010-05-21 21:31:14 +01:00
.gitignore
8250-platform.c
Makefile MIPS: kprobe: Add support. 2010-08-05 13:26:29 +01:00
asm-offsets.c MIPS: Remove unused task_struct.trap_no field. 2010-08-05 13:26:30 +01:00
binfmt_elfn32.c
binfmt_elfo32.c
branch.c
cevt-bcm1480.c
cevt-ds1287.c
cevt-gt641xx.c MIPS: GT641xx: Convert timer lock to raw spinlock. 2010-02-27 12:53:37 +01:00
cevt-r4k.c MIPS: Don't overflow cevt-r4k.c calculations at high clock rates. 2010-08-05 13:25:39 +01:00
cevt-sb1250.c
cevt-smtc.c
cevt-txx9.c
cpu-bugs64.c MIPS: uasm: Add option to export uasm API. 2010-08-05 13:26:21 +01:00
cpu-probe.c MIPS: Decode core number for R2 CPUs. 2010-08-05 13:26:26 +01:00
csrc-bcm1480.c
csrc-ioasic.c
csrc-powertv.c
csrc-r4k.c
csrc-sb1250.c
early_printk.c
entry.S
ftrace.c MIPS: Tracing: Cleanup of address space checking 2010-07-05 17:17:30 +01:00
genex.S
gpio_txx9.c
head.S
i8253.c i8253: Convert i8253_lock to raw_spinlock 2010-03-02 10:28:38 +01:00
i8259.c MIPS: i8259: Convert IRQ controller lock to raw spinlock. 2010-02-27 12:53:38 +01:00
init_task.c
irq-gic.c
irq-gt641xx.c MIPS: GT641xx: Convert IRQ controller lock to raw spinlock. 2010-02-27 12:53:31 +01:00
irq-msc01.c
irq-rm7000.c
irq-rm9000.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
irq_cpu.c
irq_txx9.c
kgdb.c kgdb,mips: remove unused kgdb_cpu_doing_single_step operations 2010-08-05 09:22:25 -05:00
kprobes.c MIPS: kprobe: Add support. 2010-08-05 13:26:29 +01:00
kspd.c
linux32.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
machine_kexec.c
mcount.S MIPS: tracing: Fix the indentation of mcount.S 2010-08-05 13:26:06 +01:00
mips-mt-fpaff.c MIPS: MT: Fix FPU affinity. 2010-07-05 17:17:32 +01:00
mips-mt.c
mips_ksyms.c
module.c
octeon_switch.S MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
proc.c
process.c MIPS: Trace: Don't trace irqsoff for the idle process 2010-04-12 17:26:10 +01:00
ptrace.c mips: use generic ptrace_resume code 2010-03-12 15:52:39 -08:00
ptrace32.c
r4k_fpu.S
r4k_switch.S
r2300_fpu.S
r2300_switch.S
r6000_fpu.S
relocate_kernel.S
reset.c
rtlx.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
scall32-o32.S
scall64-64.S
scall64-n32.S MIPS: N32: Fix syscall number comments. 2010-08-05 13:25:39 +01:00
scall64-o32.S improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
setup.c MIPS: nofpu and nodsp only affect CPU0 2010-05-21 21:31:17 +01:00
signal-common.h MIPS: Move signal trampolines off of the stack. 2010-04-12 17:26:15 +01:00
signal.c MIPS: Move signal trampolines off of the stack. 2010-04-12 17:26:15 +01:00
signal32.c MIPS: Move signal trampolines off of the stack. 2010-04-12 17:26:15 +01:00
signal_n32.c MIPS: Move signal trampolines off of the stack. 2010-04-12 17:26:15 +01:00
smp-cmp.c
smp-mt.c
smp-up.c
smp.c MIPS: Export __cpu_number_map and __cpu_logical_map. 2010-08-05 13:26:21 +01:00
smtc-asm.S
smtc-proc.c
smtc.c MIPS: SMTC: Use %p to format pointers 2010-08-05 13:26:26 +01:00
spinlock_test.c MIPS: Crazy spinlock speed test. 2010-02-27 12:53:42 +01:00
spram.c
stacktrace.c
sync-r4k.c
syscall.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
time.c
topology.c
traps.c MIPS: Clean up notify_die() usage. 2010-08-05 13:26:30 +01:00
unaligned.c
vdso.c MIPS: Make init_vdso a subsys_initcall. 2010-07-26 19:08:16 +01:00
vmlinux.lds.S
vpe.c MIPS: Don't include <linux/smp_lock.h> unnecessarily. 2010-02-27 12:52:57 +01:00
watch.c