Pratyush Yadav
b59889bf34
regmap: Check for out-of-range offsets before mapping them
...
In regmap_raw_{read,write}_range(), offsets are checked to make sure
they aren't out of range. But this check happens _after_ the address is
mapped from physical memory. Input should be sanity-checked before using
it. Mapping the address before validating it leaves the door open to
passing an invalid address to map_physmem(). So check for out of range
offsets _before_ mapping them.
This fixes a segmentation fault in sandbox when -1 is used as an offset
to regmap_{read,write}().
Signed-off-by: Pratyush Yadav <p.yadav@ti.com >
2020-06-11 20:52:11 -06:00
..
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:18 -04:00
2020-06-02 17:27:04 -04:00
2020-05-18 21:19:23 -04:00
2020-06-04 09:44:09 +08:00
2020-06-11 20:52:11 -06:00
2020-05-22 13:27:46 +02:00
2020-05-19 14:01:47 -04:00
2020-06-04 18:53:20 +05:30
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-28 05:52:46 +02:00
2020-06-02 17:27:04 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-06-04 09:44:08 +08:00
2020-05-18 21:19:23 -04:00
2020-06-01 17:55:24 +05:30
2020-06-08 08:51:59 -04:00
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:18 -04:00
2020-05-29 17:59:49 +08:00
2020-05-18 21:19:23 -04:00
2020-06-03 11:52:13 -04:00
2020-05-18 21:19:23 -04:00
2020-06-08 10:42:50 +02:00
2020-05-18 21:19:23 -04:00
2020-06-03 12:14:27 +05:30
2020-06-04 09:44:08 +08:00
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:18 -04:00
2020-06-04 15:05:45 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-06-03 12:27:51 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:18 -04:00
2020-05-22 13:29:25 +02:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:23 -04:00
2020-06-02 17:27:04 -04:00
2020-05-18 21:19:23 -04:00
2020-06-05 04:04:41 +02:00
2020-05-18 21:19:23 -04:00
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:23 -04:00
2020-05-29 18:13:19 +08:00