Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1066122imm; Wed, 4 Jul 2018 10:52:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdETygZq7XhwH6C4Cdv84s8lsD78+4tKGrls+5eukWSNzmd46bopvHaw+Q5am+OhbOlDSHq X-Received: by 2002:a17:902:a716:: with SMTP id w22-v6mr2987009plq.271.1530726736039; Wed, 04 Jul 2018 10:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530726736; cv=none; d=google.com; s=arc-20160816; b=ZPGJz5x68ijyGHxKLhhKAi4pzSHH7B2PLQJbFFOOUztHLHkzMomOx03vU8sEQYfvpk rWC4pfMwDEs4C8lIT4Msx+cPgulGbdao0uIDJ6VfkQSyf4CHIy9bxmjhgjxE3zdQCmg6 C2xnUSU3i8EqAI8u5e+vagbeZU95RehV0qDV5Euhp06j0mU0gmwXTiSfsZ5KeM75uLNZ xoQmm9EwxbKVAjPsqnspATvgfLFNDZdboPQsd9l74oCoOzTRHHSu+wNR6MZibG8YimGo PmG6Q8YAQ55B4gJfhc4569dfhqhLC9yXf0DuoFsEQ7flaj3dQY5kFr4GElkrlklt2iGf bCPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt :openpgp:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=0+qV0mCeWd1aJOurjE0oKNx+4udqVdOZBM794jw2f3s=; b=Wv2iaQMz29xi4V8oQ/rePneVz9Yxiw4hi0LnBU9K4Ke6baLK4X5UZ5pNp8vhwMmKIJ Pb8afFHOcnBcS74KvIccr+Ml3P7QhCg3WHq4fm8N8W+piyP/zLdpjRvuBhqh9ucjgq1J KVJOPhCf9j9/zV1oBSKo30Ng/LOUVGjYfucWU2PyRZvdwP7/rbMtiQ0MX7BrSGHRbvkE d9Z2UMJaiS+61gUfEoiV185cI+1M3ZgCkUMl3FoK6ePRleTVjM0tRKbhOcaoy9kARPX/ IbX9qvE48LHLAid0knWP/6v7rQa4fwmqIgO1y1TzZbVJfG2VatyWnMrOqhf2ZeI8M+2q miow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=vozKDyty; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 128-v6si3977141pge.444.2018.07.04.10.52.01; Wed, 04 Jul 2018 10:52:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=vozKDyty; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752578AbeGDRvS (ORCPT + 99 others); Wed, 4 Jul 2018 13:51:18 -0400 Received: from mail-by2nam03on0071.outbound.protection.outlook.com ([104.47.42.71]:22042 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752251AbeGDRvQ (ORCPT ); Wed, 4 Jul 2018 13:51:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0+qV0mCeWd1aJOurjE0oKNx+4udqVdOZBM794jw2f3s=; b=vozKDytyZ3P8hG4qdBMQu6ly6gQk6MqwMYj/ShLxSWk6aiL9nlpkJ2OKnWNaLPCZx0YfDh7aTVwJhwMvRryjZfRu12UOfQeMO0yQyVQCjqskJhkP51B4Xh9gocO6CIGdag0IAbFNRmJqnbe8lbXI8Rhes3v2WjhDKk6UJviyaMg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Harry.Wentland@amd.com; Received: from [172.29.157.77] (165.204.55.250) by DM2PR12MB0187.namprd12.prod.outlook.com (2a01:111:e400:50ce::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Wed, 4 Jul 2018 17:51:13 +0000 Subject: Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows To: =?UTF-8?Q?Michel_D=c3=a4nzer?= , "Gustavo A. R. Silva" , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "David (ChunMing) Zhou" , David Airlie Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20180704011305.GA15742@embeddedor.com> From: Harry Wentland Openpgp: preference=signencrypt Autocrypt: addr=harry.wentland@amd.com; prefer-encrypt=mutual; keydata= xsBNBFhb4C8BCADhHHUNoBQ7K7LupCP0FsUb443Vuqq+dH0uo4A3lnPkMF6FJmGcJ9Sbx1C6 cd4PbVAaTFZUEmjqfpm+wCRBe11eF55hW3GJ273wvfH69Q/zmAxwO8yk+i5ZWWl8Hns5h69K D9QURHLpXxrcwnfHFah0DwV23TrD1KGB7vowCZyJOw93U/GzAlXKESy0FM7ZOYIJH83X7qhh Q9KX94iTEYTeH86Wy8hwHtqM6ySviwEz0g+UegpG8ebbz0w3b5QmdKCAg+eZTmBekP5o77YE BKqR+Miiwo9+tzm2N5GiF9HDeI2pVe/egOLa5UcmsgdF4Y5FKoMnBbAHNaA6Fev8PHlNABEB AAHNJ0hhcnJ5IFdlbnRsYW5kIDxoYXJyeS53ZW50bGFuZEBhbWQ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kDmsgS+nibqSvWXfo1v231 410h35CjbYDlYQO7Z1YD7asqbaOnF0As+rckyRMweQ9CxZn5+YBijtPJA3x5ldbCfQ9rWiTu XQ== Message-ID: <421747e5-e6e0-6680-e3b7-a3a2a5b7b307@amd.com> Date: Wed, 4 Jul 2018 13:51:08 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [165.204.55.250] X-ClientProxiedBy: YTXPR0101CA0046.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:1::23) To DM2PR12MB0187.namprd12.prod.outlook.com (2a01:111:e400:50ce::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ccafee79-0e7b-4c42-3fb5-08d5e1d6bc75 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:DM2PR12MB0187; X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0187;3:OD1mSZMt5j8/xIudUbTkIFcYZ249CRFRo4AraksL9UVQ6O55+5KewZZbImAobglqSJpDc8Q+xcp7kFfUbogOOVwsoeJAPDwwjeVS7McADvKHrPdafQlluNJF30JeuQhlPF5056TEe7UBqGwWaeX7pjAMK/Rq07Y5WVoZWHJ71dxra4IFu/k/WU3QQUGB7p2lMyuq7L8XTBTExiDwdhzM3bKPG10wNLpAlEQEnCAC85CqsVAH6HU/NUCTIpbVtMM8;25:G2UpFftXRML6hzQoG5t7g1+ivYGwe7wBli1iK4BT/wMogGAzLqEdpjUlLiLPCR8kvnLHhV64BFkw4J0fSs89cSeFg2Jbs4/MMfCAhW35APdt2nUk1I4oZul8AiVKatHN+XonRcODFYsa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vQ4VaPg0TPUaZocdYPfz/Rhcrl0i1xot+aoL8uKm7zBw/RHVvnyCEN/AvWPo+rOkwwYK8/63e4mbjhTdrsQXHuYHkKfO1n1umgG//6lefO38lP+eh0kspIHsmiDyIAgglXdeG6V1s7U/44dk7sZmNUvYO4l+ay5RwmgKjML0bBhxXXHmxrMwD+Q/pmZH2dl8GpVyhIX60AwNfjbfJ9h9wOstU9XnUSkGhQ7tGUYLFWOilZ/F0O/tlB5fkYE+4yDi8T89IjzsBj X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DM2PR12MB0187;BCL:0;PCL:0;RULEID:;SRVR:DM2PR12MB0187; X-Forefront-PRVS: 0723A02764 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(136003)(396003)(376002)(346002)(39860400002)(366004)(199004)(189003)(7736002)(2486003)(65956001)(65806001)(6116002)(47776003)(2870700001)(50466002)(25786009)(2906002)(64126003)(14444005)(86362001)(4326008)(66066001)(31696002)(110136005)(72206003)(31686004)(16576012)(6486002)(229853002)(3846002)(97736004)(478600001)(58126008)(316002)(68736007)(53936002)(81166006)(81156014)(6246003)(26005)(6666003)(53546011)(16526019)(77096007)(956004)(186003)(486006)(11346002)(476003)(76176011)(8676002)(446003)(386003)(8936002)(44832011)(2616005)(305945005)(52116002)(52146003)(106356001)(36756003)(23676004)(65826007)(5660300001)(105586002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR12MB0187;H:[172.29.157.77];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjEyTUIwMTg3OzIzOkFwOVBSN045Ky9HUnpuYlFUUG9OMjNqWlpG?= =?utf-8?B?WUdVbDZWTTVscEZsU2p6SU1HT2orN3ZWc1cvV3dMODNwaFZTNnUrSGpuS0ph?= =?utf-8?B?TkFIdEl4Z002U254MzM0RTBWYnRLeVc4UGFQOGwzbm8zMEdPb0JjbjJQenIv?= =?utf-8?B?VXU1MTZYOFo5Rm1vOG5jU0hMbG9QLzhtb2pvYUhaSEc0WUdSREdWSzhoNlRx?= =?utf-8?B?QjdBdmNNbkJqU3dlbDlDSTBNUmtJa1QrWTJpTzRRd1NXeWl0QzhtMnkxV0Zh?= =?utf-8?B?VFJSb1VBRVNOSnVQSnJHRE00YTczQkpyNjBGdFpIaTNBL0w2QlNNNjRQaVky?= =?utf-8?B?TDh0WkpGT3RxZ3RzOFNVQmE3TlJ1OXlMeFVmY1Z0UkJoMm9kZjREbG9mKy92?= =?utf-8?B?SGRGVXFIYzU1eUltN2t3N3UvMDVPZit0cldOdnRqenlLVzVySzFxVTlKdWlq?= =?utf-8?B?TVNaQm9QdDNEaDdQTnVGOUZvOSt3WmhxMXBMZE85Ri9GdU5YWkNTN3g2cmN1?= =?utf-8?B?QzFSZm5uR0Z4TXB3aXJXUDlJVG9NM0NyaytENUZaVHd2cDFJdmNTRkRMSmJD?= =?utf-8?B?Si9YQVhJZTlzdXFaa1lXRWUzOUhVTSt1dm1Hb3RzdG9ZL3BzMVZlcWJHREFk?= =?utf-8?B?S1JNZElaVzJpb0dxLzNiMXpNWXdkQ1B2c0N3QWhJaG9TaGY4QXhMdHl4SlVj?= =?utf-8?B?ay9CR2pZM0hGTS9NUER3UEY1RHAyVEt2M3EzTk0xNUNPUHVDdEtVNTlsZ1VT?= =?utf-8?B?WWRXOHg4UVF5YWs2WGhjTE5FRjFBOFVCR0VOcH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ginalArrivalTime: 04 Jul 2018 17:51:13.2956 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ccafee79-0e7b-4c42-3fb5-08d5e1d6bc75 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0187 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-07-04 03:38 AM, Michel Dänzer wrote: > On 2018-07-04 03:13 AM, Gustavo A. R. Silva wrote: >> Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and >> feedback_divider to uint64_t in order to avoid multiple potential integer >> overflows and give the compiler complete information about the proper >> arithmetic to use. >> >> Notice that such constant and variables are used in contexts that >> expect expressions of type uint64_t (64 bits, unsigned). The current >> casts to uint64_t effectively apply to each expression as a whole, >> but they do not prevent them from being evaluated using 32-bit >> arithmetic instead of 64-bit arithmetic. >> >> Also, once the expressions are properly evaluated using 64-bit >> arithmentic, there is no need for the parentheses that enclose >> them. >> >> Addresses-Coverity-ID: 1460245 ("Unintentional integer overflow") >> Addresses-Coverity-ID: 1460286 ("Unintentional integer overflow") >> Addresses-Coverity-ID: 1460401 ("Unintentional integer overflow") >> Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") >> Signed-off-by: Gustavo A. R. Silva >> >> [...] >> >> @@ -145,8 +145,8 @@ static bool calculate_fb_and_fractional_fb_divider( >> * of fractional feedback decimal point and the fractional FB Divider precision >> * is 2 then the equation becomes (ullfeedbackDivider + 5*100) / (10*100))*/ >> >> - feedback_divider += (uint64_t) >> - (5 * calc_pll_cs->fract_fb_divider_precision_factor); >> + feedback_divider += 5UL * >> + calc_pll_cs->fract_fb_divider_precision_factor; > > This should be 5ULL, as the commit log says, otherwise it's still only > 32 bits on 32-bit platforms. > Agreed. Otherwise this looks good. With that fixed this patch is Reviewed-by: Harry Wentland Harry >