Attention is currently required from: Andrey Petrov, Julius Werner, Jérémy Compostella, Martin L Roth, Maximilian Brune, Ronak Kanabar.
Nico Huber 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:
(1 comment)
File src/commonlib/include/commonlib/region.h:
https://review.coreboot.org/c/coreboot/+/79905/comment/5fbf05c6_2ab8fbe8 :
PS1, Line 106: offset > SIZE_MAX || size > SIZE_MAX
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?
Thanks! absolutely, yes, when the check is written like this.
(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.)
Also true, good suggestion.
--
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: Martin L Roth
gaumless@gmail.com
Gerrit-Attention: Jérémy Compostella
jeremy.compostella@intel.com
Gerrit-Attention: Julius Werner
jwerner@chromium.org
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: Thu, 18 Jan 2024 17:11:16 +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