1. 17 Aug, 2023 9 commits
  2. 16 Aug, 2023 2 commits
  3. 15 Aug, 2023 1 commit
  4. 10 Aug, 2023 1 commit
  5. 08 Aug, 2023 4 commits
  6. 04 Aug, 2023 6 commits
  7. 02 Aug, 2023 2 commits
  8. 01 Aug, 2023 10 commits
  9. 29 Jul, 2023 2 commits
    • Justin Stitt's avatar
      ALSA: bcd2000: refactor deprecated strncpy · 2ad27caa
      Justin Stitt authored
      `strncpy` is deprecated for use on NUL-terminated destination strings [1].
      
      A suitable replacement is `strscpy` [2] due to the fact that it
      guarantees NUL-termination on its destination buffer argument which is
      _not_ always the case for `strncpy`!
      
      It should be noted that, in this case, the destination buffer has a
      length strictly greater than the source string. Moreover, the source
      string is NUL-terminated (and so is the destination) which means there
      was no real bug happening here. Nonetheless, this patch would get us one
      step closer to eliminating the `strncpy` API in the kernel, as its use
      is too ambiguous. We need to favor less ambiguous replacements such as:
      strscpy, strscpy_pad, strtomem and strtomem_pad (amongst others).
      
      Technically, my patch yields subtly different behavior. The original
      implementation with `strncpy` would fill the entire destination buffer
      with null bytes [3] while `strscpy` will leave the junk, uninitialized
      bytes trailing after the _mandatory_ NUL-termination. So, if somehow
      `card->driver` or `card->shortname` require this NUL-padding behavior
      then `strscpy_pad` should be used. My interpretation, though, is that
      the aforementioned fields are just fine as NUL-terminated strings.
      Please correct my assumptions if needed and I'll send in a v2.
      
      [1]: www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
      [2]: manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html
      [3]: https://linux.die.net/man/3/strncpy
      
      Link: https://github.com/KSPP/linux/issues/90
      Link: https://lore.kernel.org/r/20230727-sound-xen-v1-1-89dd161351f1@google.com (related ALSA patch)
      Signed-off-by: default avatarJustin Stitt <justinstitt@google.com>
      Link: https://lore.kernel.org/r/20230727-sound-usb-bcd2000-v1-1-0dc73684b2f0@google.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2ad27caa
    • Justin Stitt's avatar
      ALSA: xen-front: refactor deprecated strncpy · 44900c3e
      Justin Stitt authored
      `strncpy` is deprecated for use on NUL-terminated destination strings [1].
      
      A suitable replacement is `strscpy` [2] due to the fact that it
      guarantees NUL-termination on its destination buffer argument which is
      _not_ always the case for `strncpy`!
      
      It should be noted that, in this case, the destination buffer has a
      length strictly greater than the source string. Moreover, the source
      string is NUL-terminated (and so is the destination) which means there
      was no real bug happening here. Nonetheless, this patch would get us one
      step closer to eliminating the `strncpy` API in the kernel, as its use
      is too ambiguous. We need to favor less ambiguous replacements such as:
      strscpy, strscpy_pad, strtomem and strtomem_pad (amongst others).
      
      Technically, my patch yields subtly different behavior. The original
      implementation with `strncpy` would fill the entire destination buffer
      with null bytes [3] while `strscpy` will leave the junk, uninitialized
      bytes trailing after the _mandatory_ NUL-termination. So, if somehow
      `pcm->name` or `card->driver/shortname/longname` require this
      NUL-padding behavior then `strscpy_pad` should be used. My
      interpretation, though, is that the aforementioned fields are just fine
      as NUL-terminated strings. Please correct my assumptions if needed and
      I'll send in a v2.
      
      [1]: www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
      [2]: manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html
      [3]: https://linux.die.net/man/3/strncpy
      
      Link: https://github.com/KSPP/linux/issues/90Signed-off-by: default avatarJustin Stitt <justinstitt@google.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Link: https://lore.kernel.org/r/20230727-sound-xen-v1-1-89dd161351f1@google.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      44900c3e
  10. 27 Jul, 2023 1 commit
  11. 25 Jul, 2023 1 commit
    • Takashi Iwai's avatar
      Merge tag 'asoc-v6.6-early' of... · a32e0834
      Takashi Iwai authored
      Merge tag 'asoc-v6.6-early' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
      
      ASoC: Updates for v6.6
      
      Here's an initial batch of updates for ASoC for this release cycle.
      We've got a bunch of new drivers in here, a bit of core work from
      Morimoto-san and quite a lot of janitorial work.  There's several
      updates that pull in changes from other subsystems in order to build
      on them:
      
       - An adaptor to allow use of IIO DACs and ADCs in ASoC which pulls in
         some IIO changes.
       - Create a library function for intlog10() and use it in the NAU8825
         driver.
       - Include the ASoC tests, including the topology tests, in the default
         KUnit full test coverage.  This also involves enabling UML builds of
         ALSA since that's the default KUnit test environment which pulls in
         the addition of some stubs to the driver.
       - More factoring out from Morimoto-san.
       - Convert a lot of drivers to use the more modern maple tree register
         cache.
       - Support for AMD machines with MAX98388 and NAU8821, Cirrus Logic
         CS35L36, Intel AVS machines with ES8336 and RT5663 and NXP i.MX93.
      a32e0834
  12. 24 Jul, 2023 1 commit
    • Mark Brown's avatar
      ALSA: hda: Adding support for CS35L56 on HDA · 85d12eda
      Mark Brown authored
      Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:
      
      This set of patches adds support for using the CS35L56 boosted smart
      amplifier on HDA systems. In these systems the CS35L56 audio is
      routed through a HDA-to-I2S bridge codec.
      
      This doesn't include the changes to the Realtek driver to actually hook
      up the CS35L56 driver, because we don't yet have the QUIRK IDs to
      associate it with. But we want to publish the driver now so that it is
      available for bringing up hardware with the CS35L56.
      
      The first 9 patches are moving code out of the ASoC driver and into the
      shared library so that it can be shared with the HDA driver.
      
      Patch #10 fixes missing #includes in the HDA headers so that the CS35L56
      driver doesn't have to #include headers that it doesn't use.
      85d12eda