Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7008021ioo; Thu, 2 Jun 2022 19:47:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1hSRwekQV23aOIeq3izLR3nuCwoalIf5N1koqx352hggeNpddgL8+ZAloAACQ4ibZcLIz X-Received: by 2002:a17:906:d0cf:b0:708:ad9f:8e88 with SMTP id bq15-20020a170906d0cf00b00708ad9f8e88mr6559259ejb.735.1654224425777; Thu, 02 Jun 2022 19:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654224425; cv=none; d=google.com; s=arc-20160816; b=aU7uzmYKqjCgza/6sPm2ZCMKTf/+BfmxQHDcmgW1J1Kq7tYVU2oRZNzHHrDV8Q+eWR p/zpIJsh2ojclBOIzCM7Lf0mrz1r7yrdUOwKLdJmpDUEkOiE6180JB3R02EwqmQZFt4p k9Pd6hSBgFqnkxf4I4PGs1PPg0CekZOWCWZq/5GXDdc2hZQP8FE7j7W85FybJ+SvZsS1 m/vGN6eYXBheW9P4ZOfbmO7vSvgT97RoZTMlKD+0Eici27zPFWxSwPVflklT3Nrt6lVe lRJBgKZl7oO7YFxvn57Cf3j4U0kjFlO1jt1kwajOQeSyuu75qOVjtEkBuJym9t1o441T b9EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=P4l1FsyAk1RlV/u3mgwVdI7BUjKPUw4KOmo6ae9MZqQ=; b=iZtgfaf+8vyHFBaK23EbiTZyL+oyMpPlxbtUa5Q3NxkJCp1Xw+JRFFa4CP0eYz2inn i7Q1qxnRFNycqkXEuPla7ugjQOOupIoxk0QFKBlh4c7QdKhH8r1a3aLzDhXAdV1bcTK7 Jv2QB2pNaUhRNflA72DNW1lzWojB+YpHg/dk5GgvRqgpXXb7RGbKRCPqm9CeV+FjRpVB JOMidnngHgvrWjFAIA1cNFArcj6G9gGILTjlbqZNGKdJ+4Zke6ZH8PtRgkV7WVyu6rNw vYj/qZLXKM49Nw54vmtcsBvD925I5sjR0/vr0Vx6Aad3gi1EJgtC4BPPsRY+MM0W5Y4A fokg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="XTpUyxy/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p16-20020a170906499000b006f3fd7b244fsi5990855eju.102.2022.06.02.19.46.32; Thu, 02 Jun 2022 19:47:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="XTpUyxy/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236550AbiFBPoW (ORCPT + 99 others); Thu, 2 Jun 2022 11:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236512AbiFBPoV (ORCPT ); Thu, 2 Jun 2022 11:44:21 -0400 Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EE932A7ABA for ; Thu, 2 Jun 2022 08:44:21 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-f2cbceefb8so7183039fac.11 for ; Thu, 02 Jun 2022 08:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=P4l1FsyAk1RlV/u3mgwVdI7BUjKPUw4KOmo6ae9MZqQ=; b=XTpUyxy/cMnRWRwyHzKa/U5L3VPm0PxvRYr4BcEHyeTboJSw7UN1o5oG2iLyqZ5aaB fllfXZmsdhCcWZzORSfvbkRJiwK+MyaIBAh5SALO/97D/JjRNi/es1Yki0bLH9oarz0M stouJMkGwu8gnNWF14qvmSi3JJbUgd51iTK4V5XifHkCx26douZN4TLtfzHkK3Oe8n57 JoYntRGky4DYl/KBqf1qltGD4YyrOfx8AhXYgVNn9KiIzc6K12WpXySu9ffml6JFX1pC e3Es2rfPW1CtqDexu3BamFq9JzF9MQsZHyEwRi4vXtmbKsiED3hNGu7NUMVFOyQIfMh4 NyjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=P4l1FsyAk1RlV/u3mgwVdI7BUjKPUw4KOmo6ae9MZqQ=; b=Y4/SzcxObYJ0lo/PjXhpU8yp1vI9p0Quy07L6W2PgJ8hdoC49j8/jva6+Y25KwAGSm HA3QQugiWwXnzuHT0+XkFqY/C7786ck8nUxS+aBau2chUKzhES6XJ9MZWgzic1xK8wQZ C4M8LNy2KZmRNMHjTOcwdFQ5eMqk0chMsZmJBwISJX7TpwcWSu8qnJl3j3df2AuEzgM7 EuF/nqzyNmpuKff4PBSBJBRcruVgm+C2bEobTn+fdexWLoDP1+qXC4FaMypqyvsGoti5 jOU50Ti6Yt/ome1XpE7aMermHEFzbRk/gO0fzCu3fP9/oSxIACeDULwStVYVkZRq3/nW pUzA== X-Gm-Message-State: AOAM531r+1yS9mcQPDFE8hvuppHjnJqGH+HbbsXvT9OCOtCRYnrVaQiG uLg99vko9xrzhUa+ydlXh46qYeKPRUCYc+88+KI= X-Received: by 2002:a05:6870:d683:b0:de:eaa2:3550 with SMTP id z3-20020a056870d68300b000deeaa23550mr3136696oap.253.1654184660350; Thu, 02 Jun 2022 08:44:20 -0700 (PDT) MIME-Version: 1.0 References: <202205271546.oV14N2r8-lkp@intel.com> <20220602115046.GH2168@kadam> <20220602153326.GI2168@kadam> In-Reply-To: <20220602153326.GI2168@kadam> From: Alex Deucher Date: Thu, 2 Jun 2022 11:44:09 -0400 Message-ID: Subject: Re: [kbuild] drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1433 amdgpu_discovery_get_vcn_info() error: buffer overflow 'adev->vcn.vcn_codec_disable_mask' 2 <= 3 To: Dan Carpenter Cc: =?UTF-8?Q?Ernst_Sj=C3=B6strand?= , kbuild-all@lists.01.org, kernel test robot , kbuild@lists.01.org, LKML , amd-gfx list , Alex Deucher Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 2, 2022 at 11:33 AM Dan Carpenter wr= ote: > > On Thu, Jun 02, 2022 at 10:24:58AM -0400, Alex Deucher wrote: > > On Thu, Jun 2, 2022 at 7:51 AM Dan Carpenter = wrote: > > > > > > On Thu, Jun 02, 2022 at 08:26:03AM +0200, Ernst Sj=C3=B6strand wrote: > > > > Dan: I also ran Smatch which resulted in the following discussion: > > > > > > > > https://lists.freedesktop.org/archives/amd-gfx/2022-May/079228.html > > > > > > Since the bounds check is dead code which does not make sense and is = not > > > required, another idea would be to just delete it. > > > > It wouldn't be dead code if AMDGPU_MAX_VCN_INSTANCES ever increased. > > Or we could add a comment to the code I suppose. > > /* Impossible in 2022 but this check might sense in the future */ Good idea. I'll send out a patch. Thanks, Alex > > regards, > dan carpenter >