Attention is currently required from: Nico Huber, Angel Pons, Nikolai Artemiev, Sergii Dmytruk.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58480 )
Change subject: flashchips,writeprotect_ranges: add range decoding function
......................................................................
Patch Set 38:
(1 comment)
File writeprotect_ranges.c:
https://review.coreboot.org/c/flashrom/+/58480/comment/92bd3bfe_76945c53
PS35, Line 8: * the Free Software Foundation; version 2 of the License.
> Done
This still says "version 2", was the intention to have "version 2+"?
--
To view, visit https://review.coreboot.org/c/flashrom/+/58480
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id163ed80938a946a502ed116e48e8236e36eb203
Gerrit-Change-Number: 58480
Gerrit-PatchSet: 38
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Comment-Date: Sun, 20 Feb 2022 23:47:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-MessageType: comment
Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/61943 )
Change subject: libflashrom/fmap: Don't use off_t for flash offsets
......................................................................
libflashrom/fmap: Don't use off_t for flash offsets
off_t is a special POSIX type that is used to represent file offsets in
certain APIs (e.g. lseek(), mmap()), and should not be reused to
represent anything else (such as flash offsets). In particular, the
width of the type may change based on the definition of the
_FILE_OFFSET_BITS macro. Using such a type at the libflashrom interface
is particularly dangerous, because if a program is built with a
different _FILE_OFFSET_BITS value than libflashrom, the resulting ABI
corruption will cause very very nasty and confusing bugs. This patch
replaces all instances of off_t that are not related to file offsets
with (s)size_t.
BUG=b:219811851
TEST=`elogtool list` on cherry.
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: I68a386973f79ea634f63dfcd7d95a63400e1fdee
Reviewed-on: https://review.coreboot.org/c/flashrom/+/61943
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec(a)chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev(a)google.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M fmap.c
M libflashrom.c
M libflashrom.h
3 files changed, 6 insertions(+), 6 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, but someone else must approve
Angel Pons: Looks good to me, but someone else must approve
Edward O'Callaghan: Looks good to me, approved
Nikolai Artemiev: Looks good to me, but someone else must approve
diff --git a/fmap.c b/fmap.c
index 0236b62..bd847bd 100644
--- a/fmap.c
+++ b/fmap.c
@@ -91,15 +91,15 @@
* -1 to indicate that fmap was not found
* -2 to indicate fmap is truncated or exceeds buffer + len
*/
-static off_t fmap_lsearch(const uint8_t *buf, size_t len)
+static ssize_t fmap_lsearch(const uint8_t *buf, size_t len)
{
- off_t offset;
+ ssize_t offset;
bool fmap_found = 0;
if (len < sizeof(struct fmap))
return -1;
- for (offset = 0; offset <= (off_t)(len - sizeof(struct fmap)); offset++) {
+ for (offset = 0; offset <= (ssize_t)(len - sizeof(struct fmap)); offset++) {
if (is_valid_fmap((struct fmap *)&buf[offset])) {
fmap_found = 1;
break;
@@ -131,7 +131,7 @@
*/
int fmap_read_from_buffer(struct fmap **fmap_out, const uint8_t *const buf, size_t len)
{
- off_t offset = fmap_lsearch(buf, len);
+ ssize_t offset = fmap_lsearch(buf, len);
if (offset < 0) {
msg_gdbg("Unable to find fmap in provided buffer.\n");
return 2;
diff --git a/libflashrom.c b/libflashrom.c
index fb70934..d66c295 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -534,7 +534,7 @@
* 1 on any other error.
*/
int flashrom_layout_read_fmap_from_rom(struct flashrom_layout **const layout,
- struct flashctx *const flashctx, off_t offset, size_t len)
+ struct flashctx *const flashctx, size_t offset, size_t len)
{
#ifndef __FLASHROM_LITTLE_ENDIAN__
return 3;
diff --git a/libflashrom.h b/libflashrom.h
index 557978d..1c9498e 100644
--- a/libflashrom.h
+++ b/libflashrom.h
@@ -109,7 +109,7 @@
int flashrom_layout_new(struct flashrom_layout **);
int flashrom_layout_read_from_ifd(struct flashrom_layout **, struct flashrom_flashctx *, const void *dump, size_t len);
int flashrom_layout_read_fmap_from_rom(struct flashrom_layout **,
- struct flashrom_flashctx *, off_t offset, size_t length);
+ struct flashrom_flashctx *, size_t offset, size_t length);
int flashrom_layout_read_fmap_from_buffer(struct flashrom_layout **layout,
struct flashrom_flashctx *, const uint8_t *buf, size_t len);
int flashrom_layout_add_region(struct flashrom_layout *, size_t start, size_t end, const char *name);
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://review.coreboot.org/c/flashrom/+/61943
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I68a386973f79ea634f63dfcd7d95a63400e1fdee
Gerrit-Change-Number: 61943
Gerrit-PatchSet: 4
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Attention is currently required from: Nico Huber, Thomas Heijligen.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62197 )
Change subject: Makefile: use the HAS_ USE_ scheme for linux i2c dependend programmer
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File Makefile:
https://review.coreboot.org/c/flashrom/+/62197/comment/2e0fa717_cdbb3ca5
PS1, Line 795: ,$(DEPENDS_ON_LINUX_I2C)),yes,no)
add missing spaces
--
To view, visit https://review.coreboot.org/c/flashrom/+/62197
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I47acdf89a369441b9fc664352c27c43b461545b1
Gerrit-Change-Number: 62197
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Sun, 20 Feb 2022 21:32:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Thomas Heijligen.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62196 )
Change subject: Makefile: use HAS_ USE_ pattern for serial support
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File Makefile:
https://review.coreboot.org/c/flashrom/+/62196/comment/2aae4f16_d050e316
PS1, Line 795: ,$(DEPENDS_ON_SERIAL)),yes,no)
add missing spaces
--
To view, visit https://review.coreboot.org/c/flashrom/+/62196
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ica951e76d6362b01f09d23a729a2a6049e7f0b66
Gerrit-Change-Number: 62196
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Sun, 20 Feb 2022 21:31:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Thomas Heijligen.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62199 )
Change subject: Makefile: print versioninfo as part of the config target
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/62199/comment/3851f32a_f48c19df
PS1, Line 7: versioninfo
add a space there
--
To view, visit https://review.coreboot.org/c/flashrom/+/62199
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1a846acfd8d2e0a9fc8b02c078b6ac0342438490
Gerrit-Change-Number: 62199
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Sun, 20 Feb 2022 21:27:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Thomas Heijligen has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/62199 )
Change subject: Makefile: print versioninfo as part of the config target
......................................................................
Makefile: print versioninfo as part of the config target
Change-Id: I1a846acfd8d2e0a9fc8b02c078b6ac0342438490
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
---
M Makefile
1 file changed, 1 insertion(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/99/62199/1
diff --git a/Makefile b/Makefile
index 852d336..42b0290 100644
--- a/Makefile
+++ b/Makefile
@@ -410,9 +410,6 @@
# No spaces in release names unless set explicitly
RELEASENAME ?= $(shell echo "$(VERSION)" | sed -e 's/ /_/')
-# Inform user of the version string
-$(info Replacing all version templates with $(VERSION).)
-
# If a VCS is found then try to install hooks.
$(shell ./util/getrevision.sh -c 2>/dev/null && ./util/git-hooks/install.sh)
@@ -899,6 +896,7 @@
endif
config:
+ @echo Building $(PROGRAM) version $(VERSION)
@echo -n "C compiler found: "
@if [ $(CC_WORKING) = yes ]; \
then $(CC) --version 2>/dev/null | head -1; \
--
To view, visit https://review.coreboot.org/c/flashrom/+/62199
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1a846acfd8d2e0a9fc8b02c078b6ac0342438490
Gerrit-Change-Number: 62199
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: newchange