Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Sergii Dmytruk.
10 comments:
File libflashrom.h:
Patch Set #23, Line 137: #define FLASHROM_WP_MAX_RANGES 128
Should we use dynamic allocation instead?
Done
Patch Set #23, Line 143: size_t
Technically `size_t` is supposed to specify a byte count. It's often […]
It's nice that size_t is guaranteed to be large enough to represent the number of elements in any array though. Although size_t's intended use is for representing the size of an object in bytes, I don't think that should keep us from using it for somewhere else where it's well suited.
File writeprotect.c:
Patch Set #23, Line 187: preferred
What is preferred and why?
For choosing one range encoding over another it's pretty much arbitrary. Usually the only ranges that have multiple encodings either span the entire flash or are completely empty. E.g. TB and SEC have no affect on them. In that case TB/SEC are just set to 0.
I've removed preferred from the description since it was misleading.
Patch Set #23, Line 233: TB in a OTP register
Please mention the chip where you have seen something like this. Sometimes […]
Done
Patch Set #23, Line 234: perserved
p*re*served
Done
ARRAY_SIZE(bits->bp) + 1 /* TB */ + 1 /* SEC */ + 1 /* CMP */ ?
Done
Patch Set #23, Line 240: can_write_bit(bits->bp[i])
This would stop at the first not writable bit and skip further writable […]
Done
Patch Set #23, Line 255: for (uint32_t range_index = 0; range_index < *count; range_index++) {
Please check that the destination arrays don't overflow (wouldn't […]
Done
Why 32?
Changed to size_t.
Patch Set #23, Line 308: struct wp_range_cfg_pair range_cfg_pairs[FLASHROM_WP_MAX_RANGES];
Not on the stack, please. Flashrom sometimes runs in embedded environments.
Done
To view, visit change 58481. To unsubscribe, or for help writing mail filters, visit settings.