<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/sound/control.h, branch v3.16.61</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.16.61</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.16.61'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-10-21T07:45:42+00:00</updated>
<entry>
<title>ALSA: control: Hardening for potential Spectre v1</title>
<updated>2018-10-21T07:45:42+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2018-04-24T05:45:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d2de586f9cd1839dd0e98e9887c53b4f4ce89ed9'/>
<id>urn:sha1:d2de586f9cd1839dd0e98e9887c53b4f4ce89ed9</id>
<content type='text'>
commit 088e861edffb84879cf0c0d1b02eda078c3a0ffe upstream.

As recently Smatch suggested, a few places in ALSA control core codes
may expand the array directly from the user-space value with
speculation:

  sound/core/control.c:1003 snd_ctl_elem_lock() warn: potential spectre issue 'kctl-&gt;vd'
  sound/core/control.c:1031 snd_ctl_elem_unlock() warn: potential spectre issue 'kctl-&gt;vd'
  sound/core/control.c:844 snd_ctl_elem_info() warn: potential spectre issue 'kctl-&gt;vd'
  sound/core/control.c:891 snd_ctl_elem_read() warn: potential spectre issue 'kctl-&gt;vd'
  sound/core/control.c:939 snd_ctl_elem_write() warn: potential spectre issue 'kctl-&gt;vd'

Although all these seem doing only the first load without further
reference, we may want to stay in a safer side, so hardening with
array_index_nospec() would still make sense.

In this patch, we put array_index_nospec() to the common
snd_ctl_get_ioff*() helpers instead of each caller.  These helpers are
also referred from some drivers, too, and basically all usages are to
calculate the array index from the user-space value, hence it's better
to cover there.

BugLink: https://marc.info/?l=linux-kernel&amp;m=152411496503418&amp;w=2
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>ALSA: vmaster: Add snd_ctl_sync_vmaster() helper function</title>
<updated>2013-06-24T13:51:54+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2013-06-24T13:51:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1ca2f2ec9e74e9d6e398e09b6468b4462c6d6b6e'/>
<id>urn:sha1:1ca2f2ec9e74e9d6e398e09b6468b4462c6d6b6e</id>
<content type='text'>
Introduce a new helper function, snd_ctl_sync_vmaster(), which updates
the slave put callbacks forcibly as well as calling the hook.  This
will be used in the upcoming patch in HD-audio codec driver for
toggling the mute in vmaster slaves.

Along with the new function, the old snd_ctl_sync_vmaster_hook() is
replaced as a macro calling with the argument hook_only=true.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: add/change some comments describing function return values</title>
<updated>2013-03-12T07:32:53+00:00</updated>
<author>
<name>Yacine Belkadi</name>
<email>yacine.belkadi.1@gmail.com</email>
</author>
<published>2013-03-11T21:05:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb7c06e8e9c93b495e355421cffd3c43c266d7d2'/>
<id>urn:sha1:eb7c06e8e9c93b495e355421cffd3c43c266d7d2</id>
<content type='text'>
script/kernel-doc reports the following type of warnings (when run in verbose
mode):

Warning(sound/core/init.c:152): No description found for return value of
'snd_card_create'

To fix that:
- add missing descriptions of function return values
- use "Return:" sections to describe those return values

Along the way:
- complete some descriptions
- fix some typos

Signed-off-by: Yacine Belkadi &lt;yacine.belkadi.1@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'topic/asoc' into for-linus</title>
<updated>2012-03-18T17:22:37+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2012-03-18T17:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb3f2adc03ab055b19c677a6283523861fafebdd'/>
<id>urn:sha1:cb3f2adc03ab055b19c677a6283523861fafebdd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ALSA: Add a hook capability to vmaster controls</title>
<updated>2012-03-12T12:58:54+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2012-03-12T11:18:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ad787e9aae8bfac14fa96748c0f2b034577be6a'/>
<id>urn:sha1:2ad787e9aae8bfac14fa96748c0f2b034577be6a</id>
<content type='text'>
This patch adds a hook to vmaster control to be called at each time
when the master value is changed.  It'd be handy for an additional
mute LED control following the Master switch, for example.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: Constify the name in new kcontrols</title>
<updated>2012-02-17T16:09:48+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-02-17T01:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ac2ba9452b0a59df6cec10e8d27c52cf0b41a43'/>
<id>urn:sha1:5ac2ba9452b0a59df6cec10e8d27c52cf0b41a43</id>
<content type='text'>
We never modify it and this lets us use a const string as the name without
warnings.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</content>
</entry>
<entry>
<title>ALSA: Introduce common helper functions for jack-detection control</title>
<updated>2011-11-16T10:14:03+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2011-11-02T07:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35be544af367170a9c6bf63adcf9d0cb2d569dbb'/>
<id>urn:sha1:35be544af367170a9c6bf63adcf9d0cb2d569dbb</id>
<content type='text'>
Now move the helper function for creating and reporting the jack-detection
to the common place.  The driver that needs this functionality should
select CONFIG_SND_KCTL_JACK kconfig.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'topic/misc' into for-linus</title>
<updated>2011-05-22T08:01:29+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2011-05-22T08:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=02e5fbf622aabf68bdc02282a17a3aeed054237a'/>
<id>urn:sha1:02e5fbf622aabf68bdc02282a17a3aeed054237a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>urn:sha1:25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
</entry>
<entry>
<title>ALSA: Add snd_ctl_replace() to dynamically replace a control</title>
<updated>2011-03-22T12:22:39+00:00</updated>
<author>
<name>Dimitris Papastamos</name>
<email>dp@opensource.wolfsonmicro.com</email>
</author>
<published>2011-03-16T12:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66b5b9722b8743f83d4c3f11f39665f5f2c40b12'/>
<id>urn:sha1:66b5b9722b8743f83d4c3f11f39665f5f2c40b12</id>
<content type='text'>
Add a function to dynamically replace a given control.  If the
control does not already exist, a third parameter is used to determine
whether to actually add that control.  This is useful in cases where
downloadable firmware at runtime can add or replace existing controls.
A separate patch needs to be made to allow ALSA Mixer to render the
replaced controls on the fly.

Signed-off-by: Dimitris Papastamos &lt;dp@opensource.wolfsonmicro.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
