Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbdHAOx0 (ORCPT ); Tue, 1 Aug 2017 10:53:26 -0400 Received: from mail-by2nam01on0076.outbound.protection.outlook.com ([104.47.34.76]:17088 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751295AbdHAOxW (ORCPT ); Tue, 1 Aug 2017 10:53:22 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Subject: Re: [PATCH] crypto: ccp - avoid uninitialized variable warning To: Arnd Bergmann , "Lendacky, Thomas" , Herbert Xu , "David S. Miller" References: <20170731204936.1511542-1-arnd@arndb.de> Cc: "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Gary R Hook Message-ID: Date: Tue, 1 Aug 2017 09:52:38 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170731204936.1511542-1-arnd@arndb.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR04CA0042.namprd04.prod.outlook.com (10.172.133.28) To DM5PR12MB1323.namprd12.prod.outlook.com (10.168.238.10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f0c2525-abf4-42ec-fa8d-08d4d8ed0ca8 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM5PR12MB1323; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1323;3:nJvudLi2plfgwTrFMXVwuA4B6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vvHaT4cjL3iY/qNP9b47shZNiPfRL87lsYJVYPgLhh7gGNpNW8QoCTClI8C8pTFicTSbP0JwRRcL9rEcEM7VKZe/FBsmfbs7pLXipeSrIt4mGMHmI91iLZJ7b3aYt8RZAFyKm4oRuKCoVXdWsas9dve0jWAPXFvAFyRMTI4l2L1yz6aXFdRMQjCPNNjav89spUQT7F+Z+J7t8sgngJn/caY8DSERIjix3qTXiYO9n+FWqpQcFdHWJD8jy2GqUT/1c3UkA5jqQjlYg31TpIuN+OTtxDME5DvfA2ed51URfnZMTgjKf15fnvo3ZJn1Zlg7+x5NYZLvIXl7mebDemDCGyPj8pr8n9W/M/f/HZxchi/ZR6tkIPWJMcoWwbt7B4iD+8QwE6A0Vzq0Puai4QSquwRzlHfNvc= X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1323;20:A5wREL/e9Ue2TimgdxWWKzQCjpSBdAY5XGpCE1bPdKFFMDsN1ee3zj85rmMwMJRzo0E2Vzd/VcnwzZzeUlrtQxB9euCelpeoIvbZ9GOi8IVlQTMNLNKxka7mtRPsfznVLk+MghIE4dk/JopB4CYCChQkM+/qBBJpTHAyxdt/+Y9KdysOL1F8B6dnEJ4poB1tPqy6qcGZRPsREZYg4h/sCpMrqVbzAz5xhR5ycON9gHwnWJ54x3aptPhj0aVsGjAMiCWaVKxtiKy/M0yEKUnMx0s1URoRGJm/KS0/TkfRgMsuA13FGyOaIGyL7aPtLa5YC0f3j7o5xF9aod2vZ1Wjvs2V/GcYNk7O7mDu3FkXBOad1l1x81P+WaTQ5ptzDPDt9eRfb5jde3529WC2CwNiNtn8kP6ut5ibB0Gou6wSRBA2W6GDJY13lPtBJixrE4k9K6dwrmS2DBV3r6aZwVyAhc3+smXeMBx/UFgkqb+ioIPjClq+dmNpn1sYouj1tKgT X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM5PR12MB1323;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR12MB1323; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DM5PR12MB1323;4:XRzUc5zvuHqw6tx9kibtqKFxKnxftG043bDvzI?= =?Windows-1252?Q?67lnT5Rvy4xIT6Ygq8jwEvmCMH04Llv8eBSEonTIIEovsf1lzI86t3nW?= =?Windows-1252?Q?XT1Uq99h/o5wbILEQ4+m93OnuC886t5k0lbxDoE9RYXbyfbaWf7mvSRB?= =?Windows-1252?Q?Z2Tu1Dc06z7kNHtMbgvNwyEH8cFsm2W7kc7Aus0pB2YsR5QlT7f2ksyv?= =?Windows-1252?Q?E3GfD3iItVChLdPXEWvOSExcDq00T1k0enzC4Nsn3kar4gNc+CMz/QmK?= =?Windows-1252?Q?blq0Ju09jSzZQf6IpTq+GGn8WzuDNXmLdFYSB7k2bLeFXp4yGSY4LD0+?= =?Windows-1252?Q?KRFm5eQ2FlcL2RONif5FRJ7NuAaVxq6Njow1oYpnUBRMgHqDL2EQ8b86?= =?Windows-1252?Q?MjYGP90AM6vnTxY2yzAPcsStkCgvK1xdNN1Vn+8EGY81fQGgQH3e8bb9?= =?Windows-1252?Q?QN4VHrcWxZ1dDwVG1Grv1fVa80R4losDAN6LT/aNseSzpjJI6IB3hPE+?= =?Windows-1252?Q?r8ofHhgt0yv4C47Rrx60DrnADqn3EILGR4KTxqEmEPuNyna9xivgRGhl?= =?Windows-1252?Q?ge/U1jKDEaqlglph6Tuu/XrqtraLtYxlK3qrjNKwXcFS4uCJdfuSkiVQ?= =?Windows-1252?Q?nZIMXT4sKgPSk8vcLINtjAJCDhKRkAMc5R8rHdCqOD+umBtNKCXBMf15?= =?Windows-1252?Q?Bl08/D/Q2gfSpOzKdjNxT6mEhcIsa1G76erkKmzzJkRftsMKK3EBgYWn?= =?Windows-1252?Q?DoJ+vYGhQgueOxPV1080X2Hg5JuGkx0Zr5DhEu3Q1Nt3QPvrdBaeqPdO?= =?Windows-1252?Q?zsCInU5K8+qPpaN2LAnx1cWeVnue6H6t4VTu6T76kAvfWl00fTYJrLmY?= =?Windows-1252?Q?1MuipSYrjPVTxhRiPrCozrZkB1uVnHTBZI9UP9vmsJBOgNAYoPmSDffp?= =?Windows-1252?Q?08iOyKqT66FPo+OiTsToz6xwzYux8+M/2ETh8VbWq5hW4/jYCvVwetMZ?= =?Windows-1252?Q?H4/ECyx5dSesne+FKlxXGnESs+G5wMkr+o0HFl+eHnOnPHldnklMxkgq?= =?Windows-1252?Q?hI5AIIOA+2q7VQwDJA3Lx8wyzAb82DHxc6JP2L8YaVX9dDL8aOgZkaJL?= =?Windows-1252?Q?7Wwi9kV/q3F2OXlgMNaN9BuERgZrOKkU5ePigzdDaXIefkUmnbql+1P6?= =?Windows-1252?Q?TPW81OYer49rQs9oHyE7kdoPPnok2ZEGzSwsfOMHxQKrYCZmV+pf3Jir?= =?Windows-1252?Q?RvBlQL0woWIKQrAw=3D=3D?= X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6049001)(6009001)(39840400002)(39450400003)(39850400002)(39860400002)(39410400002)(39400400002)(189002)(199003)(377454003)(24454002)(86362001)(81156014)(64126003)(4326008)(50466002)(6246003)(53936002)(3846002)(6116002)(23746002)(54906002)(47776003)(478600001)(31686004)(106356001)(105586002)(33646002)(7350300001)(72206003)(66066001)(65956001)(38730400002)(65806001)(189998001)(54356999)(76176999)(50986999)(31696002)(7736002)(6486002)(77096006)(6666003)(90366009)(101416001)(2950100002)(81166006)(229853002)(8676002)(68736007)(42186005)(83506001)(97736004)(25786009)(65826007)(53546010)(4001350100001)(5660300001)(305945005)(36756003)(230700001)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1323;H:[10.236.19.127];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DM5PR12MB1323;23:zVvtcWraj3ozBpqllqcFM/KWYQws9IaQpa2Hl?= =?Windows-1252?Q?1tW/mRWLX0FZ7LkUQRoQB6q9oZ4l1enTOW5ZoCdDd8ia3rGOGng8xYao?= =?Windows-1252?Q?n+B5G39GsIQcxXanC9qZoWTQ7Tpcq/twdql8iy+KKJKriUK/JdNDTBjy?= =?Windows-1252?Q?r7mnhB+3R6xwv9fgA4uQkwlQf3Xu1+lZd1x7MQaWU7jSAkT4xWFX+Ll8?= =?Windows-1252?Q?ylpNUSc+6gkkGqx3XS1W/b34ypO7J68e3+HJc6Vjy5mKRui+PQUlGMCJ?= =?Windows-1252?Q?q9rOX6kCELF+bN/39OlftITf8JqFVp2ovisuLvmzS3kXJcyQ0Ze7LxSg?= =?Windows-1252?Q?ir322VmJPZKJqFit8SvUU4PiNR2eYLj4M6jkymaXr6ORaaEUie4OM+xa?= =?Windows-1252?Q?v361dOSpgsEr4uzpLP4j/1blBKYjxHkT8Bwl6xwALIV5pUkPcjqiEINH?= =?Windows-1252?Q?DP2ssQUGkoPRnrsLy78aC+3s7XFVlNLStgtuv8gQ+4UGExQR1n2CvPpS?= =?Windows-1252?Q?wIs6javoimCYWmbKlrIAX70KrHWGGnRX3G5izwKmoUwj8nrozSR/1/nU?= =?Windows-1252?Q?T7zVkhZNYIY0+9CCdyQDRvRher+5PdJoxuotJ43N1IvF6rR2ToahCyCB?= =?Windows-1252?Q?CSgx7IPTsoWHVi+buQt3OIhJjZIwKacEtfXorQSBSa3w7L7v3Aa8RcXp?= =?Windows-1252?Q?IrzKBGFcM8jdckh6QVu5pDFBdPSzFhwqu/mLDHsy22AWBt1SRr8q7UpS?= =?Windows-1252?Q?BkOHULcOLb+lLwFo/jdY14QUpXRwGIrt8IriBLxx7pqclix8ttfNUkT5?= =?Windows-1252?Q?rpAGdSOCvt+anqs/57CkX6am8CJRpwD2AQKrlNNLGTEofDi92Xv2nFiD?= =?Windows-1252?Q?6bPh257Mv4Q5Yksbr1Xy9A8Ms48+wm38kfsqw71W4wnuwHYaC9PJEH7W?= =?Windows-1252?Q?C/qBS8XwDUhhQO/kn1/AAsaY+bHDL/jYAgS1YJfMHz6wTYHXwjlOlDWW?= =?Windows-1252?Q?gqtBMt93iKmD+Ss77evWdLlESHEYdyY5PeEcY7/6mz3bsEpU3cANwJCP?= =?Windows-1252?Q?XPRQwyV0MGCOf3mlCJxtgJqhmUzbPRU/FLnhl71p3d9DROWLRqbJKVA9?= =?Windows-1252?Q?QpjGHZtiBnhVgE+s8Qs734c3+iM7ubno6xCeP3m0g9dxdZYYdNtRmRvw?= =?Windows-1252?Q?GBxeOstlviBQC5gyHA08CeZjVGTN0IPZtiaxv0C/aukZ63hXwWD5M+aT?= =?Windows-1252?Q?w53wEgJdqDf9s5pBmoQag+D+7yD7k5X0DTBevvzz5HYqsb3PGQaL0r44?= =?Windows-1252?Q?qKg2sGyazgV1uTrfVCwzywFGRA2TPY3gt6KNtlN8nWsYrb5agkFRDAAT?= =?Windows-1252?Q?hkS88p7bU55DVVzQrUaDZcLQwJ8wkVFxpJdBvQaew+ZtgmzFXPWrverx?= =?Windows-1252?Q?At2NmPOLbidjdETGVnqNbo1yVNQx9wiFFU3HWPH7tGsNME+3XLvVlD8H?= =?Windows-1252?Q?PBp6pN05zfjZleorl0PAPRiTyNclcEW6wfwTRWRDmwPwbKr8cScSZCbb?= =?Windows-1252?Q?TIRs3j3+HPWzw77nRl/KJp6L7P6LNhng1stO0gUgVSOU7zq31V8cXjtf?= =?Windows-1252?Q?TnAObWdxPqBSY+Hx8ewS49e2F/NuhzVMgcsfFUp9nS02HpzCji8VjBkE?= =?Windows-1252?Q?pH1s/P//VghVsACmo8/JaUJ0h+ZTLw=3D?= X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DM5PR12MB1323;6:pwhzUVvqsLfWA85ESb0A8+m4diJvvESjk1tPMi?= =?Windows-1252?Q?sEeqDMtCcQIKmg654DVQf9sRL99lpjUoYq4UOkS4qcKK2U4nmRVJO7/J?= =?Windows-1252?Q?tzzf3LUyrannKp0l//Fror3c/1rZxpHuo0QB2BmbfHMvABzaLe6uyTQB?= =?Windows-1252?Q?73Z5pwc9Y+3LjgS31SLtnxkHOnrTWDpxfFctN0sbOXrQGq7Dn8wm4r7V?= =?Windows-1252?Q?eriI5XQFeuIPtzL4Z5yabjuRVgKuUNo1/eXDZdnUxSq2mqjLloXtBmzf?= =?Windows-1252?Q?dbEn99AwCN5zNODtj8xlkw2WGVImCetCbst+ibFMBYw0fcZk7dID48+L?= =?Windows-1252?Q?rk9uQqTwhGg7jbEwM3LTRFT6SZe55GxR3oZRx4Y5Z/emJCdBlL+5aiFu?= =?Windows-1252?Q?MtcP4i1IiCos9y1mXnaK0S90I5lpUU/3PS8VOpKr0H5PnZEskOXUVsJd?= =?Windows-1252?Q?FAhddWB7e2qxE/ZKNqNhe1hOFptTrbORoL1Rkv1wGZ1fZZK+SOziMUp/?= =?Windows-1252?Q?/d+IpsX/0NjqRp4gwc8ZW8+xQX1+BnEDNdq7+6gbpBucozr7ReJXkG0o?= =?Windows-1252?Q?tYpAEfYqiErv7Vl+kmd5zqPUuCYnJGmSAEyXZQ0692BvAsWd/EA+66nB?= =?Windows-1252?Q?LaIoVdoVzCiuDpQ3Dt3SPIKuEr8Q1MJahbQXc4ij6AL+1CB0+fp8E7y9?= =?Windows-1252?Q?jz6gcnJ8DgBMB74MF9Aa84XlrJDd4M3MG/96KSqwNjeAI+/WGTQ4mzgp?= =?Windows-1252?Q?HWdv1hora+nRmz8kSwmwrXikBoK/wjszgV7p+aszH6nMWZbGNkcmzujS?= =?Windows-1252?Q?hLBU2YixFKd5GDqr3olB4S76n232/UAs6eVfWn2fPV17x0SSgFnqFgU6?= =?Windows-1252?Q?yCIknbyYhRLhmnbbV0g036FVWp1gzvXDG/0N2XY4NbD4SzNf2l9sAnhF?= =?Windows-1252?Q?3Ffr8b+Mhs1b84gUKVb8/baCewnVNhIqpIFgACi+GjDiDP59xe2xHGrW?= =?Windows-1252?Q?3bvwfRxgc7BHGakmqvR9r2MJQ6FCm0QZTWCwK+dWJe62m+yy3gVZil4b?= =?Windows-1252?Q?k3rg2L/6dG6Ih7narf5OrVh3OYhHTJElUi?= X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1323;5:CO8nVW3avyvjnx9G2TV3ALPbYcVmYsmjjJLIXXQbUu6jq+Eay6qKzpKyUAbRtebsPhCBgGVN6zImtbJKbMTuiGmIzDUgAxSFXSsW1vVKGtFDd2v9DZwTBSf9vncommlfzq6CbpcifbMLulLCdO8hMf/06kB/UWESucgg6e9QAFs39P+Je6Ry12XGSXp7DNxNGF1NG+BpNqdDTisK1/hrmB6Q0i8mpzmnrCE0ZDqb/T3g4+vjC16nQSrd0NllBmcRw0z98bDKFc/6Nt9r/I1KQluVFaj8kefCIW++xVI+KSqUHg3z2pNU13qtdyekEEb8dmWzrSIj02LoGZHcaUNcdm4xpICXT+/gImH17ybkP5rzF1RWo7VIa22Mud5juG+inwwf32QBxZcPB5vZi5WfL6eCBW7i7kEtv3vEngDriFzrMkku6ygDwU0Uj7CZTRN1bP62B6DHSagnQlaljTCbZuvyToUEl4jXUoynWlOamS44BVD47J0/xVABEAt79XSp;24:CIF0IEwmQvgu2LktpHX7s41pvpJXHOQeUqlcvbGDdqX42Ro+h3TSxq/P+ZAh8D/aguD+OVRkN7iLyJmOBFvEO1LlptyDM/jzhJpPIl6FLNY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5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O7RYHbcMStg5dGi20LYujcsiv9S4UFrpalq X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2017 14:53:19.0457 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1323 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3376 Lines: 90 On 07/31/2017 03:49 PM, Arnd Bergmann wrote: > The added support for version 5 CCPs introduced a false-positive > warning in the RSA implementation: > > drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd': > drivers/crypto/ccp/ccp-ops.c:1856:3: error: 'sb_count' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > This changes the code in a way that should make it easier for > the compiler to track the state of the sb_count variable, and > avoid the warning. > > Fixes: 6ba46c7d4d7e ("crypto: ccp - Fix base RSA function for version 5 CCPs") > Signed-off-by: Arnd Bergmann > --- > drivers/crypto/ccp/ccp-ops.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c > index 40c062ad8726..a8bc207b099a 100644 > --- a/drivers/crypto/ccp/ccp-ops.c > +++ b/drivers/crypto/ccp/ccp-ops.c > @@ -1758,6 +1758,7 @@ static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) > o_len = 32 * ((rsa->key_size + 255) / 256); > i_len = o_len * 2; > > + sb_count = 0; > if (cmd_q->ccp->vdata->version < CCP_VERSION(5, 0)) { > /* sb_count is the number of storage block slots required > * for the modulus. > @@ -1852,7 +1853,7 @@ static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) > ccp_dm_free(&exp); > > e_sb: > - if (cmd_q->ccp->vdata->version < CCP_VERSION(5, 0)) > + if (sb_count) > cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count); > > return ret; > This is a fine solution. However, having lived with this annoyance for a while, and even hoping that a a later compiler fixes it, I would have preferred to either: 1) Initialize the local variable at declaration time, or 2) Use this patch, which the compiler could optimize as it sees fit, and maintains a clear distinction for the code path for older devices: diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c index 40c062a..a3a884a 100644 --- a/drivers/crypto/ccp/ccp-ops.c +++ b/drivers/crypto/ccp/ccp-ops.c @@ -1733,7 +1733,7 @@ static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) struct ccp_rsa_engine *rsa = &cmd->u.rsa; struct ccp_dm_workarea exp, src, dst; struct ccp_op op; - unsigned int sb_count, i_len, o_len; + unsigned int i_len, o_len; int ret; /* Check against the maximum allowable size, in bits */ @@ -1762,7 +1762,7 @@ static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) /* sb_count is the number of storage block slots required * for the modulus. */ - sb_count = o_len / CCP_SB_BYTES; + unsigned int sb_count = o_len / CCP_SB_BYTES; op.sb_key = cmd_q->ccp->vdata->perform->sballoc(cmd_q, sb_count); if (!op.sb_key) @@ -1853,7 +1853,10 @@ static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) e_sb: if (cmd_q->ccp->vdata->version < CCP_VERSION(5, 0)) + { + unsigned int sb_count = o_len / CCP_SB_BYTES; cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count); + } return ret; } Discuss?