All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] ALSA: PCM state reference optimization
@ 2022-09-26 13:55 Takashi Iwai
  2022-09-26 13:55 ` [PATCH 01/11] ALSA: pcm: Avoid reference to status->state Takashi Iwai
                   ` (12 more replies)
  0 siblings, 13 replies; 20+ messages in thread
From: Takashi Iwai @ 2022-09-26 13:55 UTC (permalink / raw)
  To: alsa-devel
  Cc: Felipe Balbi, Cezary Rojewski, Kai Vehmanen, Takashi Iwai,
	Greg Kroah-Hartman, Peter Ujfalusi, Pierre-Louis Bossart,
	Ranjani Sridharan, Liam Girdwood, Mark Brown, Bard Liao

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

 drivers/usb/gadget/function/u_uac1_legacy.c |   4 +-
 include/sound/pcm.h                         |  20 ++-
 sound/core/oss/pcm_oss.c                    |  42 +++----
 sound/core/pcm.c                            |   9 +-
 sound/core/pcm_compat.c                     |   4 +-
 sound/core/pcm_lib.c                        |  16 +--
 sound/core/pcm_native.c                     | 128 ++++++++++----------
 sound/drivers/aloop.c                       |   4 +-
 sound/firewire/bebob/bebob_pcm.c            |   4 +-
 sound/firewire/dice/dice-pcm.c              |   4 +-
 sound/firewire/digi00x/digi00x-pcm.c        |   4 +-
 sound/firewire/fireface/ff-pcm.c            |   4 +-
 sound/firewire/fireworks/fireworks_pcm.c    |   4 +-
 sound/firewire/motu/motu-pcm.c              |   4 +-
 sound/firewire/oxfw/oxfw-pcm.c              |   8 +-
 sound/firewire/tascam/tascam-pcm.c          |   4 +-
 sound/hda/hdmi_chmap.c                      |   2 +-
 sound/pci/asihpi/asihpi.c                   |   2 +-
 sound/soc/intel/skylake/skl-pcm.c           |   4 +-
 sound/soc/sh/rz-ssi.c                       |   2 +-
 sound/usb/pcm.c                             |   4 +-
 sound/usb/usx2y/usbusx2yaudio.c             |   3 +-
 sound/usb/usx2y/usx2yhwdeppcm.c             |   3 +-
 23 files changed, 150 insertions(+), 133 deletions(-)

===

Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>

-- 
2.35.3


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-09-27 14:26 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 00/11] ALSA: PCM state reference optimization Jaroslav Kysela
2022-09-26 16:05   ` Takashi Iwai
2022-09-27  1:22 ` Takashi Sakamoto
2022-09-27  6:26   ` Takashi Iwai
2022-09-27 14:25     ` Takashi Sakamoto

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.