common: cmd_boot: Add stack canary test command.
This change will add stack canary test command in
u-boot command list.
The stack canary test command format like as :
canary <string>. The string must be 10 bytes long.
e.g
" #canary Helloworldhelloworld".
After this command we can see the below print.
Stack Canary test start.
stack-protector: U-boot stack is corrupted.
Resetting CPU ...
If stack-protection not enabled and stack overflow
occure then we will get the following print.
prefetch abort
pc : [<4a006f72>] lr : [<4a90faf0>]
reloc pc : [<4a006f72>] lr : [<4a90faf0>]
sp : 4a77f948 ip : 20f14495 fp : 4a90fab4
r10: 00000002 r9 : 4a77fea0 r8 : 00000000
r7 : 4a983d20 r6 : 6f6f6f6f r5 : 6f6f6f6f r4 : 6f6f6f6f
r3 : 00000000 r2 : 4a77f946 r1 : 4a78233b r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
Change-Id: If36d1da3ecc1d0038cd1a6bad6ab3d265b47dac8
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2 files changed