<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/core/sound_kunit.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-12-05T12:54:05Z</updated>
<entry>
<title>ALSA: core: Fix possible NULL dereference caused by kunit_kzalloc()</title>
<updated>2024-12-05T12:54:05Z</updated>
<author>
<name>Zichen Xie</name>
</author>
<published>2024-11-26T19:24:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5486bf8abfe778b368d8fd1aa655dc01d0013ca'/>
<id>urn:sha1:f5486bf8abfe778b368d8fd1aa655dc01d0013ca</id>
<content type='text'>
[ Upstream commit 9ad467a2b2716d4ed12f003b041aa6c776a13ff5 ]

kunit_kzalloc() may return a NULL pointer, dereferencing it without
NULL check may lead to NULL dereference.
Add NULL checks for all the kunit_kzalloc() in sound_kunit.c

Fixes: 3e39acf56ede ("ALSA: core: Add sound core KUnit test")
Signed-off-by: Zichen Xie &lt;zichenxie0106@gmail.com&gt;
Link: https://patch.msgid.link/20241126192448.12645-1-zichenxie0106@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: kunit: Add missing module descriptions</title>
<updated>2024-05-09T08:13:07Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-05-08T09:11:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=568d0ae72a281d5a08ac1a092e3adb85eff7aee3'/>
<id>urn:sha1:568d0ae72a281d5a08ac1a092e3adb85eff7aee3</id>
<content type='text'>
Now that make W=1 starts complaining the lack of MODULE_DESCRIPTION(),
let's add the missing information.

Reported-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Closes: https://lore.kernel.org/r/ZjpQm-hxLQtpgkUx@smile.fi.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Dragan Simic &lt;dsimic@manjaro.org&gt;
Link: https://lore.kernel.org/r/20240508091128.25274-5-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: kunit: use const qualifier for immutable data</title>
<updated>2024-04-28T09:56:44Z</updated>
<author>
<name>Takashi Sakamoto</name>
</author>
<published>2024-04-25T23:36:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=078c95fe8c44e04e8baa3ade62efc21dcefeb52a'/>
<id>urn:sha1:078c95fe8c44e04e8baa3ade62efc21dcefeb52a</id>
<content type='text'>
Some data for testing is immutable. In the case, the const qualifier is
available for any loader to place it to read-only segment.

Fixes: 3e39acf56ede ("ALSA: core: Add sound core KUnit test")
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Acked-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Message-ID: &lt;20240425233653.218434-1-o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>ALSA: kunit: make read-only array buf_samples static const</title>
<updated>2024-04-26T15:07:01Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2024-04-25T16:07:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=957a36c4fcf47aaa4f0d54bdb8050d86880b7f01'/>
<id>urn:sha1:957a36c4fcf47aaa4f0d54bdb8050d86880b7f01</id>
<content type='text'>
Don't populate the read-only array buf_samples on the stack at
run time, instead make it static const.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Acked-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Reviewed-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Message-ID: &lt;20240425160754.114716-1-colin.i.king@gmail.com&gt;
</content>
</entry>
<entry>
<title>ALSA: kunit: Fix sparse warnings</title>
<updated>2024-02-28T14:00:18Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-02-27T10:49:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9301a412303725ae511229c22ea0f326ad47ad07'/>
<id>urn:sha1:9301a412303725ae511229c22ea0f326ad47ad07</id>
<content type='text'>
There were a few sparse warnings about the cast of strong-typed
snd_pcm_format_t.  Fix them with cast with __force.

For spreading the ugly mess, put them in the definitions
WRONG_FORMAT_1 and WRONG_FORMAT_2 and use them in the callers.

Fixes: 3e39acf56ede ("ALSA: core: Add sound core KUnit test")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/r/202402270303.PmvmQrJV-lkp@intel.com
Link: https://lore.kernel.org/r/20240227104912.18921-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: fix buffer overflow in test_format_fill_silence()</title>
<updated>2024-02-19T08:21:55Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2024-02-17T10:42:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8991d1d6498f663889e99ea7fd3cb9c464cebf1'/>
<id>urn:sha1:e8991d1d6498f663889e99ea7fd3cb9c464cebf1</id>
<content type='text'>
KASAN caught a buffer overflow with the hardcoded 2048 byte buffer
size, when 2080 bytes are written to it:

 BUG: KASAN: slab-out-of-bounds in snd_pcm_format_set_silence+0x3bc/0x3e4
 Write of size 8 at addr ffff0000c8149800 by task kunit_try_catch/1297

 CPU: 0 PID: 1297 Comm: kunit_try_catch Tainted: G N 6.8.0-rc4-next-20240216 #1
 Hardware name: linux,dummy-virt (DT)
 Call trace:
  kasan_report+0x78/0xc0
  __asan_report_store_n_noabort+0x1c/0x28
  snd_pcm_format_set_silence+0x3bc/0x3e4
  _test_fill_silence+0xdc/0x298
  test_format_fill_silence+0x110/0x228
  kunit_try_run_case+0x144/0x3bc
  kunit_generic_run_threadfn_adapter+0x50/0x94
  kthread+0x330/0x3e8
  ret_from_fork+0x10/0x20

 Allocated by task 1297:
  __kmalloc+0x17c/0x2f0
  kunit_kmalloc_array+0x2c/0x78
  test_format_fill_silence+0xcc/0x228
  kunit_try_run_case+0x144/0x3bc
  kunit_generic_run_threadfn_adapter+0x50/0x94
  kthread+0x330/0x3e8
  ret_from_fork+0x10/0x20

Replace the incorrect size with the correct length of 260 64-bit samples.

Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Suggested-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Fixes: 3e39acf56ede ("ALSA: core: Add sound core KUnit test")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Tested-by: Linux Kernel Functional Testing &lt;lkft@linaro.org&gt;
Acked-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Link: https://lore.kernel.org/r/20240217104311.3749655-1-arnd@kernel.org
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: Add sound core KUnit test</title>
<updated>2024-01-30T13:11:37Z</updated>
<author>
<name>Ivan Orlov</name>
</author>
<published>2024-01-25T22:35:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e39acf56ededdebd1033349a16b704839b94b28'/>
<id>urn:sha1:3e39acf56ededdebd1033349a16b704839b94b28</id>
<content type='text'>
At the moment, we have a decent amount of integration tests (selftests)
covering different aspects of the sound subsystem. However, a lot of
of sound-related in-kernel functions remains uncovered. This patch
introduces the KUnit test for the core part of the sound subsystem.
It includes 10 test cases:

- Coverage of the format-related inline functions from 'pcm.h' header
file: snd_pcm_format_physical_width, snd_pcm_format_width,
snd_pcm_format_signed, test_format_endianness

- Coverage of the available bytes counting functions from 'pcm.h'
header: snd_pcm_capture_avail, snd_pcm_playback_avail

- Coverage of functions from pcm_misc: snd_pcm_format_set_silence,
snd_pcm_format_name

- Coverage of card-related functions from init.c: snd_card_set_id,
snd_component_add

This patch depends on the previous patches in this patch series as they
contain fix for the bug, which was found during the test development.
Without them, the test doesn't pass.

Signed-off-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Link: https://lore.kernel.org/r/20240125223522.1122765-3-ivan.orlov0322@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
