Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1588871iog; Thu, 16 Jun 2022 09:20:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uonDHzapdOkEvAC+9tvWAoUU2djxRWyPOWFbbBZOXI34zacnzF9jY84gRzp/6iJt9Lg20L X-Received: by 2002:a17:906:a57:b0:718:bd7e:e45b with SMTP id x23-20020a1709060a5700b00718bd7ee45bmr5172865ejf.204.1655396440966; Thu, 16 Jun 2022 09:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655396440; cv=none; d=google.com; s=arc-20160816; b=FBn9kerGEFnJku6ZbTaz8GyR/a2Xvo3WkKFNXFtoMbqrtSieO77n0B4Ln8vXa7WkJr V+KYeNjZHg+prwB4/fMYOTY3IjFLfPDVOi5mGY8KNMmrDsE4u8N006KU3W5ckrayeiEp 1UYbeo8qzqjKF9uCkwt9bGwmIZRJ2CBfBZAprfl/IWJJLVYo3OU0DcKSvJHM993td+ge O58SHLsHzsE4jTmFDI1Y+4CoiQImaruq0tozqCmkRWdYQV/bVg0R6xyALng0CAKqYY9C qP+39sWmN94HCQEG0Q1MKSCF5sveaLLYSddjHwQQW/Eefxz591PKMmtOP0sw7ViplNRP UfKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=5MkuctBul9IJAIVhV0CXjLIPtRaSpCdpARIBoblY/Jw=; b=JHy6vCYE16bJMi5pev/1q0B5rpj3G02gJZL+sI2UQ1Wa+DCHBS23BOQlfWq1upW73K syvSFpP8+pwlu+4wgssnluBLnKMEb8WQ74Ps0DtXwXRRGwTIRAfVOtwJYRhMHEngvQPo A86uxpiweyuaxCc1Cke+RL2LzLcPP4Zfe/B6peWXvIApuSnHm/5uLiibnwHIhtq53yU+ /nsv7PbBTPk85+XRSZqMoaKz3tXsGrzscdgo926Au4pillxy8JHNTNiRMQahjeF6QIxW IcSbDNX59qWfEPN6XaNfNsA1DmOoi81ahocu4/bP5FfDMoIfgycmKQ1eYs3fBjFk7Rmo afMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=rDJSc0v6; 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 i20-20020aa7dd14000000b0042aabf64903si2762763edv.80.2022.06.16.09.20.15; Thu, 16 Jun 2022 09:20:40 -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=@infradead.org header.s=desiato.20200630 header.b=rDJSc0v6; 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 S1377410AbiFPQG7 (ORCPT + 99 others); Thu, 16 Jun 2022 12:06:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230491AbiFPQG6 (ORCPT ); Thu, 16 Jun 2022 12:06:58 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 917CB45ADB for ; Thu, 16 Jun 2022 09:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=5MkuctBul9IJAIVhV0CXjLIPtRaSpCdpARIBoblY/Jw=; b=rDJSc0v6Ad7ykTmboi4XAAGG6s X9HDnVNLD4ahnoA5xIC1oj687UkhuISwDbKk6zpWBpiZxbfTj5VpCzEnEi8sM7fTDBJwEOABDBFK+ iCGhC+QTvW/OtvMJqQ5XE67gR5w6uKSfIBnvU7vQAaUMblnYdarjpFnffWa4pbuVTx+Vpsg3xrDBh ZeesZ5jcACMCFBZZ6VM9kizF6ZOr42+REZOKmeCuA2fhvBo/ZurLDBWH+6hrqFk/ZgnHwPd/eqt64 PiXhArYcuMEtyj+cvO5ntwyjtX8Y5nMMi5cRTePR7Bq2/mR9XqPt8KDMcfwYRja2/t04VbYxQoE5a wcbvSLaQ==; Received: from [2601:1c0:6280:3f0::aa0b] by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1s1A-008S5Z-Lh; Thu, 16 Jun 2022 16:06:49 +0000 Message-ID: Date: Thu, 16 Jun 2022 09:06:45 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 04/11] drm/r128: Fix undefined behavior due to shift overflowing the constant Content-Language: en-US To: 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> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 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? 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