From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41246C4708E for ; Wed, 4 Jan 2023 14:37:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231130AbjADOhT (ORCPT ); Wed, 4 Jan 2023 09:37:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237542AbjADOhQ (ORCPT ); Wed, 4 Jan 2023 09:37:16 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5E7DE7E for ; Wed, 4 Jan 2023 06:37:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5DA4BB8166B for ; Wed, 4 Jan 2023 14:37:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C38ADC433F0; Wed, 4 Jan 2023 14:37:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672843033; bh=50PWr/NIxnc71/NjznbROl89vgotgUCH1SitKMuaxqE=; h=Subject:To:Cc:From:Date:From; b=kF+bvOEFQnUC6rVrxxh3IXDUUwSPhfC3rPigXHemFqh8F0WNXUGwfrKPO4LEDUxZo zBw2l91elmRLBXMrEaOUoeDUbyfNb1QgfPoQuHLQ5ifBvUpehHh5k8Dud6jgF5y+EU 6x7Zo8h5YU4ISWE3Kj9vT1+zH6/ajVKJleCnu/zc= Subject: FAILED: patch "[PATCH] drm/amd/dc/dce120: Fix audio register mapping, stop" failed to apply to 6.0-stable tree To: lyude@redhat.com, alexander.deucher@amd.com Cc: From: Date: Wed, 04 Jan 2023 15:37:02 +0100 Message-ID: <167284302214062@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 6.0-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Possible dependencies: 6110a80f31b7 ("drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 6110a80f31b74773a28394259695513e0ac38406 Mon Sep 17 00:00:00 2001 From: Lyude Paul Date: Mon, 14 Nov 2022 17:20:45 -0500 Subject: [PATCH] drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN There's been a very long running bug that seems to have been neglected for a while, where amdgpu consistently triggers a KASAN error at start: BUG: KASAN: global-out-of-bounds in read_indirect_azalia_reg+0x1d4/0x2a0 [amdgpu] Read of size 4 at addr ffffffffc2274b28 by task modprobe/1889 After digging through amd's rather creative method for accessing registers, I eventually discovered the problem likely has to do with the fact that on my dce120 GPU there are supposedly 7 sets of audio registers. But we only define a register mapping for 6 sets. So, fix this and fix the KASAN warning finally. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c index 1b70b78e2fa1..af631085e88c 100644 --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c @@ -359,7 +359,8 @@ static const struct dce_audio_registers audio_regs[] = { audio_regs(2), audio_regs(3), audio_regs(4), - audio_regs(5) + audio_regs(5), + audio_regs(6), }; #define DCE120_AUD_COMMON_MASK_SH_LIST(mask_sh)\