Re: [RFC 1/2] ARC: U-boot: check arguments paranoidly

2019-02-06 Thread Vineet Gupta
On 2/6/19 9:22 AM, Eugeniy Paltsev wrote: > Handle U-boot arguments paranoidly: > * don't allow to pass unknown tag. > * try to use external device tree blob only if corresponding tag >(TAG_DTB) is set. > * don't check: uboot_tag if kernel build with no ARC_UBOOT_SUPPORT. > > While I'm at

Re: [RFC 2/2] ARC: U-boot: check magic number passed from u-boot

2019-02-06 Thread Vineet Gupta
On 2/6/19 9:22 AM, Eugeniy Paltsev wrote: > In case of devboards we really often disable bootloader and load > Linux image in memory via JTAG. In case of using kernel with > CONFIG_ARC_UBOOT_SUPPORT enabled we may crash as we will try to > interpret some junk in a registers as a pointers to

Re: [RFC 1/2] ARC: U-boot: check arguments paranoidly

2019-02-06 Thread Vineet Gupta
On 2/6/19 9:22 AM, Eugeniy Paltsev wrote: > Handle U-boot arguments paranoidly: > * don't allow to pass unknown tag. > * try to use external device tree blob only if corresponding tag >(TAG_DTB) is set. > * don't check: uboot_tag if kernel build with no ARC_UBOOT_SUPPORT. > > While I'm at

[RFC 0/2] ARC: rework U-boot arguments handling

2019-02-06 Thread Eugeniy Paltsev
Eugeniy Paltsev (2): ARC: U-boot: check arguments paranoidly ARC: U-boot: check magic number passed from u-boot arch/arc/kernel/head.S | 7 ++-- arch/arc/kernel/setup.c | 91 + 2 files changed, 74 insertions(+), 24 deletions(-) -- 2.14.5

[RFC 2/2] ARC: U-boot: check magic number passed from u-boot

2019-02-06 Thread Eugeniy Paltsev
In case of devboards we really often disable bootloader and load Linux image in memory via JTAG. In case of using kernel with CONFIG_ARC_UBOOT_SUPPORT enabled we may crash as we will try to interpret some junk in a registers as a pointers to bootargs/etc which aren't set by anyone in case of JTAG

[RFC 1/2] ARC: U-boot: check arguments paranoidly

2019-02-06 Thread Eugeniy Paltsev
Handle U-boot arguments paranoidly: * don't allow to pass unknown tag. * try to use external device tree blob only if corresponding tag (TAG_DTB) is set. * don't check: uboot_tag if kernel build with no ARC_UBOOT_SUPPORT. While I'm at it refactor U-boot arguments handling code.

[PATCH] don't check console device file on fs when booting with initrd/initramfs

2019-02-06 Thread Alexey Brodkin
In case of initrd/initramfs /dev/console might not exist that early as devtmpfs is mounted a bit later by /init process so disable this check in that case. Signed-off-by: Alexey Brodkin --- init/main.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/init/main.c