diff options
author | Thomas Weißschuh <[email protected]> | 2024-09-06 14:25:19 +0200 |
---|---|---|
committer | Rob Herring (Arm) <[email protected]> | 2024-09-13 14:00:52 -0500 |
commit | 1a52a094c2f0821860d9ce15fffe01103a146f1f (patch) | |
tree | 4403d7cd86e6b2c80bc31159cc29816f1fabe291 /scripts/gcc-plugins/gcc-generate-rtl-pass.h | |
parent | 22e2bf1214ff50981c7e056970241a36ab1f3d14 (diff) |
of: address: Unify resource bounds overflow checking
The members "start" and "end" of struct resource are of type
"resource_size_t" which can be 32bit wide.
Values read from OF however are always 64bit wide.
Refactor the diff overflow checks into a helper function.
Also extend the checks to validate each calculation step.
Signed-off-by: Thomas Weißschuh <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[robh: Fix to not return error on 0 sized resource]
Signed-off-by: Rob Herring (Arm) <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-rtl-pass.h')
0 files changed, 0 insertions, 0 deletions