Date: Wednesday, January 6, 2021 @ 21:13:01 Author: anthraxx Revision: 405410
upgpkg: linux-hardened 5.10.5.a-1: backport alsa deadlock and disable bpf preload - backport alsa deadlock FS#69171 - disable bpf preload FS#69155 Added: linux-hardened/trunk/ALSA-hda-hdmi-fix-incorrect-mutex-unlock-in-silent_stream_disable.patch Modified: linux-hardened/trunk/PKGBUILD linux-hardened/trunk/config Deleted: linux-hardened/trunk/drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch -------------------------------------------------------------------------+ ALSA-hda-hdmi-fix-incorrect-mutex-unlock-in-silent_stream_disable.patch | 36 +++ PKGBUILD | 13 - config | 14 - drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch | 111 ---------- 4 files changed, 44 insertions(+), 130 deletions(-) Added: ALSA-hda-hdmi-fix-incorrect-mutex-unlock-in-silent_stream_disable.patch =================================================================== --- ALSA-hda-hdmi-fix-incorrect-mutex-unlock-in-silent_stream_disable.patch (rev 0) +++ ALSA-hda-hdmi-fix-incorrect-mutex-unlock-in-silent_stream_disable.patch 2021-01-06 21:13:01 UTC (rev 405410) @@ -0,0 +1,36 @@ +From 3d5c5fdcee0f9a94deb0472e594706018b00aa31 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai <ti...@suse.de> +Date: Fri, 1 Jan 2021 09:38:52 +0100 +Subject: ALSA: hda/hdmi: Fix incorrect mutex unlock in silent_stream_disable() + +The silent_stream_disable() function introduced by the commit +b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to +DP") takes the per_pin->lock mutex, but it unlocks the wrong one, +spec->pcm_lock, which causes a deadlock. This patch corrects it. + +Fixes: b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP") +Reported-by: Jan Alexander Steffens (heftig) <hef...@archlinux.org> +Cc: <sta...@vger.kernel.org> +Acked-by: Kai Vehmanen <kai.vehma...@linux.intel.com> +Link: https://lore.kernel.org/r/20210101083852.12094-1-ti...@suse.de +Signed-off-by: Takashi Iwai <ti...@suse.de> +--- + sound/pci/hda/patch_hdmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c +index 1e4a4b83fbf6f..74d246a0dc6de 100644 +--- a/sound/pci/hda/patch_hdmi.c ++++ b/sound/pci/hda/patch_hdmi.c +@@ -1733,7 +1733,7 @@ static void silent_stream_disable(struct hda_codec *codec, + per_pin->silent_stream = false; + + unlock_out: +- mutex_unlock(&spec->pcm_lock); ++ mutex_unlock(&per_pin->lock); + } + + /* update ELD and jack state via audio component */ +-- +cgit 1.2.3-1.el7 + Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-01-06 20:19:05 UTC (rev 405409) +++ PKGBUILD 2021-01-06 21:13:01 UTC (rev 405410) @@ -4,7 +4,7 @@ # Contributor: Thomas Baechler <tho...@archlinux.org> pkgbase=linux-hardened -pkgver=5.10.4.a +pkgver=5.10.5.a pkgrel=1 pkgdesc='Security-Hardened Linux' url='https://github.com/anthraxx/linux-hardened' @@ -20,7 +20,7 @@ https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign} https://github.com/anthraxx/${pkgbase}/releases/download/${pkgver}/${pkgbase}-${pkgver}.patch{,.sig} config # the main kernel config file - drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch + ALSA-hda-hdmi-fix-incorrect-mutex-unlock-in-silent_stream_disable.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds @@ -27,12 +27,12 @@ '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak ) -sha256sums=('904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec' +sha256sums=('3991a9e16a187d78d5f414d89236ae5d7f404a69e60c4c42a9d262ee19612ef4' 'SKIP' - '0406850c58a3d248ef92de86f1bea1f0777e15c05a8747ce2c7f07a223abf62a' + '7d7709d52c1dc80d07a0f6afeae99e5a55c2b012f2b5f995e426c2bc80b102bb' 'SKIP' - '8c642f2f61b3e5bc37b9e02678ba5001afbe2996a7514f5466f6e98df42b7095' - '56ca378a03341bbe8ddd13a5630922b0c4e0d505b738aec3b21dcfa55ff200d7') + 'f5872ca178ea33ad5fbcf3ad24662111979dd82108a8037fbab737b9e923c05f' + 'e6f6e235a3d97c624e0a3b3ac32f57c0794a4ff651c06445b41719f0fe6c49c6') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase @@ -42,7 +42,6 @@ cd $_srcname echo "Setting version..." - sed -e "/^EXTRAVERSION =/s/=.*/= .${pkgver##*.}/" -i Makefile scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname Modified: config =================================================================== --- config 2021-01-06 20:19:05 UTC (rev 405409) +++ config 2021-01-06 21:13:01 UTC (rev 405410) @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.10.0 Kernel Configuration +# Linux/x86 5.10.5.a Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.2.0" CONFIG_CC_IS_GCC=y @@ -255,9 +255,7 @@ CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y CONFIG_BPF_JIT_ALWAYS_ON=y CONFIG_BPF_JIT_DEFAULT_ON=y -CONFIG_USERMODE_DRIVER=y -CONFIG_BPF_PRELOAD=y -CONFIG_BPF_PRELOAD_UMD=y +# CONFIG_BPF_PRELOAD is not set # CONFIG_USERFAULTFD is not set CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_RSEQ=y @@ -4469,7 +4467,6 @@ CONFIG_GPIO_CDEV=y CONFIG_GPIO_CDEV_V1=y CONFIG_GPIO_GENERIC=m -CONFIG_GPIO_REGMAP=m CONFIG_GPIO_MAX730X=m # @@ -4530,7 +4527,6 @@ CONFIG_GPIO_MSIC=y CONFIG_GPIO_PALMAS=y CONFIG_GPIO_RC5T583=y -CONFIG_GPIO_SL28CPLD=m CONFIG_GPIO_TPS65086=m CONFIG_GPIO_TPS6586X=y CONFIG_GPIO_TPS65910=y @@ -4833,7 +4829,6 @@ CONFIG_SENSORS_UCD9200=m CONFIG_SENSORS_XDPE122=m CONFIG_SENSORS_ZL6100=m -CONFIG_SENSORS_SL28CPLD=m CONFIG_SENSORS_SHT15=m CONFIG_SENSORS_SHT21=m CONFIG_SENSORS_SHT3x=m @@ -4966,7 +4961,6 @@ CONFIG_ZIIRAVE_WATCHDOG=m CONFIG_RAVE_SP_WATCHDOG=m CONFIG_MLX_WDT=m -CONFIG_SL28CPLD_WATCHDOG=m CONFIG_CADENCE_WATCHDOG=m CONFIG_DW_WATCHDOG=m CONFIG_TWL4030_WATCHDOG=m @@ -5124,8 +5118,6 @@ CONFIG_MFD_RC5T583=y CONFIG_MFD_SEC_CORE=y CONFIG_MFD_SI476X_CORE=m -CONFIG_MFD_SIMPLE_MFD_I2C=m -CONFIG_MFD_SL28CPLD=m CONFIG_MFD_SM501=m CONFIG_MFD_SM501_GPIO=y CONFIG_MFD_SKY81452=m @@ -7192,7 +7184,6 @@ CONFIG_USB_APPLEDISPLAY=m CONFIG_APPLE_MFI_FASTCHARGE=m CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m CONFIG_USB_TRANCEVIBRATOR=m CONFIG_USB_IOWARRIOR=m @@ -8757,7 +8748,6 @@ CONFIG_PWM_LPSS_PCI=m CONFIG_PWM_LPSS_PLATFORM=m CONFIG_PWM_PCA9685=m -CONFIG_PWM_SL28CPLD=m CONFIG_PWM_TWL=m CONFIG_PWM_TWL_LED=m Deleted: drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch =================================================================== --- drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch 2021-01-06 20:19:05 UTC (rev 405409) +++ drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch 2021-01-06 21:13:01 UTC (rev 405410) @@ -1,111 +0,0 @@ -From 39136f88e40628ff112fa5efd035e7707750d1a9 Mon Sep 17 00:00:00 2001 -From: Rodrigo Siqueira <rodrigo.sique...@amd.com> -Date: Tue, 15 Dec 2020 10:33:34 -0500 -Subject: drm/amd/display: Add get_dig_frontend implementation for DCEx - -Some old ASICs might not implement/require get_dig_frontend helper; in -this scenario, we can have a NULL pointer exception when we try to call -it inside vbios disable operation. For example, this situation might -happen when using Polaris12 with an eDP panel. This commit avoids this -situation by adding a specific get_dig_frontend implementation for DCEx. - -Cc: Alex Deucher <alexander.deuc...@amd.com> -Cc: Borislav Petkov <b...@alien8.de> -Cc: Harry Wentland <harry.wentl...@amd.com> -Cc: Nicholas Kazlauskas <nicholas.kazlaus...@amd.com> -Cc: Chiawen Huang <chiawen.hu...@amd.com> -Reported-and-tested-by: Borislav Petkov <b...@suse.de> -Acked-by: Alex Deucher <alexander.deuc...@amd.com> -Signed-off-by: Rodrigo Siqueira <rodrigo.sique...@amd.com> -Signed-off-by: Alex Deucher <alexander.deuc...@amd.com> -Cc: sta...@vger.kernel.org ---- - .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 44 +++++++++++++++++++++- - .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 2 + - 2 files changed, 44 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c -index b409f6b2bfd8..56bc401536c5 100644 ---- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c -+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c -@@ -119,7 +119,8 @@ static const struct link_encoder_funcs dce110_lnk_enc_funcs = { - .disable_hpd = dce110_link_encoder_disable_hpd, - .is_dig_enabled = dce110_is_dig_enabled, - .destroy = dce110_link_encoder_destroy, -- .get_max_link_cap = dce110_link_encoder_get_max_link_cap -+ .get_max_link_cap = dce110_link_encoder_get_max_link_cap, -+ .get_dig_frontend = dce110_get_dig_frontend - }; - - static enum bp_result link_transmitter_control( -@@ -235,6 +236,44 @@ static void set_link_training_complete( - - } - -+unsigned int dce110_get_dig_frontend(struct link_encoder *enc) -+{ -+ struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc); -+ u32 value; -+ enum engine_id result; -+ -+ REG_GET(DIG_BE_CNTL, DIG_FE_SOURCE_SELECT, &value); -+ -+ switch (value) { -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGA: -+ result = ENGINE_ID_DIGA; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGB: -+ result = ENGINE_ID_DIGB; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGC: -+ result = ENGINE_ID_DIGC; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGD: -+ result = ENGINE_ID_DIGD; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGE: -+ result = ENGINE_ID_DIGE; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGF: -+ result = ENGINE_ID_DIGF; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGG: -+ result = ENGINE_ID_DIGG; -+ break; -+ default: -+ // invalid source select DIG -+ result = ENGINE_ID_UNKNOWN; -+ } -+ -+ return result; -+} -+ - void dce110_link_encoder_set_dp_phy_pattern_training_pattern( - struct link_encoder *enc, - uint32_t index) -@@ -1665,7 +1704,8 @@ static const struct link_encoder_funcs dce60_lnk_enc_funcs = { - .disable_hpd = dce110_link_encoder_disable_hpd, - .is_dig_enabled = dce110_is_dig_enabled, - .destroy = dce110_link_encoder_destroy, -- .get_max_link_cap = dce110_link_encoder_get_max_link_cap -+ .get_max_link_cap = dce110_link_encoder_get_max_link_cap, -+ .get_dig_frontend = dce110_get_dig_frontend - }; - - void dce60_link_encoder_construct( -diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h -index cb714a48b171..fc6ade824c23 100644 ---- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h -+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h -@@ -295,6 +295,8 @@ void dce110_link_encoder_connect_dig_be_to_fe( - enum engine_id engine, - bool connect); - -+unsigned int dce110_get_dig_frontend(struct link_encoder *enc); -+ - void dce110_link_encoder_set_dp_phy_pattern_training_pattern( - struct link_encoder *enc, - uint32_t index); --- -cgit v1.2.3-1-gf6bb5 -