1
0
Fork 0
alistair23-linux/sound
Takashi Iwai 618de0f4ef ALSA: pcm: Clear the full allocated memory at hw_params
The PCM hw_params core function tries to clear up the PCM buffer
before actually using for avoiding the information leak from the
previous usages or the usage before a new allocation.  It performs the
memset() with runtime->dma_bytes, but this might still leave some
remaining bytes untouched; namely, the PCM buffer size is aligned in
page size for mmap, hence runtime->dma_bytes doesn't necessarily cover
all PCM buffer pages, and the remaining bytes are exposed via mmap.

This patch changes the memory clearance to cover the all buffer pages
if the stream is supposed to be mmap-ready (that guarantees that the
buffer size is aligned in page size).

Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20201218145625.2045-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-18 17:09:28 +01:00
..
ac97 ALSA: ac97: (cosmetic) align argument names 2020-09-03 09:27:27 +02:00
aoa ALSA: aoa: i2sbus: use DECLARE_COMPLETION_ONSTACK() macro 2020-09-03 09:26:52 +02:00
arm ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer 2020-03-27 14:44:56 +00:00
atmel ALSA: atmel: ac97: clarify operator precedence 2020-09-03 09:27:34 +02:00
core ALSA: pcm: Clear the full allocated memory at hw_params 2020-12-18 17:09:28 +01:00
drivers ALSA: aloop: Constify ops structs 2020-11-21 09:30:35 +01:00
firewire Merge branch 'topic/usb-audio-refactoring' into for-next 2020-11-24 09:13:00 +01:00
hda Auxiliary Bus support tag for 5.11-rc1 2020-12-04 20:39:45 +00:00
i2c ALSA: i2c: Constify snd_kcontrol_new items 2020-01-03 09:24:24 +01:00
isa ALSA: sb: Fix fall-through warnings for Clang 2020-11-21 09:29:26 +01:00
mips hal2: convert to dma_alloc_noncoherent 2020-09-25 06:20:44 +02:00
oss ALSA: Use fallthrough pseudo-keyword 2020-07-09 13:01:29 +02:00
parisc sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
pci ALSA: hda/realtek - Supported Dell fixed type headset 2020-12-17 10:35:44 +01:00
pcmcia ALSA: Use fallthrough pseudo-keyword 2020-07-09 13:01:29 +02:00
ppc ALSA: ppc: remove redundant checks in PS3 driver probe 2020-11-28 09:49:19 +01:00
sh ALSA: sh: Fix compile warning wrt const 2020-01-05 16:15:14 +01:00
soc ASoC: Updates for v5.11 2020-12-14 15:57:14 +01:00
sparc ALSA: sparc: dbri: fix repeated word 'the' 2020-10-17 09:58:35 +02:00
spi ALSA: spi: More constification 2020-01-05 16:15:13 +01:00
synth ALSA: emux: More constifications 2020-01-05 16:14:46 +01:00
usb ALSA: usb-audio: Disable sample read check if firmware doesn't give back 2020-12-18 17:08:24 +01:00
x86 ALSA: hda: use consistent HDAudio spelling in comments/docs 2020-09-02 19:31:32 +02:00
xen ALSA: xen: Remove superfluous fall through comments 2020-07-09 19:10:37 +02:00
Kconfig
Makefile
ac97_bus.c ALSA: ac97: Treat snd_ac97_bus_ops as const 2020-01-03 09:24:08 +01:00
last.c
sound_core.c