diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2024-09-06 14:25:19 +0200 |
---|---|---|
committer | Rob Herring (Arm) <robh@kernel.org> | 2024-09-13 14:00:52 -0500 |
commit | 1a52a094c2f0821860d9ce15fffe01103a146f1f (patch) | |
tree | 4403d7cd86e6b2c80bc31159cc29816f1fabe291 /Documentation/devicetree/bindings/net/allwinner,sun4i-a10-mdio.yaml | |
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 <thomas.weissschuh@linutronix.de>
Link: https://lore.kernel.org/r/20240906-of-address-overflow-v1-1-19567aaa61da@linutronix.de
[robh: Fix to not return error on 0 sized resource]
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/net/allwinner,sun4i-a10-mdio.yaml')
0 files changed, 0 insertions, 0 deletions