Attention is currently required from: Edward O'Callaghan.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68296 )
Change subject: flashrom.c: Separate out default layout init
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/68296
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8fd0af8fb1c32dc9f2b00cc39b518d2f4d98e3ac
Gerrit-Change-Number: 68296
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Sat, 15 Oct 2022 15:08:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Felix Singer has submitted this change. ( https://review.coreboot.org/c/flashrom/+/68279 )
Change subject: layout.c: Use calloc() to ensure a zeroed layout
......................................................................
layout.c: Use calloc() to ensure a zeroed layout
No need to malloc() and then do a DIY memset to zero of the
heap. Just use calloc(1, ..) to get a zeroed heap.
Change-Id: Id6cf2c4591aec0620f15d8a39495d2bff6597f96
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68279
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Felix Singer <felixsinger(a)posteo.net>
---
M layout.c
1 file changed, 18 insertions(+), 3 deletions(-)
Approvals:
build bot (Jenkins): Verified
Felix Singer: Looks good to me, approved
Angel Pons: Looks good to me, approved
diff --git a/layout.c b/layout.c
index 0212699..be88428 100644
--- a/layout.c
+++ b/layout.c
@@ -355,14 +355,12 @@
int flashrom_layout_new(struct flashrom_layout **const layout)
{
- *layout = malloc(sizeof(**layout));
+ *layout = calloc(1, sizeof(**layout));
if (!*layout) {
msg_gerr("Error creating layout: %s\n", strerror(errno));
return 1;
}
- const struct flashrom_layout tmp = { 0 };
- **layout = tmp;
return 0;
}
--
To view, visit https://review.coreboot.org/c/flashrom/+/68279
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id6cf2c4591aec0620f15d8a39495d2bff6597f96
Gerrit-Change-Number: 68279
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Edward O'Callaghan, Nikolai Artemiev.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68279 )
Change subject: layout.c: Use calloc() to ensure a zeroed layout
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/68279
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id6cf2c4591aec0620f15d8a39495d2bff6597f96
Gerrit-Change-Number: 68279
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Sat, 15 Oct 2022 14:36:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Felix Singer has submitted this change. ( https://review.coreboot.org/c/flashrom/+/68197 )
Change subject: tests/meson.build: Turn file list into list of file objects
......................................................................
tests/meson.build: Turn file list into list of file objects
When a file object is created, Meson also checks if the file actually
exists and an error points to the specific line of meson.build if not.
If just a list of filenames is used, then the error occurs at the line
where the list is used.
Thus, use file objects in tests/meson.build for more useful error
messages.
Signed-off-by: Felix Singer <felixsinger(a)posteo.net>
Change-Id: I0b9144a6b76c1772833817b4e6873818dcf36b05
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68197
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm(a)chromium.org>
Reviewed-by: Thomas Heijligen <src(a)posteo.de>
---
M tests/meson.build
1 file changed, 24 insertions(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
Thomas Heijligen: Looks good to me, approved
Anastasia Klimchuk: Looks good to me, approved
diff --git a/tests/meson.build b/tests/meson.build
index e4f7c2a..c62cc1b 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -11,7 +11,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-srcs = [
+srcs = files(
'io_mock.c',
'tests.c',
'libusb_wraps.c',
@@ -31,7 +31,7 @@
'layout.c',
'chip.c',
'chip_wp.c',
-]
+)
if not programmer.get('dummy').get('active')
srcs += programmer.get('dummy').get('srcs')
--
To view, visit https://review.coreboot.org/c/flashrom/+/68197
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0b9144a6b76c1772833817b4e6873818dcf36b05
Gerrit-Change-Number: 68197
Gerrit-PatchSet: 5
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Felix Singer, Nico Huber, Richard Hughes, Edward O'Callaghan, Angel Pons, Daniel Campello.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64663 )
Change subject: libflashrom: Allow getting the progress_state from the flashctx
......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2:
I decided to write one more comment in this thread. I feel like we need to try and wrap this thread and focus the code review by the link 64663 on technical questions about the patch and progress feature :)
But there are few very important things that I wanted to say, and I will say only the most important, and I am really looking forward to continuing discussing all the rest of the important topics in other places!
First thing first. Angel I appreciate a lot that you spent time and wrote all that to me! I read very carefully and many times. You know, Nico once said to me “you are willing and able to read” and he was right (the exact quote is in gerrit somewhere).
I see that we have a lot to talk about, and I am sure we will do (just not on this patch :D)
>How should we apologize to you?
You already did. You did it REALLY WELL!
> == Two unpleasant situations ==
The best thing about these: both solved as of today! But I know you know this already.
If it makes you feel better, deleting the programmers from Situation 1 had a side effect of deleting their unit tests. Those unit tests were (at that time) the most complicated ones on flashrom, and I was proud of them. It was literally: I did some cleanups/refactorings + I wrote unit tests and the combination of these resulted in discovering a problem which had been hidden for like a year.
Yeah, the solution to a problem that was discovered by unit tests was to delete the code together with unit tests. So I sacrificed something that had value to me and I was proud of. But I could understand and agree that resolving the problem is more important.
Hopefully this makes you feel better :D
Situation 2 is fixed. It happened way before I joined, but I am very happy that I fixed it. Done and dusted! :)
> It went on for about 1.5 years
Sorry if it was not entirely obvious from my message: but it’s not a problem that someone (any one person) decided for whatever reasons, to take a break for 1.5 years. For any number of months/years! It’s fine! Each one of us can decide to take a break, and do it. For me, it is really important to have a team, and to have team members support each other. I can talk on this [very important for me] topic for a long time, but I won’t do it here :)
What I wanted to point out, we can’t accuse contributors just because one of the maintainers (of several) took a break. It’s not really a contributor’s problem.
Any one of us can take a break when they need it. And the rest of the people will take care of everything (as best as they can)!
>Sounds good! It would be interesting to (maybe?) chat about this in a voice call or similar.
Let’s do it then! Good news is: video call already exists, this is flashrom dev meeting. And, between November and March, the time is more convenient for US folks to join.
I will write one more paragraph about the flashrom dev meeting (hopefully people will forgive me, everyone knows I have special feelings for this meeting :)).
I remember you Angel joined once, the first ever meeting. There were many people joining, and also the agenda was somewhat apprehensive. At the time the first meeting started, the agenda contained 4.5 pages of topics, added by many people (pages -> imagine pages on a printer). Those 4.5 pages contained a lot, from development to politics, and everything in between.
We’ve made it through that initial 4.5 pages list of topics around the end of June (we’ve made it wow!!). Also the number of people who join regularly reduced noticeably.
So nowadays we are discussing such very exciting topics as:
“What if we pack these 3 variables into a ABC struct and pass this struct as the first parameter into a XYZ function?”
“Seems like we have two patches on the similar topic , should they be rebased on the top of one another?”
“There is a bug which is marked release blocking, what exactly is in scope of this bug?”
And so on.
TLDR: you are very welcome to join! Between November and March it is late evening EU time.
File include/libflashrom.h:
https://review.coreboot.org/c/flashrom/+/64663/comment/5afd3a01_fac81854
PS2, Line 85: typedef void(flashrom_progress_callback)(struct flashrom_flashctx *flashctx);
> Yes about `flashctx`. But with `user_data` I mean the generic (opaque) object passed […]
>So why not make things simple and pass (progress_state, user_data) ?
I spent some time staring at various code, and I don't know why not. I see that callback is only called internally to flashrom, in a place where flashctx is already available. Get progress state is called externally, but callback is not.
So I don't know. It would be great to have patch owners to join here, but I am not sure they will, for $reasons
Let me try once again,
Richard, Daniel, what do you think about passing (progress_state, user_data) into a callback? Would that work for your use case?
--
To view, visit https://review.coreboot.org/c/flashrom/+/64663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I322bf56ff92f7b4d0ffc92768e9f0cdf7cb82010
Gerrit-Change-Number: 64663
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Hughes <richard(a)hughsie.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Richard Hughes <richard(a)hughsie.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Daniel Campello <campello(a)chromium.org>
Gerrit-Comment-Date: Sat, 15 Oct 2022 09:45:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Keno Fischer.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/68442
to look at the new patch set (#2).
Change subject: flashrom: Add some helpful hints about missing Linux kernel configs
......................................................................
flashrom: Add some helpful hints about missing Linux kernel configs
I was watching a colleague run into trouble trying to use flashrom
on a minimally-configured Linux (used as a coreboot payload) that
was missing some CONFIGs that flashrom needs. Of course, these are
pretty easy to find for the experienced user, but might as well
give the hint about which CONFIG is missing right in the error
message.
Signed-off-by: Keno Fischer <keno(a)juliacomputing.com>
Change-Id: I05cc3d170e59d5bcaf731df5152db5a47746cc0c
---
M hwaccess_physmap.c
M hwaccess_x86_io.c
2 files changed, 28 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/42/68442/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/68442
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I05cc3d170e59d5bcaf731df5152db5a47746cc0c
Gerrit-Change-Number: 68442
Gerrit-PatchSet: 2
Gerrit-Owner: Keno Fischer <keno(a)alumni.harvard.edu>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Keno Fischer <keno(a)alumni.harvard.edu>
Gerrit-MessageType: newpatchset
Keno Fischer has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/68442 )
Change subject: flashrom: Add some helpful hints about missing Linux kernel configs
......................................................................
flashrom: Add some helpful hints about missing Linux kernel configs
I was watching a colleague run into trouble trying to use flashrom
on a minimally-configured Linux (used as a coreboot payload) that
was missing some CONFIGs that flashrom needs. Of course, these are
pretty easy to find for the experienced user, but might as well
give the hint about which CONFIG is missing right in the error
message.
Signed-off-by: Keno Fischer <keno(a)juliacomputing.com>
Change-Id: I05cc3d170e59d5bcaf731df5152db5a47746cc0c
---
M hwaccess_physmap.c
M hwaccess_x86_io.c
2 files changed, 28 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/42/68442/1
diff --git a/hwaccess_physmap.c b/hwaccess_physmap.c
index 81adf18..adc28e7 100644
--- a/hwaccess_physmap.c
+++ b/hwaccess_physmap.c
@@ -286,6 +286,9 @@
msg_perr("Please check if either is enabled in your kernel before reporting a failure.\n");
msg_perr("You can override CONFIG_X86_PAT at boot with the nopat kernel parameter but\n");
msg_perr("disabling the other option unfortunately requires a kernel recompile. Sorry!\n");
+ } else if (ENOENT == errno) {
+ msg_perr("On Linux, this error can be caused by a missing CONFIG_DEVMEM option\n");
+ msg_perr("or a missing /dev/mem device in your filesystem image\n");
}
#elif defined (__OpenBSD__)
msg_perr("Please set securelevel=-1 in /etc/rc.securelevel "
diff --git a/hwaccess_x86_io.c b/hwaccess_x86_io.c
index c3ad313..c3a4402 100644
--- a/hwaccess_x86_io.c
+++ b/hwaccess_x86_io.c
@@ -264,10 +264,18 @@
msg_perr("ERROR: Could not get I/O privileges (%s).\n", strerror(errno));
msg_perr("Make sure you are root. If you are root, your kernel may still\n"
"prevent access based on security policies.\n");
+#if defined(__linux__)
+ if (errno == ENOSYS) {
+ msg_perr("On Linux, make sure your kernel is built with\n",
+ "CONFIG_X86_IOPL_IOPERM\n");
+ }
+#elif defined(__OpenBSD__)
msg_perr("On OpenBSD set securelevel=-1 in /etc/rc.securelevel and\n"
"reboot, or reboot into single user mode.\n");
+#elif defined(__NetBSD__)
msg_perr("On NetBSD reboot into single user mode or make sure\n"
"that your kernel configuration has the option INSECURE enabled.\n");
+#endif
return 1;
}
--
To view, visit https://review.coreboot.org/c/flashrom/+/68442
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I05cc3d170e59d5bcaf731df5152db5a47746cc0c
Gerrit-Change-Number: 68442
Gerrit-PatchSet: 1
Gerrit-Owner: Keno Fischer <keno(a)alumni.harvard.edu>
Gerrit-MessageType: newchange