Generally, I think we should always assume a "sane" layout in the
internal code to keep it simple (e.g. in flashrom.c). Regions with
start above end should be filtered (warning) / denied (bail out)
when reading the layout. Regions partially out of the flash chip's
bounds should be sanitized (warning) / denied (bail out). This
should be implemented in a follow-up if necessary.

Regarding overlapping regions: I don't see a use case. But if we
want to allow them in the layout file, I'm ok with the current
solution implemented here.

View Change

2 comments:

To view, visit change 23021. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5465659605d8431d931053967b40290195cfd99
Gerrit-Change-Number: 23021
Gerrit-PatchSet: 5
Gerrit-Owner: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Nicola Corna <nicola@corna.info>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Mon, 08 Jan 2018 13:43:02 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No