Attention is currently required from: Anand Vaikar, Felix Held, Fred Reitberger, Nikolai Vyssotski, ritul guru.
ANAND VAIKAR has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79832?usp=email )
Change subject: src/soc/amd/glinda: Update the PCIE MMCONFIG base address and size
......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/79832/comment/b012f32c_530a72e4 :
PS1, Line 7: for glinda
> i'd drop the 'for glinda' at the end so that everything fits into the 72 chars of the first line. […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/79832?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: Ifa8377df7a2973a88d414c217b5ed114c8ae5cc3
Gerrit-Change-Number: 79832
Gerrit-PatchSet: 2
Gerrit-Owner: Anand Vaikar <a.vaikar2021(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Nikolai Vyssotski <nikolai.vyssotski(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: ritul guru <ritul.bits(a)gmail.com>
Gerrit-CC: ANAND VAIKAR <a.vaikar1987(a)gmail.com>
Gerrit-Attention: ritul guru <ritul.bits(a)gmail.com>
Gerrit-Attention: Nikolai Vyssotski <nikolai.vyssotski(a)amd.corp-partner.google.com>
Gerrit-Attention: Anand Vaikar <a.vaikar2021(a)gmail.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Sun, 14 Jan 2024 05:56:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: comment
Attention is currently required from: Jérémy Compostella, Martin L Roth, Nico Huber.
Maximilian Brune 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 1:
(5 comments)
File src/commonlib/include/commonlib/region.h:
https://review.coreboot.org/c/coreboot/+/79905/comment/2e6e744d_0f63bb43 :
PS1, Line 99: assert(offset + size - 1 >= offset);
> But the assert, it does nothing...
I am not sure I understand. I thought it is checking for an overflow which shouldn't happen since region_create is called from "trusted" code?
Looks right to me
https://review.coreboot.org/c/coreboot/+/79905/comment/9d8aa610_d27463bb :
PS1, Line 103: static inline int region_create_untrusted(
Does it make sense to mix the constructor and the checking of invalid input values?
Personally I like to separate them in order to avoid having to return nested error codes everywhere. I am in favor of checking input values once and as early as possible.
So instead of something like this:
```
int smm_handler_xyx(size_t base, size_t size)
{
if (function_using_region(base, size)) {
return -1;
}
}
int function_using_region(size_t base, size_t size)
{
struct region r;
if (region_create_untrusted(&r, base, size)) {
return -1;
}
...
}
```
I like it more like this:
```
int smm_handler_xyx(size_t base, size_t size)
{
if (base + size < base) {
return -1; // overflow detected (possible malicious input values)
}
function_using_region(base, size);
}
void function_using_region(size_t base, size_t size)
{
struct region r = region_create(base, size);
...
}
```
https://review.coreboot.org/c/coreboot/+/79905/comment/f3d97699_3a823cd3 :
PS1, Line 104: struct region *r, unsigned long long offset, unsigned long long size)
Is there a specific reason why you use "unsigned long long" type?
https://review.coreboot.org/c/coreboot/+/79905/comment/745aac48_6d375b42 :
PS1, Line 106: offset > SIZE_MAX || size > SIZE_MAX
I am puzzled. Under which circumstances can offset or size be bigger than SIZE_MAX?
File util/cbfstool/cbfstool.c:
https://review.coreboot.org/c/coreboot/+/79905/comment/618d23ac_f77f0c18 :
PS1, Line 334: if (region_create_untrusted(
If I understand correctly the only real difference between `region_create` and `region_create_untrusted` is that `region_create` asserts and `region_create_untrusted` gives the opportunity to handle the error?
In that case it seems more reasonable to assert if the regions (ranges) come from coreboot internal code (compared to external) in order for the developer to easier catch the error. And for regions coming from external stuff (e.g. SMM) to just handle the error in order to not crash the system unnecessarily (like you already do).
Having said that it seems to make more sense to just use region_create here?
--
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: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Comment-Date: Sun, 14 Jan 2024 04:51:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Martin L Roth <gaumless(a)gmail.com>
Gerrit-MessageType: comment
Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/79908?usp=email )
Change subject: libpayload: Make sure to install into the right DESTDIR
......................................................................
libpayload: Make sure to install into the right DESTDIR
A recent update broke installation of commonlib headers with a relative
path in $(DESTDIR), which is the default. Make sure to install into the
right location in case we changed the current directory.
Change-Id: I61fa4aa0ecd0f81ee03ff89183e1b65e7875dea6
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
Fixes: ee53dfd07d3b (libpayload: Remove shell for loops in install Makefile target)
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79908
Reviewed-by: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Reviewed-by: Paul Menzel <paulepanter(a)mailbox.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M payloads/libpayload/Makefile.inc
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
Felix Singer: Looks good to me, approved
Paul Menzel: Looks good to me, approved
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index e4d45a6..61f932f 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -128,8 +128,8 @@
install -m 755 -d $(DESTDIR)/libpayload/include
find include -type d -exec install -m755 -d $(DESTDIR)/libpayload/{} \;
find include -type f -exec install -m644 {} $(DESTDIR)/libpayload/{} \;
- cd $(coreboottop)/src/commonlib/bsd && find include -type d -exec install -m755 -d $(DESTDIR)/libpayload/{} \;
- cd $(coreboottop)/src/commonlib/bsd && find include -type f -exec install -m644 {} $(DESTDIR)/libpayload/{} \;
+ cd $(coreboottop)/src/commonlib/bsd && find include -type d -exec install -m755 -d $(abspath $(DESTDIR))/libpayload/{} \;
+ cd $(coreboottop)/src/commonlib/bsd && find include -type f -exec install -m644 {} $(abspath $(DESTDIR))/libpayload/{} \;
install -m 644 $(obj)/libpayload-config.h $(DESTDIR)/libpayload/include
$(foreach item,$(includes), \
install -m 755 -d $(DESTDIR)/libpayload/include/$(call extract_nth,2,$(item)); \
--
To view, visit https://review.coreboot.org/c/coreboot/+/79908?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: I61fa4aa0ecd0f81ee03ff89183e1b65e7875dea6
Gerrit-Change-Number: 79908
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Jérémy Compostella, Nico Huber.
Martin L Roth 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 1: Code-Review+1
(2 comments)
Patchset:
PS1:
LGTM
File src/commonlib/include/commonlib/region.h:
https://review.coreboot.org/c/coreboot/+/79905/comment/736eed54_81f3e881 :
PS1, Line 99: assert(offset + size - 1 >= offset);
> This would not allow empty regions. […]
I don't see the need for zero-size regions. I guess they could be used as a marker or something, but that seems outside of the intended region usage.
I think excluding them is totally reasonable.
But the assert, it does nothing...
--
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: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Comment-Date: Sun, 14 Jan 2024 02:33:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: comment
Attention is currently required from: Angel Pons, Patrick Rudolph, Paul Menzel.
Martin L Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78827?usp=email )
Change subject: sb/intel/bd82x6x/early_usb: Print error for invalid USB setting
......................................................................
Patch Set 10:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/78827/comment/f7e3b384_3907165f :
PS8, Line 15: Tested: Lenovo X220 still boots.
> That's correct.
So what needs to be done here to get this batch merged? Can this comment just be resolved?
--
To view, visit https://review.coreboot.org/c/coreboot/+/78827?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: If76e9126b4aba8e16c1c91dece725aac12e1a7e9
Gerrit-Change-Number: 78827
Gerrit-PatchSet: 10
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-CC: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Sun, 14 Jan 2024 02:03:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment