<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/core/seq/oss, branch linux-4.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-11-07T15:05:24Z</updated>
<entry>
<title>ALSA: seq: Fix OSS sysex delivery in OSS emulation</title>
<updated>2017-11-07T15:05:24Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2017-11-07T15:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=132d358b183ac6ad8b3fea32ad5e0663456d18d1'/>
<id>urn:sha1:132d358b183ac6ad8b3fea32ad5e0663456d18d1</id>
<content type='text'>
The SYSEX event delivery in OSS sequencer emulation assumed that the
event is encoded in the variable-length data with the straight
buffering.  This was the normal behavior in the past, but during the
development, the chained buffers were introduced for carrying more
data, while the OSS code was left intact.  As a result, when a SYSEX
event with the chained buffer data is passed to OSS sequencer port,
it may end up with the wrong memory access, as if it were having a too
large buffer.

This patch addresses the bug, by applying the buffer data expansion by
the generic snd_seq_dump_var_event() helper function.

Reported-by: syzbot &lt;syzkaller@googlegroups.com&gt;
Reported-by: Mark Salyzyn &lt;salyzyn@android.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq: Allow the tristate build of OSS emulation</title>
<updated>2017-06-09T20:09:45Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2017-06-09T12:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d774d5ef066971aee1839150bf47d100d8e43d3'/>
<id>urn:sha1:3d774d5ef066971aee1839150bf47d100d8e43d3</id>
<content type='text'>
Currently OSS sequencer emulation is tied with ALSA sequencer core,
both are built in the same level; i.e. when CONFIG_SND_SEQUENCER=y,
the OSS sequencer emulation is also always built-in, even though the
functionality can be built as an individual module.

This patch changes the rule and allows users to build snd-seq-oss
module while others are built-in.  Essentially, it's just a few simple
changes in Kconfig and Makefile.  Some driver codes like opl3 need to
convert from the simple ifdef to IS_ENABLED().  But that's all.

You might wonder how about the dependency: right, it can be messy, but
it still works.  Since we rewrote the sequencer binding with the
standard bus, the driver can be bound at any time on demand.  So, the
synthesizer driver module can be loaded individually from the OSS
emulation core before/after it.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare to move signal wakeup &amp; sigpending methods from &lt;linux/sched.h&gt; into &lt;linux/sched/signal.h&gt;</title>
<updated>2017-03-02T07:42:32Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2017-02-02T18:15:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=174cd4b1e5fbd0d74c68cf3a74f5bd4923485512'/>
<id>urn:sha1:174cd4b1e5fbd0d74c68cf3a74f5bd4923485512</id>
<content type='text'>
Fix up affected files that include this signal functionality via sched.h.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: seq_oss: Change structure initialisation to C99 style</title>
<updated>2016-06-15T08:13:54Z</updated>
<author>
<name>Amitoj Kaur Chawla</name>
</author>
<published>2016-06-15T08:03:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76f64b24e692978a90d3c2e8f57f3a1f0cd7172a'/>
<id>urn:sha1:76f64b24e692978a90d3c2e8f57f3a1f0cd7172a</id>
<content type='text'>
Replace the in order struct initialisation style with explicit field
style.

The Coccinelle semantic patch used to make this change is as follows:

@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@@
identifier decl.i1,i2,decl.fld;
expression e;
position bad.p, bad.fix;
@@

struct i1 i2@p = { ...,
+ .fld = e
- e@fix
 ,...};

Also, removed some unnecessary comments.

Signed-off-by: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq: oss: Don't drain at closing a client</title>
<updated>2016-03-01T19:26:40Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2016-03-01T17:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=197b958c1e76a575d77038cc98b4bebc2134279f'/>
<id>urn:sha1:197b958c1e76a575d77038cc98b4bebc2134279f</id>
<content type='text'>
The OSS sequencer client tries to drain the pending events at
releasing.  Unfortunately, as spotted by syzkaller fuzzer, this may
lead to an unkillable process state when the event has been queued at
the far future.  Since the process being released can't be signaled
any longer, it remains and waits for the echo-back event in that far
future.

Back to history, the draining feature was implemented at the time we
misinterpreted POSIX definition for blocking file operation.
Actually, such a behavior is superfluous at release, and we should
just release the device as is instead of keeping it up forever.

This patch just removes the draining call that may block the release
for too long time unexpectedly.

