Attention is currently required from: Nico Huber, Stefan Reinauer, Anastasia Klimchuk.
View Change
1 comment:
Commit Message:
Patch Set #4, Line 14:
The user of the registered_masters type is therefore
responsible for querying the buses_supported field before
attempting to dereference a ptr field in the anon struct.
Can the user check which one out of three is not null?
It's a good question. I guess I mean "user" here to mean things that call "spi_send_command()" such as in spi25.c.
The actual case where this exploded was when w25q_read_status_register_2() used spi_send_command(), which requires that the master be a spi_master where as Hardware-sequenced ICH that is an opaque master was being used.
Essentially the union is a bit of a trap.
To view, visit change 50246. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I576967a8599b923c902e39f177f39146291cc242
Gerrit-Change-Number: 50246
Gerrit-PatchSet: 4
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Alan Green <avg@google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Sam McNally <sammc@google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Comment-Date: Mon, 03 May 2021 09:22:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: comment