From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F48BC433F5 for ; Fri, 18 Feb 2022 05:37:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229978AbiBRFho (ORCPT ); Fri, 18 Feb 2022 00:37:44 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:34812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230374AbiBRFhl (ORCPT ); Fri, 18 Feb 2022 00:37:41 -0500 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B951F113DB1; Thu, 17 Feb 2022 21:37:25 -0800 (PST) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1nKvxE-0005C0-CN; Fri, 18 Feb 2022 16:37:17 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 18 Feb 2022 16:37:16 +1100 Date: Fri, 18 Feb 2022 16:37:16 +1100 From: Herbert Xu To: Andy Shevchenko Cc: Giovanni Cabiddu , Jack Xu , Zhehui Xiang , qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH v1 1/1] crypto: qat - don't cast parameter in bit operations Message-ID: References: <20220209180047.54829-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209180047.54829-1-andriy.shevchenko@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 09, 2022 at 08:00:47PM +0200, Andy Shevchenko wrote: > While in this particular case it would not be a (critical) issue, > the pattern itself is bad and error prone in case the location > of the parameter is changed. > > Don't cast parameter to unsigned long pointer in the bit operations. > Instead copy to a local variable on stack of a proper type and use. > > Fixes: b4b7e67c917f ("crypto: qat - Intel(R) QAT ucode part of fw loader") > Signed-off-by: Andy Shevchenko > --- > drivers/crypto/qat/qat_common/qat_uclo.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt