Attention is currently required from: Andrey Petrov, Jérémy Compostella, Martin L Roth, Maximilian Brune, Nico Huber, Ronak Kanabar.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79905?usp=email )
Change subject: [RFC] region: Introduce region_create() functions
......................................................................
Patch Set 6:
(2 comments)
File src/commonlib/include/commonlib/region.h:
https://review.coreboot.org/c/coreboot/+/79905/comment/f5f6e130_ee00d7a7 :
PS6, Line 103: int
nit: should return value be `enum cb_err`?
File src/commonlib/include/commonlib/region.h:
https://review.coreboot.org/c/coreboot/+/79905/comment/4519bfbe_1c594031 :
PS1, Line 106: offset > SIZE_MAX || size > SIZE_MAX
Well, the _unstrusted version is supposed to not make assumptions, but here […]
Hmmm... well, okay, if you feel strongly about it I guess it doesn't really hurt.
However, don't you need to cast down to `size_t` for the overlap check?
(Also, it would be a little more efficient to just create the region struct directly rather than calling `region_create()`, since you've already checked the overlap here, you don't need to go through that `assert()` again.)
--
To view, visit
https://review.coreboot.org/c/coreboot/+/79905?usp=email
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I4ae3e6274c981c9ab4fb1263c2a72fa68ef1c32b
Gerrit-Change-Number: 79905
Gerrit-PatchSet: 6
Gerrit-Owner: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Andrey Petrov
andrey.petrov@gmail.com
Gerrit-Reviewer: Jérémy Compostella
jeremy.compostella@intel.com
Gerrit-Reviewer: Martin L Roth
gaumless@gmail.com
Gerrit-Reviewer: Ronak Kanabar
ronak.kanabar@intel.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Julius Werner
jwerner@chromium.org
Gerrit-CC: Maximilian Brune
maximilian.brune@9elements.com
Gerrit-Attention: Nico Huber
nico.h@gmx.de
Gerrit-Attention: Martin L Roth
gaumless@gmail.com
Gerrit-Attention: Jérémy Compostella
jeremy.compostella@intel.com
Gerrit-Attention: Maximilian Brune
maximilian.brune@9elements.com
Gerrit-Attention: Ronak Kanabar
ronak.kanabar@intel.com
Gerrit-Attention: Andrey Petrov
andrey.petrov@gmail.com
Gerrit-Comment-Date: Wed, 17 Jan 2024 23:23:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber
nico.h@gmx.de
Comment-In-Reply-To: Julius Werner
jwerner@chromium.org
Comment-In-Reply-To: Maximilian Brune
maximilian.brune@9elements.com
Gerrit-MessageType: comment