android_kernel_oneplus_msm8998/sound/drivers/opl3
Takashi Iwai 0f3234318b ALSA: opl3: Hardening for potential Spectre v1
commit 7f054a5bee0987f1e2d4e59daea462421c76f2cb upstream.

As recently Smatch suggested, one place in OPL3 driver may expand the
array directly from the user-space value with speculation:
  sound/drivers/opl3/opl3_synth.c:476 snd_opl3_set_voice() warn: potential spectre issue 'snd_opl3_regmap'

This patch puts array_index_nospec() for hardening against it.

BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-02 07:53:41 -07:00
..
Makefile ALSA: clean up the logic for building sequencer modules 2009-05-29 11:49:42 +02:00
opl3_drums.c [ALSA] Remove xxx_t typedefs: OPL3 2006-01-03 12:18:04 +01:00
opl3_lib.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
opl3_midi.c ALSA: opl3: small array underflow 2015-03-06 13:04:42 +01:00
opl3_oss.c sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where needed 2011-10-31 19:31:22 -04:00
opl3_seq.c ALSA: seq: Define driver object in each driver 2015-02-12 14:15:54 +01:00
opl3_synth.c ALSA: opl3: Hardening for potential Spectre v1 2018-05-02 07:53:41 -07:00
opl3_voice.h [ALSA] Remove xxx_t typedefs: OPL3 2006-01-03 12:18:04 +01:00