Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2150642rwr; Fri, 28 Apr 2023 06:52:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7lI1dxeXTL7EFEhpZdsI4xhaKmx2jpK2N6X4AoPjjknKtCvEK8buGWDhrpzHf0G0N/odr7 X-Received: by 2002:a17:90a:c406:b0:23d:1b50:1ebe with SMTP id i6-20020a17090ac40600b0023d1b501ebemr5503591pjt.27.1682689962833; Fri, 28 Apr 2023 06:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682689962; cv=none; d=google.com; s=arc-20160816; b=jSIkLp0wEDMDJvvDF2rWoNbFNmUAicBR7ltXd3i85yEHzgjy5fhlvyRoV7M0qvBbHt wVYZK9+Km8YbY5jC5XPNUonx4twP+oTFc279brbv/vI1SLi6Gm0EWBQbn4eaMzK5NxYS khofzdHIrAwXvN2OUyB3P5Ln82isU5PyBoJ1tCe8sI8u7FOlhZyjFHgyxumemxV1MhB7 +UMUNTZvGWVae4z/H9GiTP2rcRv6GcubFNzJQ55WsNUnrauE/J/RTocgJsReIfITut1Q 5o7Umo9gwuL7gNPUsRuj72zyWd155bQBufMxcbVTOee/0ntPBI6f6Err+/NqXvXdgAMQ Dzyw== 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=kjkfMeDN5MElQoz8pTsP+XGTEHdi6FRFZYxvJHVi3ac=; b=FIJ4IlzwvKFI7YkFcXLcTDIOXdg6jQzAsff5mUMoPXsIWCxnuYzzlywCHExnnVWLI0 u7rb/4kGTQjuNeBdPKddkIhL0NSh9cc1CXzmZjt8BDRU7gK+GpPH3I4Emz57/5JubltJ jXPnBlDIDnMs/GPPLcgG9zrWvp0fwKxqZnni6WJbW/C7pLkhCw2SS3t9Whntsmio9dqc VnBkXR010lGeS/Kpk+xhb5zjEXUg5LlB1q98dtsUZQwyUlmAjJm+ziS/PcBZKxq+g/zc JgNr0R0wxU0q6PlDkE8z1cNUajRbRfRpu7lNw8wPMhEDhdFGAJmAnX32DMvtYM0j6S1p gIug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=FDeDMqBw; 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 ck13-20020a17090afe0d00b00246973aef88si17205083pjb.29.2023.04.28.06.52.27; Fri, 28 Apr 2023 06:52:42 -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=20221208 header.b=FDeDMqBw; 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 S1346293AbjD1Nbr (ORCPT + 99 others); Fri, 28 Apr 2023 09:31:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346198AbjD1Nbq (ORCPT ); Fri, 28 Apr 2023 09:31:46 -0400 Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E29D93A9D; Fri, 28 Apr 2023 06:31:44 -0700 (PDT) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-187fc21f6acso3773040fac.2; Fri, 28 Apr 2023 06:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682688704; x=1685280704; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kjkfMeDN5MElQoz8pTsP+XGTEHdi6FRFZYxvJHVi3ac=; b=FDeDMqBwExbEym6j6TOk37nY9oI4HncB9PyjAK3xsu85s//1YumEwNM6XHMpBiJaTl LIcOQoKJF3duQpQ4fi3MUuNe95JzAdbMC+jaDaenqC9vQQ1PkPeCQDxUORlr4jph7+mF aeh4W4qQGGJCNLbzlh8+cRDwOptfjIM4q4M1u5OCET/NL/eBuHsz2HgpROszr0KEGVox XSGj4sSLwyz5aSOVxxH6xSfd0oTKHk67mW+/DdbNEIUn2vRkkBoWq+38UrBLH0AHIwhl qxH1tfTR+iPiFkm6BnPOWuyjX76DWygTZTpasvFWXmgnhAxOU2daWz5NAHvLmcPA197T 7mYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682688704; x=1685280704; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kjkfMeDN5MElQoz8pTsP+XGTEHdi6FRFZYxvJHVi3ac=; b=FIsp3IAgXUNT7YzTr8zbyHHZ5gapV63+XoqvtKQuvWSTo3VVacFtUchfDCOgRfVr/A a+9Zb/iXf0FJiQstawi7vs5pZbcGv2o6DlHrKcC02ZrNfGYBmNN9qPDgolxll6dOcqZ1 Yh7QeZWkSlOLRjFCC/lt0Wa7qy4gkb7KFCe1zdlR48fX31EkJTdNao+SHUEvRdkFgcO8 ICxOVaLqijyIya4tlxWj92FDhNHAYg6zXjhTkZ0XgG39O+40Eaq0UI76U12iTOnM9waf GsXerFeFDRUvCYicCPcUx8qDf5GxerjwxRUE6mLQ7Ds4pBNbe+D60bgITQglv2HtlX6K nq4g== X-Gm-Message-State: AC+VfDwHNkN6KCiJPaO3eZNsPnCFz0oH1uJEx/JLfxGAO8DVSuUeaHII 3xhEV5QVb7ECi1HJx5vxfJBGQsr+J+xW+LuK4DI= X-Received: by 2002:a05:6870:51d5:b0:18e:ae84:7d87 with SMTP id b21-20020a05687051d500b0018eae847d87mr2369255oaj.53.1682688704128; Fri, 28 Apr 2023 06:31:44 -0700 (PDT) MIME-Version: 1.0 References: <20230419122233.3440-1-hackyzh002@gmail.com> In-Reply-To: From: Alex Deucher Date: Fri, 28 Apr 2023 09:31:33 -0400 Message-ID: Subject: Re: [PATCH v3 2/2] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1 To: whitehat002 whitehat002 Cc: alexander.deucher@amd.com, Xinhui.Pan@amd.com, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, sumit.semwal@linaro.org, linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, airlied@gmail.com, christian.koenig@amd.com, linux-media@vger.kernel.org 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, URIBL_BLOCKED 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 these? https://patchwork.freedesktop.org/series/116699/ https://patchwork.freedesktop.org/series/116695/ On Thu, Apr 27, 2023 at 8:45=E2=80=AFPM whitehat002 whitehat002 wrote: > > Alex,I have a question, why I don't see it on the > https://patchwork.freedesktop.org/ > > Alex Deucher =E4=BA=8E2023=E5=B9=B44=E6=9C=8827= =E6=97=A5=E5=91=A8=E5=9B=9B 20:40=E5=86=99=E9=81=93=EF=BC=9A > > > > As per my prior reply, it has been applied. > > > > Thanks, > > > > Alex > > > > On Thu, Apr 27, 2023 at 8:39=E2=80=AFAM whitehat002 whitehat002 > > wrote: > > > > > > hello > > > What is the current status of this patch, has it been applied? > > > > > > > > > hackyzh002 =E4=BA=8E2023=E5=B9=B44=E6=9C=8819= =E6=97=A5=E5=91=A8=E4=B8=89 20:23=E5=86=99=E9=81=93=EF=BC=9A > > > > > > > > The type of size is unsigned int, if size is 0x40000000, there will > > > > be an integer overflow, size will be zero after size *=3D sizeof(ui= nt32_t), > > > > will cause uninitialized memory to be referenced later. > > > > > > > > Signed-off-by: hackyzh002 > > > > --- > > > > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/d= rm/amd/amdgpu/amdgpu_cs.c > > > > index 08eced097..89bcacc65 100644 > > > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > > > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > > > > @@ -192,7 +192,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_par= ser *p, > > > > uint64_t *chunk_array_user; > > > > uint64_t *chunk_array; > > > > uint32_t uf_offset =3D 0; > > > > - unsigned int size; > > > > + size_t size; > > > > int ret; > > > > int i; > > > > > > > > -- > > > > 2.34.1 > > > >