On Tue, Sep 01, 2015 at 11:56:06AM -0700, Tony Lindgren wrote: > * Mark Brown <broonie@xxxxxxxxxx> [150901 11:40]: > > That'd work. The other thing I was thinking we could do is to get > > syscon to treat any excessively large address that gets passed in that > > looks like an absolute address appropriately. > Hmm wouldn't that get messy for 64-bit :) How about something > like: Meh, it'd probably be fine - I was thinking falling back to trying to substract the base address if the passed address was out of bounds. It's not super elegant though, something that directly does the right thing would be better. > unsigned long syscon_regmap_get_offset(struct regmap *syscon, > void __iomem *base) > Not sure if that's something that some drivers would start to > misuse with read/writel though.. Presumably not if the driver > already is using syscon. It should be really easy to spot abuse I'd hope.
Attachment:
signature.asc
Description: Digital signature