| #
54841ab5 |
| 28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified.
The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to comm
Make sure that argv[] argument pointers are not modified.
The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]".
This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot:
int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... }
The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv'
N.B.: The code above can be trivially rewritten like this:
while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ...
Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
show more ...
|
| #
9d62f20d |
| 10-May-2010 |
Minkyu Kang <mk7.kang@samsung.com> |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts: arch/arm/include/asm/mach-types.h common/serial.c
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
| #
500fbae2 |
| 24-Apr-2010 |
Wolfgang Denk <wd@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-microblaze
|
| #
83653121 |
| 19-Apr-2010 |
Minkyu Kang <mk7.kang@samsung.com> |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts: cpu/arm1176/cpu.c cpu/arm1176/start.S cpu/arm_cortexa8/s5pc1xx/Makefile cpu/arm_cortexa8/s5pc1xx/clock.c drivers/serial/serial_s
Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts: cpu/arm1176/cpu.c cpu/arm1176/start.S cpu/arm_cortexa8/s5pc1xx/Makefile cpu/arm_cortexa8/s5pc1xx/clock.c drivers/serial/serial_s5p.c include/asm-arm/arch-s5pc1xx/clk.h include/asm-arm/arch-s5pc1xx/gpio.h include/asm-arm/arch-s5pc1xx/uart.h
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
show more ...
|
| #
9b4d9056 |
| 16-Apr-2010 |
Michal Simek <monstr@monstr.eu> |
microblaze: Flush cache before jumping to kernel
There is used max cache size on system which doesn't define cache size.
Signed-off-by: Michal Simek <monstr@monstr.eu>
|
| #
398b1d57 |
| 15-Apr-2010 |
Arun Bhanu <arun@bhanu.net> |
microblaze: Add FDT support
This patch adds FDT (flattened device tree) support to microblaze arch.
Tested with Linux arch/microblaze kernels with and without compiled in FDT on Xilinx ML506 board.
microblaze: Add FDT support
This patch adds FDT (flattened device tree) support to microblaze arch.
Tested with Linux arch/microblaze kernels with and without compiled in FDT on Xilinx ML506 board.
Signed-off-by: Arun Bhanu <arun@bhanu.net> Signed-off-by: Michal Simek <monstr@monstr.eu>
show more ...
|
| #
ea0364f1 |
| 13-Apr-2010 |
Peter Tyser <ptyser@xes-inc.com> |
Move lib_$ARCH directories to arch/$ARCH/lib
Also move lib_$ARCH/config.mk to arch/$ARCH/config.mk
This change is intended to clean up the top-level directory structure and more closely mimic Linux
Move lib_$ARCH directories to arch/$ARCH/lib
Also move lib_$ARCH/config.mk to arch/$ARCH/config.mk
This change is intended to clean up the top-level directory structure and more closely mimic Linux's directory organization.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
show more ...
|