All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Jaroslav Kysela <perex@perex.cz>
Subject: Re: [PATCH 6/8] ALSA: emu10k1: add support for 2x/4x word clocks in E-MU D.A.S. mode
Date: Wed, 14 Jun 2023 12:53:34 +0200	[thread overview]
Message-ID: <ZImcLtzArlB1VAny@ugly> (raw)
In-Reply-To: <87352ubdzw.wl-tiwai@suse.de>

On Wed, Jun 14, 2023 at 11:16:19AM +0200, Takashi Iwai wrote:
>On Wed, 14 Jun 2023 10:52:54 +0200,
>Oswald Buddenhagen wrote:
>> 
>> you're allowing _hypothetical_ crappy 3rd party code to dictate what
>> you can and cannot do. that's a completely unreasonable and
>> counterproductive attitude, akin to letting hostage-takers set the
>> rules.
>
>Oswald, it's no hypothetical, I have seen lots of applications that
>did crash with such mixer element changes in the past.
>
these apps have been meanwhile fixed or become obsolete, which makes it 
a hypothetical again.

>It's no dictation by 3rd party.
>
it IS. that's exactly what letting downstream limit your possibilities 
is. especially if it's BROKEN downstream.

>We simply must not crash things by an
>update (unless it's a must, something like a security fix).
>
and i'm telling you that this is an unreasonable reading of the rule.  
_every_ new feature in something already existing has the potential to 
blow up some crappy downstream code.

>> >> > Oh well, that's really not a change to be advertised for creating /
>> >> > deleting kctls from the put callback at all.
>> >> > and? it's done, and it's basically impossible to revert. so we
>> >> may
>> >> reap its full benefits just as well, as i did in that previous commit.
>> > 
>> > Well, I can revert your commit, too...
>> > 
>> sure, but my point was that there are likely many more such commits,
>> some of them not explicitly marked as such. it would be a very costly
>> and risky exercise to actually do that revert at this point.
>
>Sure, I didn't mean to do it immediately, it's no easy task.
>
great! then you can adjust this driver at that later point as well, when 
you actually want to go forward with that project. ;-)

>> > The way you're trying to implement is an anti-pattern,
>> > 
>> that's something you keep repeating in various ways, but i see no
>> evidence that there is an _actual_ problem.
>
>There were actual problems, and we had to address them.
>
what exactly where those problems?
do the circumstances under which they occurred still apply?

>The API is there and it should be usable in the ideal world, but we
>know that it breaks far more than expected.  We don't prohibit that
>API, but the actual use should be limited for very special use cases.
>
that's exactly the wrong way to go about it. the way to make sure that 
fewer apps crash is to hammer them as much as possible. if you wanted to 
make sure that they all *really* work, you'd randomly create and destroy 
fake controls from time to time.

>If it were triggered in only certain (rare and race-free) situations,
>it'd be acceptable.  But your patch allows every user to trigger it by
>the normal kctl value adjustment, which is simply no-go.
>
you are describing a completely contrieved attack scenario. it would 
have to be a multi-user system with an e-mu card where one user 
intentionally messes with the mixer to crash a broken application 
another user is using at the same time. think through the probabilities, 
motivations, alternative attack vectors, and how the whole affair would 
play out IRL for the attacker.

regards,
ossi

  reply	other threads:[~2023-06-14 10:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13  7:38 [PATCH 0/8] ALSA: emu10k1: add support for high-bitrate modes of E-MU cards Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 1/8] ALSA: emu10k1: introduce alternative E-MU D.A.S. mode Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 2/8] ALSA: emu10k1: improve mixer control naming in " Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 3/8] ALSA: emu10k1: set the "no filtering" bits on PCM voices Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 4/8] ALSA: emu10k1: make playback in E-MU D.A.S. mode 32-bit Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 5/8] ALSA: add snd_ctl_add_locked() Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 6/8] ALSA: emu10k1: add support for 2x/4x word clocks in E-MU D.A.S. mode Oswald Buddenhagen
2023-06-13  9:20   ` Takashi Iwai
2023-06-13 10:52     ` Oswald Buddenhagen
2023-06-13 11:08       ` Takashi Iwai
2023-06-13 14:00         ` Oswald Buddenhagen
2023-06-13 14:13           ` Takashi Iwai
2023-06-13 15:23             ` Oswald Buddenhagen
2023-06-13 15:43               ` Takashi Iwai
2023-06-13 17:14                 ` Oswald Buddenhagen
2023-06-14  6:36                   ` Takashi Iwai
2023-06-14  8:52                     ` Oswald Buddenhagen
2023-06-14  9:16                       ` Takashi Iwai
2023-06-14 10:53                         ` Oswald Buddenhagen [this message]
2023-06-13  7:38 ` [PATCH 7/8] ALSA: emu10k1: add high-rate capture " Oswald Buddenhagen
2023-06-13  7:38 ` [PATCH 8/8] ALSA: emu10k1: add high-rate playback " Oswald Buddenhagen
2023-06-22  7:05   ` kernel test robot

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=ZImcLtzArlB1VAny@ugly \
    --to=oswald.buddenhagen@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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.