Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/70893 )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: layout: Rename find_romentry() -> romentry_exists()
......................................................................
layout: Rename find_romentry() -> romentry_exists()
The functions purpose is to test for existence not to
actually return the entry, therefore rename accordingly.
Change-Id: Ibf14357c00717d1a7b6bc9c83e797fac125559c4
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70893
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Felix Singer <felixsinger(a)posteo.net>
---
M layout.c
1 file changed, 18 insertions(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
Felix Singer: Looks good to me, approved
diff --git a/layout.c b/layout.c
index 6af0e41..4f02be6 100644
--- a/layout.c
+++ b/layout.c
@@ -209,7 +209,7 @@
}
/* returns -1 if an entry is not found, 0 if found. */
-static int find_romentry(struct flashrom_layout *const l, char *name, char *file)
+static int romentry_exists(struct flashrom_layout *const l, char *name, char *file)
{
if (!l->head)
return -1;
@@ -244,7 +244,7 @@
tmp = args;
while (tmp) {
- if (find_romentry(l, tmp->name, tmp->file) < 0) {
+ if (romentry_exists(l, tmp->name, tmp->file) < 0) {
msg_gerr("Invalid region specified: \"%s\".\n",
tmp->name);
return 1;
--
To view, visit https://review.coreboot.org/c/flashrom/+/70893
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ibf14357c00717d1a7b6bc9c83e797fac125559c4
Gerrit-Change-Number: 70893
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Evan Benn, Peter Marheine.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71773 )
Change subject: flashrom_tester: Remove --output log redirect option
......................................................................
Patch Set 2: Code-Review-2
(1 comment)
Patchset:
PS2:
This has been a pretty useful facility during AVL
--
To view, visit https://review.coreboot.org/c/flashrom/+/71773
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I5eab8169644a16ba31b203e8607853c459f92978
Gerrit-Change-Number: 71773
Gerrit-PatchSet: 2
Gerrit-Owner: Evan Benn <evanbenn(a)google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Evan Benn <evanbenn(a)google.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Wed, 11 Jan 2023 12:28:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Evan Benn.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71618 )
Change subject: rust: Add license and other metadata to Cargo.toml
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/71618
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ibdab16713395509be511e45c5eae946496020429
Gerrit-Change-Number: 71618
Gerrit-PatchSet: 1
Gerrit-Owner: Evan Benn <evanbenn(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Evan Benn <evanbenn(a)google.com>
Gerrit-Comment-Date: Wed, 11 Jan 2023 12:27:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Simon Buhrow, Nico Huber, Thomas Heijligen, Paul Menzel, Aarya.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/65879 )
Change subject: flashrom.c:Add function to get a flattened view of the chip erase blocks
......................................................................
Patch Set 56: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/65879
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iafe78de00daa55f7114bd4ce09465dd88074ece4
Gerrit-Change-Number: 65879
Gerrit-PatchSet: 56
Gerrit-Owner: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Simon Buhrow
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Simon Buhrow
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Comment-Date: Wed, 11 Jan 2023 11:57:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Peter Marheine.
Evan Benn has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71773 )
Change subject: flashrom_tester: Remove --output log redirect option
......................................................................
Patch Set 2:
This change is ready for review.
--
To view, visit https://review.coreboot.org/c/flashrom/+/71773
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I5eab8169644a16ba31b203e8607853c459f92978
Gerrit-Change-Number: 71773
Gerrit-PatchSet: 2
Gerrit-Owner: Evan Benn <evanbenn(a)google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Wed, 11 Jan 2023 03:26:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: eshankelkar(a)galorithm.com.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/71791
to look at the new patch set (#3).
Change subject: sfdp.c : Initializing hbuf to avoid warnings generated by scan-build
......................................................................
sfdp.c : Initializing hbuf to avoid warnings generated by scan-build
scan-build uses the clang analyzer which is giving warnings
about garbage/undefined values in hbuf assigned to member of hdrs[0]
if hbuf is not initialized.
Though the path of the control flow shown by it in its html output
cannot occur in reality(since it assumes that (nph+1)*8 is <= 0 i.e
nph<=-1 but later assumes 0 <= nph ) hence its a false positive.
Still initializing all bytes of hbuf to 0 leads to the two warnings
for sfdp.c (one for hbuf, one for tbuf) to go away.
Signed-off-by : Eshan Kelkar <eshankelkar(a)galorithm.com>
Change-Id: I6815e246b4fd225d1837cae6e7d2aa0236b48b1b
---
M sfdp.c
1 file changed, 28 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/91/71791/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/71791
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6815e246b4fd225d1837cae6e7d2aa0236b48b1b
Gerrit-Change-Number: 71791
Gerrit-PatchSet: 3
Gerrit-Owner: eshankelkar(a)galorithm.com
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: eshankelkar(a)galorithm.com
Gerrit-MessageType: newpatchset
eshankelkar(a)galorithm.com has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/71791 )
Change subject: sfdp.c : Initializing hbuf to avoid warnings generated by scan-build
......................................................................
sfdp.c : Initializing hbuf to avoid warnings generated by scan-build
scan-build uses the clang analyzer which is giving warnings
about garbage/undefined values in hbuf assigned to member of hdrs[0]
if hbuf is not initialized.
Though the path of the control flow shown by it in its html output
cannot occur in reality(since it assumes that (nph+1)*8 is <= 0 i.e
nph<=-1 but later assumes 0 <= nph ) hence its a false positive.
Still initializing all bytes of hbuf to 0 leads to the two warnings
for sfdp.c (one for hbuf, one for tbuf) to go away.
Signed-off by : Eshan Kelkar <eshankelkar(a)galorithm.com>
Change-Id: I6815e246b4fd225d1837cae6e7d2aa0236b48b1b
---
M sfdp.c
1 file changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/91/71791/1
diff --git a/sfdp.c b/sfdp.c
index 5eddb21..b5010d6 100644
--- a/sfdp.c
+++ b/sfdp.c
@@ -296,6 +296,12 @@
/* Fetch all parameter headers, even if we don't use them all (yet). */
hbuf = malloc((nph + 1) * 8);
+ uint8_t k;
+ for (i=0; i<=nph; i++){
+ for (k=0 ; k<=7 ; k++)
+ hbuf[i*8+k]=(uint8_t)0;
+ }
+
hdrs = malloc((nph + 1) * sizeof(*hdrs));
if (hbuf == NULL || hdrs == NULL ) {
msg_gerr("Out of memory!\n");
--
To view, visit https://review.coreboot.org/c/flashrom/+/71791
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6815e246b4fd225d1837cae6e7d2aa0236b48b1b
Gerrit-Change-Number: 71791
Gerrit-PatchSet: 1
Gerrit-Owner: eshankelkar(a)galorithm.com
Gerrit-MessageType: newchange
Attention is currently required from: Thomas Heijligen, Angel Pons.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71577 )
Change subject: internal.c: Move sio register to own object
......................................................................
Patch Set 2:
(1 comment)
File superio.c:
https://review.coreboot.org/c/flashrom/+/71577/comment/a75f571a_637f144b
PS1, Line 40: //probe_superio_smsc();
> Wow, this is dead code
Well let's get this in 'as-is' as it just moves around code. Cleanups can be separate commits.
--
To view, visit https://review.coreboot.org/c/flashrom/+/71577
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I9a4c3e12bce5d22492c8d1b8f4a3f49d736dcf31
Gerrit-Change-Number: 71577
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Tue, 10 Jan 2023 10:03:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Sam McNally, Anastasia Klimchuk, Evan Benn.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71659 )
Change subject: tests/: Add non-aligned write within a region unit-test
......................................................................
Patch Set 2:
(16 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/71659/comment/0901f4f6_097bdf43
PS2, Line 7: tests/: Add subregion alignment unit-test
> is a subregion a thing? […]
Done
https://review.coreboot.org/c/flashrom/+/71659/comment/6ca559fc_d50b4381
PS2, Line 9: A written region that is sized below that of the erasure granularity
> I don't understand the bug from this description
should make more sense now given all the other fixes give context.
File tests/chip.c:
https://review.coreboot.org/c/flashrom/+/71659/comment/2dbdad01_75b44fb5
PS2, Line 110: va_list logfile_args;
> you dont need to va_copy because you only pass ap to vfprintf
Ack
https://review.coreboot.org/c/flashrom/+/71659/comment/f25d06f3_9a15fed8
PS2, Line 114: output_type = stderr;
> I don't know the motivation for printing the messages, so I also dont know the motivation for splitt […]
Ack
https://review.coreboot.org/c/flashrom/+/71659/comment/96e19d18_041e83d5
PS2, Line 116: if (level <= verbose_screen) {
> verbose_screen is part of `cli_output. […]
Ack
https://review.coreboot.org/c/flashrom/+/71659/comment/9f190440_a96060c8
PS2, Line 118: /* msg_*spew often happens inside chip accessors in possibly
> why do we need to fflush at all?
Ack
https://review.coreboot.org/c/flashrom/+/71659/comment/04957694_341b54a0
PS2, Line 444: void write_chip_subregion_with_dummyflasher_test_success(void **state) // XXX
> this is the first mention of a 'subregion' in flashrom, maybe there is an existing word you can choo […]
Done
https://review.coreboot.org/c/flashrom/+/71659/comment/20aeae7f_05b0d69b
PS2, Line 458: struct flashchip mock_chip = chip_W25Q128_V;
> do you want to assert something about the size of the erasers here? as much for documentation as en […]
Well that should all be part of the W25Q128V chip spec this struct is defining. That sounds like another test to add to ensure the data structure is maintained or a comment above it. Either way, maybe out of scope here.
https://review.coreboot.org/c/flashrom/+/71659/comment/4c742e8a_f82500af
PS2, Line 466: #define MOCK_CHIP_SUBREGION_CONTENTS 0xCC
> this can be a const int instead of a define
well not quite in this case because reasons, however I added a comment.
https://review.coreboot.org/c/flashrom/+/71659/comment/5b635c7d_837de663
PS2, Line 469: * {MOCK_CHIP_SUBREGION_CONTENTS} [..] {MOCK_CHIP_SUBREGION_CONTENTS}.
> im not sure what this is telling me
Done
https://review.coreboot.org/c/flashrom/+/71659/comment/2ba94eae_f9400a56
PS2, Line 471: uint8_t *newcontents = calloc(1, mock_chip_size);
> memsetting so calloc could be malloc
I prefer consistent use of calloc() that ensures heap is always zero. malloc nano optimisation for a uninit heap gains me nothing over the advantage of consistency.
https://review.coreboot.org/c/flashrom/+/71659/comment/05d64979_94ba7308
PS2, Line 477: flashrom_flag_set(&flashctx, FLASHROM_FLAG_VERIFY_WHOLE_CHIP, false);
> suspect these flags are important what is being tested, but its not documented here or […]
Documenting those flags better is outside the scope of this change. However I agree they need better doxygen comments in libflashrom.h
https://review.coreboot.org/c/flashrom/+/71659/comment/e80af7bd_d27a532c
PS2, Line 478: flashrom_set_log_callback((flashrom_log_callback *)&unittest_print_cb);
> why are we setting up a print callback? We also dont seem to undo this at the end, which will be tri […]
Ack
https://review.coreboot.org/c/flashrom/+/71659/comment/9b3356db_91ef6bed
PS2, Line 502: printf("Subregion chip W op..\n");
> write the word
Done
https://review.coreboot.org/c/flashrom/+/71659/comment/24fbe3ff_33366af9
PS2, Line 508: //flashrom_layout_set(&flashctx, NULL); // use default layout.
> the layout you use is the same as the default or NULL layout, does that not work?
No, it segfauls for some unknown reason outside the scope of the work here.
https://review.coreboot.org/c/flashrom/+/71659/comment/692915fe_1814f6a8
PS2, Line 514: assert_int_equal(0, flashrom_image_verify(&flashctx, newcontents, mock_chip_size));
> maybe documenting right here what the predicted bug is would be useful. […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/71659
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id3ce5cd1936f0f348d34a6c77cee15e27a5c353f
Gerrit-Change-Number: 71659
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Evan Benn <evanbenn(a)google.com>
Gerrit-Reviewer: Sam McNally <sammc(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Sam McNally <sammc(a)google.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Evan Benn <evanbenn(a)google.com>
Gerrit-Comment-Date: Tue, 10 Jan 2023 00:43:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Evan Benn <evanbenn(a)google.com>
Gerrit-MessageType: comment