Re: [PATCH v3 5/6] libfdt: Add support for disabling security checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi David,

On Mon, 4 Nov 2019 at 10:06, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Oct 24, 2019 at 09:29:24PM -0600, Simon Glass wrote:
> > Allow enabling FDT_ASSUME_FRIENDLY to disable extra checks for invalid
> > device tree files.
>
> The distinction between what's covered here and what's covered by
> chk_basic() isn't very obvious to me.  They both seem to be covering
> checks of fundamental invarants of the format.

Perhaps this is just a matter of degree (and amount of code)?

Basic checking assumes that the data can be parsed and strings/lengths
are consistent. But the tree might have bad hierarchy, perhaps and it
would catch that. Things like -FDT_ERR_BADLAYOUT.

Extra checking goes further, checking every length and string pointer,
but with a higher code cost.

Most of the latter code was added recently and there was already a
fair amount of checking code. So I feel this is 'more paranoid' than
the older code. Before this 'extra' code the code size of libfdt was
quite a bit smaller, so I feel there is some value in having two
separate levels for checking.

What do you think?

Regards,
Simon



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux