On Fri, 22 Mar 2019 at 10:11, P J P <ppan...@redhat.com> wrote:
>
> +-- On Fri, 22 Mar 2019, Peter Maydell wrote --+
> | This document is specific to aarch64, but the part of
> | QEMU's device tree code being modified here is
> | architecture independent.
> |
> | Cc'ing David Gibson who will probably know if there is
> | an architecture-independent limit on DTB size we should
> | be enforcing, or whether we are better just to have a check
> | that avoids the overflow.
>
> Thank you for CC'ing David. It seems Agraf did not receive email @suse.de.

Yes, Alex's email has changed (I've updated the cc list).

> Current limit defined by FDT_MAX_SIZE is ~1MB.

But currently this is only used when creating a DT from scratch.

> Proposed check (dt_size > FDT_MAX_SIZE) in this patch is to enforce same size
> limit as used in create_device_tree() and avoid loading large files and the
> said integer overflow.

My worry is that this might possibly break existing
working use cases which load a device tree that is larger
than 1MB. Unless there's a cross-architecture justification
for the 1MB limit it seems quite a low one to be enforcing
(especially since the one limit we've found so far for
aarch64 is 2MB, not 1MB).

thanks
-- PMM

Reply via email to