linux/arch/arc/kernel
Eugeniy Paltsev edb64bca50 ARC: u-boot args: check that magic number is correct
In case of devboards we really often disable bootloader and load
Linux image in memory via JTAG. Even if kernel tries to verify
uboot_tag and uboot_arg there is sill a chance that we treat some
garbage in registers as valid u-boot arguments in JTAG case.
E.g. it is enough to have '1' in r0 to treat any value in r2 as
a boot command line.

So check that magic number passed from u-boot is correct and drop
u-boot arguments otherwise. That helps to reduce the possibility
of using garbage as u-boot arguments in JTAG case.

We can safely check U-boot magic value (0x0) in linux passed via
r1 register as U-boot pass it from the beginning. So there is no
backward-compatibility issues.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2019-02-25 12:11:01 -08:00
..
.gitignore ARC: Add some .gitignore entries 2013-08-26 09:40:24 +05:30
arc_hostlink.c ARC: Hostlink Pseudo-Driver for Metaware Debugger 2013-02-15 23:16:10 +05:30
arcksyms.c ARC: export __udivdi3 for modules 2016-08-19 14:09:33 -07:00
asm-offsets.c ARCv2: [vdk] dts files and defconfig for HS38 VDK 2015-06-25 06:00:21 +05:30
ctx_sw_asm.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
ctx_sw.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h> 2017-03-02 08:42:34 +01:00
devtree.c ARC: [plat-hsdk] initial port for HSDK board 2017-09-01 11:26:28 -07:00
disasm.c ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
entry-arcv2.S ARCv2: support manual regfile save on interrupts 2019-02-21 11:03:18 -08:00
entry-compact.S ARC: typos fix in kernel/entry-compact.S 2017-08-28 15:17:36 -07:00
entry.S ARC: Re-enable MMU upon Machine Check exception 2017-09-01 11:29:05 -07:00
fpu.c ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
head.S ARC: u-boot args: check that magic number is correct 2019-02-25 12:11:01 -08:00
intc-arcv2.c ARCv2: Add explcit unaligned access support (and ability to disable too) 2019-02-25 12:10:58 -08:00
intc-compact.c ARCv2: SMP: Mask only private-per-core IRQ lines on boot at core intc 2017-08-28 16:11:15 -07:00
irq.c ARC: Enable machine_desc->init_per_cpu for !CONFIG_SMP 2018-06-20 16:12:06 -07:00
kgdb.c kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops 2018-12-30 08:33:06 +00:00
kprobes.c bpf/error-inject/kprobes: Clear current_kprobe and enable preempt in kprobe 2018-06-21 12:33:19 +02:00
Makefile ARC: Remove empty kernel/pcibios.c 2017-08-02 14:53:35 -05:00
mcip.c ARC: mcip: update MCIP debug mask when the new cpu came online 2018-02-28 10:45:31 -08:00
module.c ARC: module: Fix !CONFIG_ARC_DW2_UNWIND builds 2017-01-18 11:17:44 -08:00
perf_event.c ARC: perf: avoid kernel killing where it is possible 2019-01-17 14:38:00 -08:00
process.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
ptrace.c ARCv2: ptrace: provide regset for accumulator/r30 regs 2017-05-03 11:21:31 -07:00
reset.c arc: export symbol for pm_power_off in reset.c 2013-11-06 10:41:44 +05:30
setup.c ARC: u-boot args: check that magic number is correct 2019-02-25 12:11:01 -08:00
signal.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
smp.c ARC: setup cpu possible mask according to possible-cpus dts property 2018-02-28 10:45:32 -08:00
stacktrace.c arc: do not use __print_symbol() 2017-12-20 12:41:43 -08:00
sys.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
traps.c signal/arc: Push siginfo generation into unhandled_exception 2018-09-27 21:59:17 +02:00
troubleshoot.c ARCv2: Add explcit unaligned access support (and ability to disable too) 2019-02-25 12:10:58 -08:00
unaligned.c ARC: [arcompact] brown paper bag bug in unaligned access delay slot fixup 2017-02-07 10:02:01 -08:00
unwind.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
vmlinux.lds.S vmlinux.lds.h: Move LSM_TABLE into INIT_DATA 2018-10-10 20:40:21 -07:00