alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: [PATCH 00/11] ALSA: PCM state reference optimization
Date: Mon, 26 Sep 2022 17:56:15 +0200	[thread overview]
Message-ID: <3d89afec-26fb-a92b-4dd7-76a09739e066@perex.cz> (raw)
In-Reply-To: <20220926135558.26580-1-tiwai@suse.de>

On 26. 09. 22 15:55, Takashi Iwai wrote:
> Hi,
> 
> this is a patch set for simplifying the reference to the current PCM
> state by having the local copy in runtime instead of relying on
> runtime->status indirection.  This also hardens against the attack by
> modifying the mmapped status record.
> 
> The first patch does the basic job in the core PCM side, and the
> second patch flips the PCM status mmap to read-only for hardening,
> while the remaining patches are for drivers to follow the core
> change.
> 
> The conversions are straightforward.  In most places, it's just
> replacing runtime->status->state with runtime->state.
> 
> 
> Takashi
> 
> ===
> 
> Takashi Iwai (11):
>    ALSA: pcm: Avoid reference to status->state
>    ALSA: pcm: Make mmap status read-only
>    ALSA: aloop: Replace runtime->status->state reference to
>      runtime->state
>    ALSA: firewire: Replace runtime->status->state reference to
>      runtime->state
>    ALSA: hda: Replace runtime->status->state reference to runtime->state
>    ALSA: asihpi: Replace runtime->status->state reference to
>      runtime->state
>    ALSA: usb-audio: Replace runtime->status->state reference to
>      runtime->state
>    ALSA: usx2y: Replace runtime->status->state reference to
>      runtime->state
>    ASoC: intel: Replace runtime->status->state reference to
>      runtime->state
>    ASoC: sh: Replace runtime->status->state reference to runtime->state
>    usb: gadget: Replace runtime->status->state reference to
>      runtime->state

Nice cleanup. Perhaps, you may add a note to the second patch that the status 
is already mmaped as read-only in alsa-lib for ages. So no regressions are 
expected.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

  parent reply	other threads:[~2022-09-26 15:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 13:55 [PATCH 00/11] ALSA: PCM state reference optimization Takashi Iwai
2022-09-26 13:55 ` [PATCH 01/11] ALSA: pcm: Avoid reference to status->state Takashi Iwai
2022-09-26 13:55 ` [PATCH 02/11] ALSA: pcm: Make mmap status read-only Takashi Iwai
2022-09-26 13:55 ` [PATCH 03/11] ALSA: aloop: Replace runtime->status->state reference to runtime->state Takashi Iwai
2022-09-26 13:55 ` [PATCH 04/11] ALSA: firewire: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 05/11] ALSA: hda: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 06/11] ALSA: asihpi: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 07/11] ALSA: usb-audio: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 08/11] ALSA: usx2y: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 09/11] ASoC: intel: " Takashi Iwai
2022-09-26 18:00   ` Mark Brown
2022-09-26 13:55 ` [PATCH 10/11] ASoC: sh: " Takashi Iwai
2022-09-26 18:01   ` Mark Brown
2022-09-26 13:55 ` [PATCH 11/11] usb: gadget: " Takashi Iwai
2022-09-26 14:05   ` Greg Kroah-Hartman
2022-09-26 15:56 ` Jaroslav Kysela [this message]
2022-09-26 16:05   ` [PATCH 00/11] ALSA: PCM state reference optimization Takashi Iwai
2022-09-27  1:22 ` Takashi Sakamoto
2022-09-27  6:26   ` Takashi Iwai
2022-09-27 14:25     ` Takashi Sakamoto

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=3d89afec-26fb-a92b-4dd7-76a09739e066@perex.cz \
    --to=perex@perex.cz \
    --cc=alsa-devel@alsa-project.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).