From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 36A9CD802DB for ; Wed, 20 Sep 2023 05:50:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=l10P/nPUXvhE7c2lufLZsr+aAj5FY2ZbZD4oMlyhaek=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1695189013; v=1; b=HkccEL9ZFjPWBVk3tHR5wwn3cUeihwG1ZFu8mSQivtmT36+//t8feNHEk6K+PEthvOWWw0nK vIDCZZxob5siqj9TZs8KpSfsvonWpedrlnKS/bVsjif/5CI0hVOTlHrA9i3RDs4BLXr8NIxXKGZ ppk4rlR/jab9P8dBCSQ0ft68= X-Received: by 127.0.0.2 with SMTP id qTpUYY7687511xGkoHbCUD7n; Tue, 19 Sep 2023 22:50:13 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.30615.1695189013080232112 for ; Tue, 19 Sep 2023 22:50:13 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="382877386" X-IronPort-AV: E=Sophos;i="6.02,161,1688454000"; d="scan'208";a="382877386" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 22:50:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="1077290188" X-IronPort-AV: E=Sophos;i="6.02,161,1688454000"; d="scan'208";a="1077290188" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 19 Sep 2023 22:50:12 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 19 Sep 2023 22:50:11 -0700 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Tue, 19 Sep 2023 22:50:11 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Tue, 19 Sep 2023 22:50:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gtra+MVedGilub1P2ci5iQ3jntrbGn/QwIZxXu8SFnx2W5OpXbyFVbES+lM/Ob6bztFZN2WlAZ7qosPT0k/yCwcwxWpfEXkGIZOOvGzWJxonD3Xo+V4I82WLcjaBPnoT54UXIUSVdENdtI46nrG2zbsdsvotKFkWq/oXb5dsx9kvbWdP0tJL7gJTMltOl11HnosqqCJk3ef8W866PcAYAwRd+M2I+JCy2CGZaCDEpiAK+3uoJPIe495J7Op079SOvwkk8+MtKXYDQxfDe4WusSumgIUc7wmx1PSo84Oagqeh9fDgMNtOSen+XBOqu3ccQHpzY1QCXzd4LG4oS1rR9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0uis0KzmLYsCYsuWSCEXqNUrwwZJkSs9cpuAr8V9Jv4=; b=RqR61Qr52ldKblmwUwO7EHwVtcDiX9B3dGQzU89n3/8sc0i2dKy1BUDtF8BFhPQZRbic4KOofMaHqBnoTJon8AarLBkyi8k2AKpjb+obnoitVl4ejTzRJL1hek7BfUqIKE6RED+OufkTtAC+VkrJg3XDcrG93B9Xki9LA3tPp609CCu+wvh2XbgyC2WSuDAyU5WGb0mA/D7zN+/Mba1msaf5P7G3c41VPhlzkAKfvyLiksmLy1HUbrv0dbhj9AOigJJdK0IJCsVAZtNbOgtfePPsorlvMjJLEsIxeQuDD0vuhE3hKm8KkMAS9F+3tjVerKMwlFXzupbAJzQ3GjpQkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by SN7PR11MB6798.namprd11.prod.outlook.com (2603:10b6:806:262::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.39; Wed, 20 Sep 2023 05:50:08 +0000 X-Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::38c3:ed7c:3562:2e18]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::38c3:ed7c:3562:2e18%4]) with mapi id 15.20.6792.026; Wed, 20 Sep 2023 05:50:08 +0000 From: "Wu, Hao A" To: Ranbir Singh , "devel@edk2.groups.io" CC: "Ni, Ray" Subject: Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg/Bus/Ata/AtaBusDxe: Fix SIGN_EXTENSION Coverity issue Thread-Topic: [PATCH v2 1/1] MdeModulePkg/Bus/Ata/AtaBusDxe: Fix SIGN_EXTENSION Coverity issue Thread-Index: AQHZuKYiLWUk6yik+0are2JfVe3z16/i3qNggEC8d4A= Date: Wed, 20 Sep 2023 05:50:08 +0000 Message-ID: References: <20230717115910.2291824-1-rsingh@ventanamicro.com> <20230717115910.2291824-2-rsingh@ventanamicro.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB4025:EE_|SN7PR11MB6798:EE_ x-ms-office365-filtering-correlation-id: 24c8f019-eb6f-491d-8af6-08dbb99d729f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: CxudMHSr7R4xE4st7sci3XpuRm5oqubk8E2kmFk0KL51kiCJvAmJuNLAmcU32Kf3gr+QcpHO4yAtj8zpc4zi/3SEQgZBW5o+GDMh4sysa8a7L2IJmOvr34ZypuwV1oUOJnbA6FWCGOYsPaPZJOyA3gM48NKRPfB0q5Cmf6LXK4YEBth/iIgjSOPiZCouy0NLzjqcK9EQv5ErX+NPVCwJkN2IHKrrUS8Q2pmGSm7/QgwLOHnMEY2vYbnQYuJp20DUl4UJhCXKPj2Ds5GBBM/or2FuNfVc+iFQkRXCihJEOgoS1PeqtrXHyCJYFDMpvHZ4r/27tVGwp/MIOgHe/MgZootY3iXKapTEZ12Kt139UD5qDW/jmRRKfkb0NIpOEVCwPgFcR/4SMwkBFm6RotRQaYP+rGJHJ6Q/oJ1IlzUekvTwDIc1+eaaZoYrG6ZV5ZCZ5R+l4P/U7M17lmdoPXWmSY+x2DBJZ/HXA76sR+Xs7WOBJik0PxkGQkEWgtGePWFl0vA2UGHloft22u21hphLjBPJC8NexMgg0WbUjA34iAuuuRQXEGzFCXh/Q7aUD+Alwe34/8bgPxXeZ0yzUdiE4Q3R+PGlbVUmMzJEFkZY6ERyM0FdDgNkhma+s8Wrl+Pnmb3iZdZyD+djqh0uBv81xA== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messaged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C/Vub5Tb86m64TAkTzAzS0BN1kb?= =?us-ascii?Q?E/QUI+BpKuqceizq1T2o0UZg/1sR1959RqIsj5Snm33ESehfzPbIzfX94VqE?= =?us-ascii?Q?ukTpBpDE6QIbJHp/rHCxCiazi7RMH70M9fx2cUhc6QfPYIEBwS3NSza5y65Q?= =?us-ascii?Q?kxeomiMSaQd7F7YVFPMSlalqj5PRaf8r7vVVf66Hf2fjhZh8GwQQRI+uUnUD?= =?us-ascii?Q?SQ9aCROHRzHRNhVHHg32YauReJztwPCXKqWEJKch6AXsFS4BkmJSgCQzJcKj?= =?us-ascii?Q?xwnDnoQjf3GJhQUrzh8H/A8Mrpqs7G8SpXi2Ih5dh8OPmnyVclmus8Jc3Do8?= =?us-ascii?Q?5sGEZVG6AzIYqXtMQ6dRxvyMdiQeH1ZZQVjqd89jauzOytqG+DVhMnf+HKVc?= =?us-ascii?Q?Hgr31IWRq5998T+mU3GkHgM/o39gQERKEfGTAic772qxwL8MoPWyhB0XKR65?= =?us-ascii?Q?F/LMjAUcZX3S1jb6noVgfjSzbx+ULTy5coknJS0kCw2lYNNmHgzSo99qIZvN?= =?us-ascii?Q?SxQIXCXs+nUQXkGOPEEa9V8J+qRXGZfd9sPAEbZbZIecQUzPJeAzvKFYmioS?= =?us-ascii?Q?3Nrx0r3M2mulRRYETOtd6Sqkvxp7guCn4RKhWN9aXGqKKxcaan7JxcbyKJdz?= =?us-ascii?Q?aDa8TtEUno8oNF0mnfMO3Cd30e+B2NKypaGzYQddAccgbFmfP5ZXObrOmQ?= =?us-ascii?Q?=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24c8f019-eb6f-491d-8af6-08dbb99d729f X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2023 05:50:08.6971 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eW+cYBdyzG+5J68GySYvpQ+THWc6Y21F2i+7XcvP8nUDwa+BicGZ75uR/wRlrkPrX3GTfM6/mO2Bjc1qYW/L0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6798 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,hao.a.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: WGZbP45D7I5uipkfSs5ufEfNx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=HkccEL9Z; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Pushed via: PR - https://github.com/tianocore/edk2/pull/4841 Commit - https://github.com/tianocore/edk2/commit/4fb69c2bee3006b08ca2abba5= 8843f7573e0c5c6 Best Regards, Hao Wu > -----Original Message----- > From: Wu, Hao A > Sent: Thursday, August 10, 2023 10:39 AM > To: Ranbir Singh ; devel@edk2.groups.io > Cc: Ni, Ray > Subject: RE: [PATCH v2 1/1] MdeModulePkg/Bus/Ata/AtaBusDxe: Fix > SIGN_EXTENSION Coverity issue >=20 > Reviewed-by: Hao A Wu >=20 > Best Regards, > Hao Wu >=20 > > -----Original Message----- > > From: Ranbir Singh > > Sent: Monday, July 17, 2023 7:59 PM > > To: devel@edk2.groups.io; rsingh@ventanamicro.com > > Cc: Wu, Hao A ; Ni, Ray > > Subject: [PATCH v2 1/1] MdeModulePkg/Bus/Ata/AtaBusDxe: Fix > > SIGN_EXTENSION Coverity issue > > > > From: Ranbir Singh > > > > Line number 365 does contain a typecast with UINT32, but it is after > > all the operations (16-bit left shift followed by OR'ing) are over. > > To avoid any SIGN_EXTENSION, typecast the intermediate result after > > 16-bit left shift operation immediately with UINT32. > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4209 > > > > Cc: Hao A Wu > > Cc: Ray Ni > > Signed-off-by: Ranbir Singh > > Signed-off-by: Ranbir Singh > > --- > > MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c > > b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c > > index a77852bae054..57aefa04c215 100644 > > --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c > > +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c > > @@ -362,7 +362,7 @@ IdentifyAtaDevice ( > > // Check logical block size // if ((PhyLogicSectorSupport = & BIT12) !=3D 0) > {- > > BlockMedia->BlockSize =3D (UINT32)(((IdentifyData->logic_sector_size_hi > > BlockMedia-><< 16) > > | IdentifyData->logic_sector_size_lo) * sizeof (UINT16));+ BlockMe= dia- > > >BlockSize =3D (UINT32)(((UINT32)(IdentifyData->logic_sector_size_hi << > > >16) | > > IdentifyData->logic_sector_size_lo) * sizeof (UINT16)); } AtaD= evice- > > >BlockIo.Revision =3D EFI_BLOCK_IO_PROTOCOL_REVISION2;-- > > 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108897): https://edk2.groups.io/g/devel/message/108897 Mute This Topic: https://groups.io/mt/100212118/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-