All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH v1 0/3] ASoC: Add bounds checking for written values
Date: Mon, 24 Jan 2022 16:52:46 +0000	[thread overview]
Message-ID: <Ye7ZXvIK3sVkvzQJ@sirena.org.uk> (raw)
In-Reply-To: <9eecf478-b705-7273-7553-24bafaec5404@perex.cz>

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-01-24 16:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 15:32 [PATCH v1 0/3] ASoC: Add bounds checking for written values Mark Brown
2022-01-24 15:32 ` [PATCH v1 1/3] ASoC: ops: Reject out of bounds values in snd_soc_put_volsw() Mark Brown
2022-01-24 15:32 ` [PATCH v1 2/3] ASoC: ops: Reject out of bounds values in snd_soc_put_volsw_sx() Mark Brown
2022-01-24 15:32 ` [PATCH v1 3/3] ASoC: ops: Reject out of bounds values in snd_soc_put_xr_sx() Mark Brown
2022-01-24 16:29 ` [PATCH v1 0/3] ASoC: Add bounds checking for written values Jaroslav Kysela
2022-01-24 16:52   ` Mark Brown [this message]
2022-01-24 17:08     ` Takashi Iwai
2022-01-24 19:20       ` Jaroslav Kysela
2022-01-24 20:16         ` Mark Brown
2022-01-24 20:51           ` Jaroslav Kysela
2022-01-25 14:34 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ye7ZXvIK3sVkvzQJ@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.