On Mon, 24 Jan 2022 17:52:46 +0100, Mark Brown wrote:
On Mon, Jan 24, 2022 at 05:29:50PM +0100, Jaroslav Kysela wrote:
On 24. 01. 22 16:32, Mark Brown wrote:
This series adds verification that values written to registers are in bounds for controls since the core doesn't validate for us.
As discussed, those conditions should be optional to eventually catch the wrong applications. I don't see any benefit to report the range error back when there is value masking code already. The users will note when the unwanted values are written to the hardware, or not?
In general I'd say that silent failures are harder to work with than returning an error at the point where we notice that there's a problem, assuming userspace is paying any attention to the error return at all of course. We certainly have quite a lot of existing put() methods that do return errors and it's not like the application isn't invoking undefined behaviour so I don't see a problem here.
I find also it's more useful to have the proper checks in general.
Jaroslav, is you concern only about the compatibility of user-space? Or anything else? The compatibility is always certainly a slight issue; if this breaks really something useful and actually working stuff, we need to consider the workaround...
thanks,
Takashi