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

2019-02-15 Thread Vineet Gupta
[...] > -char __initdata *uboot_arg; > +unsigned int __initdata uboot_arg; Why ? In both places it is actually used, it is intended as a pointer. The cast for range check is needed but lets cast there. See below for real reason. > -static inline int is_kernel(unsigned long addr) > +static in

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

2019-02-14 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. NOTE: If U-boot args are invalid we skip them and try to use embedded d