29 Feb, 2020

1 commit

  • commit 44eeb081b8630bb3ad3cd381d1ae1831463e48bb upstream.

    Some code in HD-audio driver calls snprintf() in a loop and still
    expects that the return value were actually written size, while
    snprintf() returns the expected would-be length instead. When the
    given buffer limit were small, this leads to a buffer overflow.

    Use scnprintf() for addressing those issues. It returns the actually
    written size unlike snprintf().

    Cc:
    Link: https://lore.kernel.org/r/20200218091409.27162-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

21 May, 2019

1 commit

  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
    initial scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

17 Nov, 2017

1 commit

  • We got a regression report about the HD-audio HDMI chmap, where some
    surround channels are reported as UNKNOWN. The git bisection pointed
    the culprit at the commit 9b3dc8aa3fb1 ("ALSA: hda - Register chmap
    obj as priv data instead of codec"). The story behind scene is like
    this:

    - While moving the code out of the legacy HDA to the HDA common place,
    the patch modifies the code to obtain the chmap array indirectly in
    a byte array, and it expands it to kctl value array.
    - At the latter operation, the size of the array is wrongly passed by
    sizeof() to the pointer.
    - It can be 4 on 32bit arch, thus too short for 6+ channels.
    (And that's the reason why it didn't hit other persons; it's 8 on
    64bit arch, thus it's usually enough.)

    The code was further changed meanwhile, but the problem persisted.
    Let's fix it by correctly evaluating the array size.

    Fixes: 9b3dc8aa3fb1 ("ALSA: hda - Register chmap obj as priv data instead of codec")
    Reported-by: VDR User
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

16 Jun, 2016

1 commit


04 Apr, 2016

1 commit

  • The existing TLV callback implementation copies all of the
    cea_channel_speaker_allocation map table to the TLV container
    irrespective of what is reported by sink. This is of little use
    to the userspace application.

    With this patch, it parses the spk_alloc block as queried from
    the ELD, and copies only the corresponding mapping channel
    allocation entries from the cea channel speaker allocation table.
    Thus the user can parse the TLV container to identify sink's
    capability and set the channel map accordingly.

    It shouldn't impact the behavior in AMD chipset, as this makes
    use of already parsed spk alloc block to calculate the channel
    map.

    Signed-off-by: Subhransu S. Prusty
    Signed-off-by: Vinod Koul
    Signed-off-by: Takashi Iwai

    Subhransu S. Prusty
     

07 Mar, 2016

3 commits