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 21:00:52 +0200 |
commit | 1a52a094c2f0821860d9ce15fffe01103a146f1f (patch) | |
tree | 4403d7cd86e6b2c80bc31159cc29816f1fabe291 /Documentation/devicetree/bindings/display | |
parent | dt-bindings: incomplete-devices: And another batch of compatibles (diff) | |
download | linux-1a52a094c2f0821860d9ce15fffe01103a146f1f.tar.xz linux-1a52a094c2f0821860d9ce15fffe01103a146f1f.zip |
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/display')
0 files changed, 0 insertions, 0 deletions