Attention is currently required from: Felix Singer, Nico Huber, Anastasia Klimchuk, Alexander Goncharov.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67393 )
Change subject: tree/: Move programmer_delay() out of programmer state machine
......................................................................
Patch Set 5:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/67393/comment/fa5a17ec_0de365e2
PS4, Line 13:
> > I understand you have more longer-term ideas of modifying/improving libflashrom API. […]
Nico, Can I invite you to attempt to rewrite your wall of text without the condescending^[0] political speech and extract out some of your good concrete technical points and so we can discuss those *specifically* and move forwards please. It is likely there is answers to your questions. However as a human (also with emotions) I am not enthusiastic to continue to entertain the above 'communication style'.
Otherwise I am genuinely very keen to answer your decent questions that seem to be sparely embedded in all that other stuff.
[0]: Hint, Leave out generic paragraphs that any software developer would already know e.g., things that start like "Now every single patch risks regressions.."
--
To view, visit https://review.coreboot.org/c/flashrom/+/67393
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id059abb58b31a066a408009073912da2b224d40c
Gerrit-Change-Number: 67393
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
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-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Tue, 18 Oct 2022 14:11:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Edward O'Callaghan, Anastasia Klimchuk, Alexander Goncharov.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67393 )
Change subject: tree/: Move programmer_delay() out of programmer state machine
......................................................................
Patch Set 5:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/67393/comment/02c506c9_16ab8d99
PS4, Line 13:
> I understand you have more longer-term ideas of modifying/improving libflashrom API. Do you think you can start a discussion about it?
The design is already set, even if not in code. There is a currently
blind `struct flashrom_programmer`. Just like `flashrom_flashctx` it's
supposed to provide the API user with a handle for internal state.
`flashrom_flashctx` only exists once a chip was successfully probed, so
we need that `flashrom_programmer` for any state handling before the
probing.
Similarly, but not in the API yet, we need another handle for things
before the programmer init. If you look at the first three API functions,
this is visible already: flashrom_init() what is it supposed to init?
what could that be but changing a state? same for flashrom_shutdown().
flashrom_set_log_callback() literally says to set a state but has no
argument that would provide a state to alter.
This is also something that if implemented first, would make internal
changes to rid of globals easier and clearer.
One general observation, why I believe all this has become an emotional
drag: there seem to be a lot of patches lately that could be much easier
done in a different order or after something else was done. This is
particularly hard to change because at the same time people argue that
patches should be reviewed and merged when they are written, and just
because they are written. If somebody really feels everything should
be merged: there are still patches around on Gerrit and patchwork (from
ML review times), please start with those before writing any more patches!
--
To view, visit https://review.coreboot.org/c/flashrom/+/67393
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id059abb58b31a066a408009073912da2b224d40c
Gerrit-Change-Number: 67393
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
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-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Tue, 18 Oct 2022 10:31:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Edward O'Callaghan, Anastasia Klimchuk, Alexander Goncharov.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67393 )
Change subject: tree/: Move programmer_delay() out of programmer state machine
......................................................................
Patch Set 5:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/67393/comment/270b755a_917f02b5
PS4, Line 13:
Sorry that this took too long. It's often hard for me emotionally when I get the
feeling to be misunderstood or that it's futile to continue without starting to
explain things from zero. When discussions start like this, people not understan-
ding each other at one level, it often goes round and round to more basic levels
before a common ground can be found.
I'll try to explain my thoughts about a single point and not discuss any technical
details. IMO, this patch is the wrong place to discuss future design.
> Next paragraph I could not parse, clearly programmer global problem got fixed in the context of programmer_delay() here. I guess this paragraph is perhaps speculating beyond the scope of this patch?
Of course it's speculating beyond the scope of this patch. This is quite necessary
to make sure we don't walk in circles (patch wise). There will be a single patch
in the future that will allow us to say re-entry in libflashrom is safe. It is this
currently unknown, future patch that we have to work towards. How can we do that if
we don't plan ahead?
In this instance, I saw the attempt to squeeze logic that currently resides in
the programmer structures into master structures. To me it seemed that this was
only done because the master structures already make it easier to avoid globals.
But not because the logic clearly belongs to the masters. This avoids to reason
about the programmer structures.
But what will happen in the future? We will most likely have to reason about
the programmer structures anyway, when it comes to the huge `internal`
programmer. If it turns out that we need to change the structures later,
it's quite possible that we'll realize that moving the functions here wasn't
necessary and probably change it back (a circle!). I'm not saying it will be
like this, just that it is possible and we can't say what will be if we don't
look ahead.
Now every single patch risks regressions (already proven for this patch), every
single patch needs to be written, reviewed, every single patch can affect future
work (e.g. set a precedent how to get rid of global state in similar cases). That
means there is a lot of effort and burden, even if it only took 10~20 minutes to
write a patch. If we risk that the work will be undone in the near future, that
risks waste of time (and not only for the people involved in the review). I don't
know how it is for you, I can only speak for myself, I have limited time.
There is a very simple way to avoid most of the need to look ahead:
Never start with the low-hanging fruits.
Starting with the easy programmer cases may feel nice and rewarding but is
risky. For instance, if you had tackled the `internal` programmer first wrt.
global state, there would be a very low risk to get any structures wrong; we
wouldn't have this discussion.
I guess the whole thought can be summarized like this: Tackling the easiest
programmer cases first and the hardest last is the wrong order. The hardest
cases will require reasoning; doing them last postpones reasoning that may
lead to changes that render the solutions for the easier ones incorrect.
--
To view, visit https://review.coreboot.org/c/flashrom/+/67393
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id059abb58b31a066a408009073912da2b224d40c
Gerrit-Change-Number: 67393
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
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-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Tue, 18 Oct 2022 10:12:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Edward O'Callaghan.
Liam Flaherty has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68364 )
Change subject: raiden_debug_spi: Remove fixme with explanation
......................................................................
Patch Set 2:
(1 comment)
File raiden_debug_spi.c:
https://review.coreboot.org/c/flashrom/+/68364/comment/d4920bf3_1aef92af
PS2, Line 354: * Table is empty as raiden_debug_spi matches against connected USB
> ... matches against the class and subclass of the connected ...
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/68364
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I43e364c02f42dd499d3c9ca3e0a03ead673da3e6
Gerrit-Change-Number: 68364
Gerrit-PatchSet: 2
Gerrit-Owner: Liam Flaherty <liamflaherty(a)chromium.org>
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: Nikolai Artemiev <nartemiev(a)google.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: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Mon, 17 Oct 2022 23:19:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Edward O'Callaghan, Liam Flaherty.
Hello build bot (Jenkins), Thomas Heijligen, Edward O'Callaghan, Angel Pons, Nikolai Artemiev, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/68364
to look at the new patch set (#3).
Change subject: raiden_debug_spi: Remove fixme with explanation
......................................................................
raiden_debug_spi: Remove fixme with explanation
The raiden_debug_spi programmer will query the connected USB devices and
match against criteria other than the pid rather than iterate through
the vid:pid table.
The fixme has been updated to explain why the dev_entry table is empty.
TICKET: https://ticket.coreboot.org/issues/394
BUG=b:253320285
TEST=build
Change-Id: I43e364c02f42dd499d3c9ca3e0a03ead673da3e6
Signed-off-by: Liam Flaherty <liamflaherty(a)chromium.org>
---
M raiden_debug_spi.c
1 file changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/64/68364/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/68364
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I43e364c02f42dd499d3c9ca3e0a03ead673da3e6
Gerrit-Change-Number: 68364
Gerrit-PatchSet: 3
Gerrit-Owner: Liam Flaherty <liamflaherty(a)chromium.org>
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: Nikolai Artemiev <nartemiev(a)google.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: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Liam Flaherty <liamflaherty(a)chromium.org>
Gerrit-MessageType: newpatchset
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66654 )
Change subject: tree: Change signature of extract_programmer_param_str()
......................................................................
Patch Set 6:
(1 comment)
File atavia.c:
https://review.coreboot.org/c/flashrom/+/66654/comment/99d4446b_1eb74d23
PS6, Line 148: NULL
> The idea of having a special macro for `NULL` is so that it can be grepped for. […]
Yes, thank you for writing it down. I've been grepping however just a different pattern of `func(NULL, [..]`. I do not recall that as a suggestion being written down so clearly although I have observed that being realised in other parts of the code that has lead to the need for these refactors in the first place because of all the half finished patterns. chipoff is one that comes to mind where a typedef was leveraged with the noble goal of having a unified type to represent spi flash memory topology however due to going the other way you have some parts consuming one type and others another which causes even more really subtle issues. A lot of work is now needed to sort out the complex web of types though the control flow graph.
The key idea with this patch stream was that issues could be caught and reverted with just one final patch. It would seem unrealistic to me to have such 20/20 hindsight and so having the last one patch be able to break hard and surface the issues quickly seemed preferable. We probably shouldn't be scared of a revert on the master branch happening once or twice a year in the case of dealing with such large amounts of tech debt being unrolled, we just need to mitigate the statistic of it, learn but at the same time not beat the drums too much.
Ultimately I think you have the correct characterisation, same destination, different journey and lets see what we can all learn from it.
--
To view, visit https://review.coreboot.org/c/flashrom/+/66654
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I781a328fa280e0a9601050dd99a75af72c39c899
Gerrit-Change-Number: 66654
Gerrit-PatchSet: 6
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Mon, 17 Oct 2022 22:50:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Edward O'Callaghan, Liam Flaherty.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68364 )
Change subject: raiden_debug_spi: Remove fixme with explanation
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> Ok for now. […]
Yeah we had a larger idea of refactoring around `struct dev_entry` but that would be obviously a larger change, over multiple programmers etc, so does not fit into a small ticket which asks to Fix the Fixme from one given programmer.
That would be a different ticket with full description covering the idea, it can also be a longer discussion of course.
--
To view, visit https://review.coreboot.org/c/flashrom/+/68364
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I43e364c02f42dd499d3c9ca3e0a03ead673da3e6
Gerrit-Change-Number: 68364
Gerrit-PatchSet: 2
Gerrit-Owner: Liam Flaherty <liamflaherty(a)chromium.org>
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: Nikolai Artemiev <nartemiev(a)google.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: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Liam Flaherty <liamflaherty(a)chromium.org>
Gerrit-Comment-Date: Mon, 17 Oct 2022 21:23:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Thomas Heijligen, Keno Fischer.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68468 )
Change subject: flashrom: Make platform-specific errors only print on that platform
......................................................................
Patch Set 2: -Code-Review
(1 comment)
Patchset:
PS2:
> I think it would be better to integrate the message into `platform_get_io_perms` instead of using ad […]
Thanks for the insight, Thomas.
Keno, you can swap the order of your two patches so that adding the message doesn't depend on this change. Sorry for the trouble.
--
To view, visit https://review.coreboot.org/c/flashrom/+/68468
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4d1e369cb60e160f555f1f9f0c832fe27b75e9de
Gerrit-Change-Number: 68468
Gerrit-PatchSet: 2
Gerrit-Owner: Keno Fischer <keno(a)alumni.harvard.edu>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.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-Attention: Keno Fischer <keno(a)alumni.harvard.edu>
Gerrit-Comment-Date: Mon, 17 Oct 2022 17:54:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment