xbc_verify_tree() checks that every node's next and child are below
xbc_node_num. Both fields store the index of an existing node, which
is below xbc_node_num.
So remove the checks.
No functional change.
Signed-off-by: Sang-Heon Jeon <redacted>
---
lib/bootconfig.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
xbc_verify_tree() checks that every node's next and child are below
xbc_node_num. Both fields store the index of an existing node, which
is below xbc_node_num.
This is a kind of foolpoof/defensive checking. (so I call it verify.)
So remove the checks.
No functional change.
Hmm, OK, I think we should decouple the logic/implementation
verification from runtime verification (e.g. wrong format)
and move the former to tools/bootconfig.
Thank you,
xbc_verify_tree() checks that every node's next and child are below
xbc_node_num. Both fields store the index of an existing node, which
is below xbc_node_num.
This is a kind of foolpoof/defensive checking. (so I call it verify.)
quoted
So remove the checks.
No functional change.
Hmm, OK, I think we should decouple the logic/implementation
verification from runtime verification (e.g. wrong format)
and move the former to tools/bootconfig.
Thank you,
Thanks for the review, Masami.
To make sure I understand, you mean moving the foolproof check after
xbc_init() in tools/bootconfig?
xbc_verify_tree() checks that every node's next and child are below
xbc_node_num. Both fields store the index of an existing node, which
is below xbc_node_num.
This is a kind of foolpoof/defensive checking. (so I call it verify.)
quoted
So remove the checks.
No functional change.
Hmm, OK, I think we should decouple the logic/implementation
verification from runtime verification (e.g. wrong format)
and move the former to tools/bootconfig.
Thank you,
Thanks for the review, Masami.
To make sure I understand, you mean moving the foolproof check after
xbc_init() in tools/bootconfig?
Instead of just removing this, move this verification into tools/bootconfig.
(we still need verification of user given broken bootconfig.)
Let me handle it.
Thank you,
xbc_verify_tree() checks that every node's next and child are below
xbc_node_num. Both fields store the index of an existing node, which
is below xbc_node_num.
This is a kind of foolpoof/defensive checking. (so I call it verify.)
quoted
So remove the checks.
No functional change.
Hmm, OK, I think we should decouple the logic/implementation
verification from runtime verification (e.g. wrong format)
and move the former to tools/bootconfig.
Thank you,
Thanks for the review, Masami.
To make sure I understand, you mean moving the foolproof check after
xbc_init() in tools/bootconfig?
Instead of just removing this, move this verification into tools/bootconfig.
(we still need verification of user given broken bootconfig.)
Let me handle it.
Thank you for clarifying. I'm looking forward to it!