Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp762294iog; Fri, 24 Jun 2022 13:35:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tZGaad8sc0F9tACmjSbzIbmDzPJn/huvh6joqJjRF1JPe1NEQqNLplWUfUfzbXul+hHi4+ X-Received: by 2002:a17:90b:380c:b0:1ed:2071:e6b with SMTP id mq12-20020a17090b380c00b001ed20710e6bmr792672pjb.82.1656102952236; Fri, 24 Jun 2022 13:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656102952; cv=none; d=google.com; s=arc-20160816; b=hLlhnUbjQKD/JJ3qU+VfAzGD25GGXjpMii9r4IEUBEXQeGk9dOf/F5126BiAfoS3ph yx5EB7sF0u9j512ucZxyYrnzcRqFeNzIMVPCpOYcR+WtPJwJeht4EfaZDxYdBAOwOoy8 qxrbYowQX+5/hJXZkIXT2mZB4BnrVA/Iy6kiwakdmVoErb6g02Y8xhFOZEukXz3SaHxv 4BctLD/eHTSDbhSOk4J2UGeKw6/8v4ztAkz58sACO6rW7/cI39BS0GOv8LmYTwrTPiHE DAGBj3CJQD+o/C+jMhh27suEpU/BAxkPokjAGorpQZw85y2G5t6dX3jq+k9BfSN1Uh7q WIsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=ZDlqgf14zeOe/H6KdqMqyUaKiEwdFOQWmVC6blo0CJY=; b=zU8dH5WAUfWmNeefnUg5+/HZ66OWfSd/bfwuGiJ2pBZcfNMfk0z7pGEYFeNQGrNSy9 HOCNqx/iEm05axoDcayrMWb0NDoSd1pFoKrL/ET1DzewU0d2+4gSfsyhpNey4zKAxGBJ anx0Eolu6ckkKhhQ41YpRjY07mTRSHwPkAMeavFTP82BxtmBQIWl+pvLcHHhqTuhY4mr JWMbnUXaPLM1jIUAAl/z/fLni0Q5UPjcQ23YZ1Go2lGPDGytwMa3gGtm0/CDjSfhSIm1 V/nC2O+spT6I0QsuUYNzsqRcX1ZJDDkESIjLKbQR6E3QfBndWZC0SIgxwyEm6lnAU/hj 2DYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=dWEF+ZHz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a63220f000000b0040d3bf56b3dsi3845353pgi.816.2022.06.24.13.35.39; Fri, 24 Jun 2022 13:35:52 -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=@ffwll.ch header.s=google header.b=dWEF+ZHz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229719AbiFXUNi (ORCPT + 99 others); Fri, 24 Jun 2022 16:13:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbiFXUNe (ORCPT ); Fri, 24 Jun 2022 16:13:34 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C425D56C1C for ; Fri, 24 Jun 2022 13:13:32 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id sb34so6802156ejc.11 for ; Fri, 24 Jun 2022 13:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ZDlqgf14zeOe/H6KdqMqyUaKiEwdFOQWmVC6blo0CJY=; b=dWEF+ZHzCmMX3vcid8rxsyHe6NbxfY6excwXrVhOubtLlgnEWZT/dpXietutVee1Fj 2f/uIx02gGRTvTkl8pSE5tlyzd5bJEJoaLMuorMexDf/awqadeFajEtUxRRT+F12z6hU GLx17PMC/lwy7o+XF53FIg5bKhHEwWQ+j6LZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=ZDlqgf14zeOe/H6KdqMqyUaKiEwdFOQWmVC6blo0CJY=; b=cYEf0ETo8i9brIluJXgi1nCxxY2ixvsHdPKtUOb8YP7XvsARR853B7MfO2Emek0XbG IgWAmwNkvMlk90eB7DUcDE30axy36BiOnUudeEu0DO3QhrRE6lbHTzrvE8pmF6vf7wcq QGrnsM7mcs0yzV7LDNtX3Bb9br5Gm+q09MKxWKzYu/OQ257+xgBuqoWyufVMMec8bsf2 S42PSZkpvPEvu95Aq8vVSj6qOXgyEVhCxkeeYtkjyXcCIGH0YQNZOQ+G7gxF0Bcum68+ fd1nggOEPn2oFpsxLaJIJ/HjN+j5sn04cvGpytHx6Urs6vmCZubMW2HH4/4XA7U8GIh2 nJWQ== X-Gm-Message-State: AJIora8wIN5KCLlvcwkltbHLQOlWDD5rWf/dPe7eqxD9lipLH2GKeSd4 BXnMrqRL7GweIh67Mqot8hwdMQ== X-Received: by 2002:a17:907:1694:b0:716:14a4:fba with SMTP id hc20-20020a170907169400b0071614a40fbamr791128ejc.290.1656101611140; Fri, 24 Jun 2022 13:13:31 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id bg6-20020a170906a04600b00722e31fcf42sm1622964ejb.184.2022.06.24.13.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 13:13:30 -0700 (PDT) Date: Fri, 24 Jun 2022 22:13:28 +0200 From: Daniel Vetter To: Randy Dunlap Cc: Borislav Petkov , LKML , David Airlie , Alex Deucher , dri-devel@lists.freedesktop.org Subject: Re: [PATCH 04/11] drm/r128: Fix undefined behavior due to shift overflowing the constant Message-ID: Mail-Followup-To: Randy Dunlap , Borislav Petkov , LKML , David Airlie , Alex Deucher , dri-devel@lists.freedesktop.org References: <20220405151517.29753-1-bp@alien8.de> <20220405151517.29753-5-bp@alien8.de> <04ff7802-c87a-2ea2-156e-c437446bc072@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux phenom 5.10.0-8-amd64 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,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 16, 2022 at 09:06:45AM -0700, Randy Dunlap wrote: > > > On 5/19/22 06:05, Daniel Vetter wrote: > > On Mon, Apr 25, 2022 at 11:46:53AM -0700, Randy Dunlap wrote: > >> > >> > >> On 4/5/22 08:15, Borislav Petkov wrote: > >>> From: Borislav Petkov > >>> > >>> Fix: > >>> > >>> drivers/gpu/drm/r128/r128_cce.c: In function ‘r128_do_init_cce’: > >>> drivers/gpu/drm/r128/r128_cce.c:417:2: error: case label does not reduce to an integer constant > >>> case R128_PM4_64BM_64VCBM_64INDBM: > >>> ^~~~ > >>> drivers/gpu/drm/r128/r128_cce.c:418:2: error: case label does not reduce to an integer constant > >>> case R128_PM4_64PIO_64VCPIO_64INDPIO: > >>> ^~~~ > >>> > >>> See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory > >>> details as to why it triggers with older gccs only. > >>> > >>> Signed-off-by: Borislav Petkov > >>> Cc: David Airlie > >>> Cc: Daniel Vetter > >>> Cc: Alex Deucher > >>> Cc: dri-devel@lists.freedesktop.org > >> > >> Reviewed-by: Randy Dunlap > > > > Pushed to drm-misc-next, thanks for patch&review. > > -Daniel > > > > Hi, > > Will this be merged to mainline any time soonish? It missed the merge window by a hair, so it's in linux-next and will get into the next one. -Daniel > > thanks. > > >> > >> Thanks. > >> > >>> --- > >>> drivers/gpu/drm/r128/r128_drv.h | 4 ++-- > >>> 1 file changed, 2 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h > >>> index 2e1bc01aa5c9..970e192b0d51 100644 > >>> --- a/drivers/gpu/drm/r128/r128_drv.h > >>> +++ b/drivers/gpu/drm/r128/r128_drv.h > >>> @@ -300,8 +300,8 @@ extern long r128_compat_ioctl(struct file *filp, unsigned int cmd, > >>> # define R128_PM4_64PIO_128INDBM (5 << 28) > >>> # define R128_PM4_64BM_128INDBM (6 << 28) > >>> # define R128_PM4_64PIO_64VCBM_64INDBM (7 << 28) > >>> -# define R128_PM4_64BM_64VCBM_64INDBM (8 << 28) > >>> -# define R128_PM4_64PIO_64VCPIO_64INDPIO (15 << 28) > >>> +# define R128_PM4_64BM_64VCBM_64INDBM (8U << 28) > >>> +# define R128_PM4_64PIO_64VCPIO_64INDPIO (15U << 28) > >>> # define R128_PM4_BUFFER_CNTL_NOUPDATE (1 << 27) > >>> > >>> #define R128_PM4_BUFFER_WM_CNTL 0x0708 > >> > >> -- > >> ~Randy > > > > -- > ~Randy -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch