linux/arch/sparc/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
..
.gitignore
apc.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
asm-offsets.c
audit.c
auxio_32.c No auxio on LEON 2009-11-16 02:54:07 -08:00
auxio_64.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
btext.c sparc64: Faster early-boot framebuffer console. 2009-11-27 17:33:43 -08:00
central.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
cherrs.S
chmc.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
compat_audit.c
cpu.c sparc, leon: Added Aeroflex Gaisler entry in manufacturer_info structure 2009-12-02 22:28:49 -08:00
cpumap.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
cpumap.h
devices.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6 2010-03-02 07:56:44 -08:00
dma.c
ds.c
dtlb_miss.S
dtlb_prot.S
ebus.c
entry.h sparc64: Kill off old sys_perfctr system call and state. 2010-03-03 08:08:49 -08:00
entry.S sparc64: Add syscall tracepoint support. 2009-12-11 00:44:47 -08:00
etrap_32.S
etrap_64.S
fpu_traps.S
ftrace.c sparc64: Add function graph tracer support. 2010-04-12 22:37:26 -07:00
getsetcc.S
head_32.S sparc,leon: Sparc-Leon SMP support 2009-11-02 04:19:42 -08:00
head_64.S
helpers.S sparc64: Fix perf_arch_get_caller_regs(). 2010-08-08 22:07:36 -07:00
hvapi.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
hvcalls.S
hvtramp.S
idprom.c
init_task.c
iommu_common.h
iommu.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
ioport.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
irq_32.c
irq_64.c sparc64: Run NMIs on the hardirq stack. 2010-04-14 02:04:29 -07:00
irq.h
itlb_miss.S
ivec.S
kernel.h
kgdb_32.c kgdb,sparc: Add in kgdb_arch_set_pc for sparc 2010-05-20 21:04:19 -05:00
kgdb_64.c kgdb,sparc: Add in kgdb_arch_set_pc for sparc 2010-05-20 21:04:19 -05:00
kprobes.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
kstack.h sparc64: Run NMIs on the hardirq stack. 2010-04-14 02:04:29 -07:00
ktlb.S sparc64: Increase vmalloc size to fix percpu regressions. 2009-09-28 14:39:58 -07:00
ldc.c sparc: use bitmap_find_next_zero_area 2009-12-16 07:20:19 -08:00
led.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
leon_kernel.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
leon_smp.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
Makefile sparc64: Add function graph tracer support. 2010-04-12 22:37:26 -07:00
mdesc.c lmb: rename to memblock 2010-07-14 17:14:00 +10:00
misctrap.S
module.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
muldiv.c
nmi.c sparc64: Run NMIs on the hardirq stack. 2010-04-14 02:04:29 -07:00
of_device_32.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
of_device_64.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
of_device_common.c of: make of_find_device_by_node generic 2010-07-24 09:58:22 -06:00
of_device_common.h
pci_common.c of: Always use 'struct device.of_node' to get device node pointer. 2010-05-18 16:10:44 -06:00
pci_fire.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
pci_impl.h sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
pci_msi.c of: Always use 'struct device.of_node' to get device node pointer. 2010-05-18 16:10:44 -06:00
pci_psycho.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
pci_sabre.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
pci_schizo.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
pci_sun4v_asm.S
pci_sun4v.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
pci_sun4v.h
pci.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
pcic.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6 2010-03-02 07:56:44 -08:00
pcr.c sparc64: Add function graph tracer support. 2010-04-12 22:37:26 -07:00
perf_event.c Merge branch 'linus' into perf/core 2010-07-21 21:43:06 +02:00
pmc.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
power.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
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
prom_32.c
prom_64.c Merge commit 'v2.6.35-rc6' into devicetree/next 2010-07-24 09:49:13 -06:00
prom_common.c of/sparc: move is_root_node() to of.h 2010-07-14 17:08:03 -06:00
prom_irqtrans.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
prom.h of/sparc: move is_root_node() to of.h 2010-07-14 17:08:03 -06:00
psycho_common.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
psycho_common.h sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
ptrace_32.c sparc: Fix regset register window handling. 2010-03-31 18:05:05 -07:00
ptrace_64.c sparc: Fix regset register window handling. 2010-03-31 18:05:05 -07:00
reboot.c
rtrap_32.S
rtrap_64.S sparc64: Fix hardirq tracing in trap return path. 2010-04-20 00:48:37 -07:00
sbus.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
setup_32.c sparc: remove redundant return statements 2010-02-10 11:47:57 -08:00
setup_64.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
signal32.c sparc: Align clone and signal stacks to 16 bytes. 2010-02-09 16:18:40 -08:00
signal_32.c sparc: Align clone and signal stacks to 16 bytes. 2010-02-09 16:18:40 -08:00
signal_64.c sparc: Align clone and signal stacks to 16 bytes. 2010-02-09 16:18:40 -08:00
smp_32.c sparc,leon: Sparc-Leon SMP support 2009-11-02 04:19:42 -08:00
smp_64.c Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2010-04-13 00:28:45 -07:00
sparc_ksyms_32.c
sparc_ksyms_64.c sparc64: don't export static inline pci_ functions 2009-12-15 16:28:13 +10:30
spiterrs.S
sstate.c
stacktrace.c sparc64: Fix stack dumping and tracing when function graph is enabled. 2010-04-21 03:08:11 -07:00
starfire.c
sun4c_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
sun4d_irq.c arch/sparc/kernel: Eliminate what looks like a NULL pointer dereference 2010-06-04 16:17:37 -07:00
sun4d_smp.c sparc: remove trailing space in messages 2010-02-12 12:08:51 -08:00
sun4m_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
sun4m_smp.c
sun4v_ivec.S
sun4v_tlb_miss.S
sys32.S sparc64: Kill off old sys_perfctr system call and state. 2010-03-03 08:08:49 -08:00
sys_sparc32.c Mark arguments to certain syscalls as being const 2010-08-13 16:53:13 -07:00
sys_sparc_32.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
sys_sparc_64.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
syscalls.S sparc64: Kill off old sys_perfctr system call and state. 2010-03-03 08:08:49 -08:00
sysfs.c arch/sparc/kernel: Use set_cpus_allowed_ptr 2010-03-27 21:11:56 -07:00
systbls_32.S sparc_brk() is not needed anymore 2009-12-11 06:44:58 -05:00
systbls_64.S improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
systbls.h improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
tadpole.c
tick14.c
time_32.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
time_64.c sparc: remove references to of_device and to_of_device 2010-07-24 09:58:22 -06:00
trampoline_32.S sparc,leon: Sparc-Leon SMP support 2009-11-02 04:19:42 -08:00
trampoline_64.S
traps_32.c
traps_64.c sparc64: Fix stack dumping and tracing when function graph is enabled. 2010-04-21 03:08:11 -07:00
tsb.S sparc64: Fix sun4u execute bit check in TSB I-TLB load. 2010-02-19 15:19:52 -08:00
ttable.S sparc64: fix the build error due to smp_kgdb_capture_client() 2010-06-25 11:17:57 -07:00
una_asm_32.S
una_asm_64.S
unaligned_32.c sparc: Add alignment and emulation fault perf events. 2009-12-11 01:07:53 -08:00
unaligned_64.c sparc64: Use correct pt_regs in decode_access_size() error paths. 2010-04-19 13:46:48 -07:00
us2e_cpufreq.c arch/sparc/kernel: Use set_cpus_allowed_ptr 2010-03-27 21:11:56 -07:00
us3_cpufreq.c arch/sparc/kernel: Use set_cpus_allowed_ptr 2010-03-27 21:11:56 -07:00
utrap.S
vio.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
viohs.c
visemul.c sparc: Add alignment and emulation fault perf events. 2009-12-11 01:07:53 -08:00
vmlinux.lds.S sparc64: Support kmemleak. 2010-04-12 23:46:17 -07:00
windows.c
winfixup.S
wof.S
wuf.S