BugLink: http://lkml.kernel.org/r/CACT4Y+Y4kD-aBGj37rf-xBw9bH3GMU6P+MYg4W1e-s-paVD2pg@mail.gmail.com
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq: Degrade the error message for too many opens</title>
<updated>2016-01-25T10:52:23Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2016-01-25T10:24:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da10816e3d923565b470fec78a674baba794ed33'/>
<id>urn:sha1:da10816e3d923565b470fec78a674baba794ed33</id>
<content type='text'>
ALSA OSS sequencer spews a kernel error message ("ALSA: seq_oss: too
many applications") when user-space tries to open more than the
limit.  This means that it can easily fill the log buffer.

Since it's merely a normal error, it's safe to suppress it via
pr_debug() instead.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq: Fix incorrect sanity check at snd_seq_oss_synth_cleanup()</title>
<updated>2016-01-25T10:49:10Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2016-01-25T10:01:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=599151336638d57b98d92338aa59c048e3a3e97d'/>
<id>urn:sha1:599151336638d57b98d92338aa59c048e3a3e97d</id>
<content type='text'>
ALSA sequencer OSS emulation code has a sanity check for currently
opened devices, but there is a thinko there, eventually it spews
warnings and skips the operation wrongly like:
  WARNING: CPU: 1 PID: 7573 at sound/core/seq/oss/seq_oss_synth.c:311

Fix this off-by-one error.

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: Fix compat_ioctl handling for OSS emulations</title>
<updated>2015-12-03T16:40:21Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2015-12-03T16:19:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83266b6b60b6727af986e84a133dae24d394c3e8'/>
<id>urn:sha1:83266b6b60b6727af986e84a133dae24d394c3e8</id>
<content type='text'>
The ALSA PCM, mixer and sequencer OSS emulations provide the 32bit
compatible ioctl, but they just call the 64bit native ioctl as is.
Although this works in most cases, passing the argument value as-is
isn't guaranteed to work on all architectures.  We need to convert it
via compat_ptr() instead.

This patch addresses the missing conversions.  Since all relevant
ioctls in these functions take the argument as a pointer, we do the
pointer conversion in each compat_ioctl and pass it as a 64bit value
to the native ioctl.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq_oss: fix waitqueue_active without memory barrier in snd-seq-oss</title>
<updated>2015-10-09T07:45:52Z</updated>
<author>
<name>Kosuke Tatsukawa</name>
</author>
<published>2015-10-09T00:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=694470273de29c2d3f3792856d4e748969294789'/>
<id>urn:sha1:694470273de29c2d3f3792856d4e748969294789</id>
<content type='text'>
snd_seq_oss_readq_put_event() seems to be missing a memory barrier which
might cause the waker to not notice the waiter and miss sending a
wake_up as in the following figure.

    snd_seq_oss_readq_put_event		    snd_seq_oss_readq_wait
------------------------------------------------------------------------
					/* wait_event_interruptible_timeout */
					 /* __wait_event_interruptible_timeout */
					  /* ___wait_event */
					  for (;;) {									 prepare_to_wait_event(&amp;wq, &amp;__wait,
					    state);
spin_lock_irqsave(&amp;q-&gt;lock, flags);
if (waitqueue_active(&amp;q-&gt;midi_sleep))
/* The CPU might reorder the test for
   the waitqueue up here, before
   prior writes complete */
					  if ((q-&gt;qlen&gt;0 || q-&gt;head==q-&gt;tail)
					  ...
					  __ret = schedule_timeout(__ret)
if (q-&gt;qlen &gt;= q-&gt;maxlen - 1) {
memcpy(&amp;q-&gt;q[q-&gt;tail], ev, sizeof(*ev));
q-&gt;tail = (q-&gt;tail + 1) % q-&gt;maxlen;
q-&gt;qlen++;
------------------------------------------------------------------------

There are two other place in sound/core/seq/oss/ which have similar
code.  The attached patch removes the call to waitqueue_active() leaving
just wake_up() behind.  This fixes the problem because the call to
spin_lock_irqsave() in wake_up() will be an ACQUIRE operation.

I found this issue when I was looking through the linux source code
for places calling waitqueue_active() before wake_up*(), but without
preceding memory barriers, after sending a patch to fix a similar
issue in drivers/tty/n_tty.c  (Details about the original issue can be
found here: https://lkml.org/lkml/2015/9/28/849).

Signed-off-by: Kosuke Tatsukawa &lt;tatsu@ab.jp.nec.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS</title>
<updated>2015-05-27T19:25:19Z</updated>
<author>
<name>Jie Yang</name>
</author>
<published>2015-05-27T11:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd6a65036f0eac4ad83dc371bb458e9e6ba6e306'/>
<id>urn:sha1:cd6a65036f0eac4ad83dc371bb458e9e6ba6e306</id>
<content type='text'>
We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.

With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.

Signed-off-by: Jie Yang &lt;yang.jie@intel.com&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
