From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99182433A7; Thu, 23 Nov 2023 11:48:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 896DE402A6; Thu, 23 Nov 2023 11:48:20 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 916D74026B; Thu, 23 Nov 2023 11:48:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700736499; x=1732272499; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=kZCS5u+ErLLss1SCO3MqdQR17LeSAjAiEx/w5td1dDg=; b=fEiRvP0P8DN76QR2t8cqlA/8dH4nepKhCocNkHo7oC8539yShKW/obcj 08YMaZbv38pLIQnRnJCDy9VfW5vGlSgpXQ5W9q3Uplu4sKYBBy4e/cUST QV+jPd+Rez9pT73afgTNjt58pc9tjNznMJuLXwzaj/ifTs8Nac1w0m6tB ndJQjwt3alK3CgN43Z6mOszNIMHkHIz3etn7J5wikOWz8TrgdfmvVACtj uyahrYTqQyE/HWRYwWta4Dlno8caU6JTu6lkCShs8Fwk/ldK11qAZHyZ4 loORcl4Cs4c5eT4xrrUit1VkVB9v34xVg4+0bALFyedSMDcMeAUet6Fcr A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="5435694" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="5435694" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 02:48:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="940583214" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="940583214" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 23 Nov 2023 02:48:17 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.34; Thu, 23 Nov 2023 02:48:17 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Thu, 23 Nov 2023 02:48:17 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Thu, 23 Nov 2023 02:48:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hjxNSrNZJkXy3MEqAdD7q0oZx0121SZ2xCP8SjlKr7bk5PRx6+CzJMfDFTd0WwpYmZpHy2sKx4471ng9thgJBqg6N3Esv3Q8x0KCm0fcqyr9M9N4p4qEH/PrG/x4sc/sL/rjNbFYVoYmHDFjVuka/2ixF2werwZY9GoQP99PbgOseozQ1hf3eqrdeU3nnvI3hsbZsX6l1fYQUALDswk5kF9uUqm40I5U4+H8HFjChr9AnugI7aRwoi7oyd9A7YLqgR4L6POOPGxnoOWzJtm2WzBZ1Y8H8YKvESGYBILWIxTqvhDFh2RPsi17VFC3g1O/8YqfXJoMoKGsl+qT5KngNA== 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=Yvfz0Cwlz8kwmEAQhuakOfGuB08Uhawv7vjcVomeWEA=; b=KZA/762TIkiKJhKuJ+WTiheN7axaPWrSbEt9C1m5VLly/ZLLbU8cbvMsSNYkfMPUcaqureb8+jD/OdYxFRf/Gkb7AUoK3GPMQDHcW2PkPDE1KV4VoXJxU56kW0Sg9ZFnKMxPyDf6rf55/+MD0/MlpYITau1qlqeKtmZjQm/+7kZPXcrur9jyT/98moe4tSXcHjze9M2RGmSKpo6Tp3Sflc9S6L1ktODJbh9wQ5Ddv55agSD3jJGVhVlC49pY7a6YUwUOHya1DY1eIPRZb92jINUBRrEGG58xo37BSs4lzBTGuOEn7v6h0Rb/sNJUb+oL/T1aym5pKNpnFIhY40Q1NQ== 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 Received: from SJ0PR11MB5056.namprd11.prod.outlook.com (2603:10b6:a03:2d5::6) by CY5PR11MB6258.namprd11.prod.outlook.com (2603:10b6:930:25::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.20; Thu, 23 Nov 2023 10:48:08 +0000 Received: from SJ0PR11MB5056.namprd11.prod.outlook.com ([fe80::f0d4:962:7617:1acf]) by SJ0PR11MB5056.namprd11.prod.outlook.com ([fe80::f0d4:962:7617:1acf%7]) with mapi id 15.20.7025.017; Thu, 23 Nov 2023 10:48:08 +0000 From: "Dooley, Brian" To: Thomas Monjalon CC: "dev@dpdk.org" , "stable@dpdk.org" , "Nicolau, Radu" , Akhil Goyal , "Power, Ciara" Subject: RE: [PATCH] examples/ipsec-secgw: fix partial overflow Thread-Topic: [PATCH] examples/ipsec-secgw: fix partial overflow Thread-Index: AQHaF7+ldxa13vAro0mS75MkF98597B7kQMAgAsD8ICAATB3wA== Date: Thu, 23 Nov 2023 10:48:07 +0000 Message-ID: References: <20231115123101.2377544-1-brian.dooley@intel.com> <2090975.KlZ2vcFHjT@thomas> In-Reply-To: <2090975.KlZ2vcFHjT@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR11MB5056:EE_|CY5PR11MB6258:EE_ x-ms-office365-filtering-correlation-id: 550d4858-d707-46b1-4e10-08dbec11ade1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: a4PCRnECXdZAROk/Gl/D7irtQXB4pO+7+tZo2MXrhuMB4YtXegIEPH82vZ6/9wztbYfNYP/vjS6iDkNLnRVGQRNmDEXfUpzeYH4iDtlLV+GGpxuO7cWj3O/e+6NQQ6KTf5+wfmMpQr922cCRJcbBpzjPkzwXUh5d6mauBHHT1IzbQ+vseV5ktKbMshhpMX+kARMKsc6ke9rIh+3Tx2NS1GGsYPJDkPVW7NKoZ8EOqFMo/9KfYV6pY/uDkVC7T4b8UJXg0pHC9mVw47EIlrkbNPhTrJEsnI0eW+DKR6xMS+ecFr6L3MU8of3DVWStYcegJw0waIfgxEOJUIYM7cZG5T1hZAGeJVhW3pPaUa2Ikws4XcUtdNYX6kbDJ1QfvCEaiW5J12pKeYigj8DamAzGVXXNv7/LiPG8O/6eNS3O1ZABPhiMA9KU4DshwRsY582ZvNpoxKIb8nvY0mkb3XDTwxx6iZrJ5jRP9IMlrafokPq0MPu4Ibqez3rTMfr4z3lXWCUhuUM/4mvlMUbFrWjeKGpmik+xGq33HVBRP2vUfyKMgLEAoY1IlUFuu2cK0Rw9oq2bL9l9+FykOdA6uYNZOTBhTud8/93bfo5ty0NXKA3VgtyztczQhfu29StLZWaS x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5056.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(396003)(346002)(39860400002)(136003)(366004)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(5660300002)(2906002)(52536014)(41300700001)(76116006)(4326008)(8676002)(8936002)(54906003)(64756008)(66446008)(316002)(6916009)(66476007)(66556008)(66946007)(55016003)(71200400001)(107886003)(7696005)(6506007)(478600001)(26005)(9686003)(53546011)(83380400001)(38100700002)(38070700009)(82960400001)(122000001)(86362001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?z7uRoJgbfIrv3U7ZdszbsxP5BGDyPSj3I6zBjtGa2wAx78Slo6HpW0B2fvT6?= =?us-ascii?Q?FzE7U8aEMXguBsrsQtcpuv2EAz9O1onjg91TMprBM6AWKkEXlPLEkHTsLrmO?= =?us-ascii?Q?HqgQiOqpb3f9u7f8p/WzPxcGrxpggPih+WCjd0vam6DYOfWudFNNh0pc5hH/?= =?us-ascii?Q?J3LVZvZj3Ll+TeYj7sufFB2lVtGmRPrkw4BGpr5VqRVEU1BGv92lCS+7A7dI?= =?us-ascii?Q?MowYDB9xJ/U0L0hB6CgChnydu9IwApmNkh3/clB7iYLfniVs3J7Hkzxno4ty?= =?us-ascii?Q?XHd98PZOp6eVfgH5dQm96Zgz1GVEd9wLc4UYQJMUrSnzJgKAhVXltIQDviBy?= =?us-ascii?Q?rJW6qmM0tURB/a+7x1X47qJv1c5tdsy010UtnP/FTbpYcEwmRFdGVu513Mx5?= =?us-ascii?Q?bx8H17W4h2vaTSCVlC7iUJoawnb6404ItfpLABrjKzuiGo12Yto0DsjA6Xma?= =?us-ascii?Q?vv56tImzmyqItuuEuMDmEoVl5zQRCmptJuyDNwA5tPkTNwie8GMMFWlsL2FQ?=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EGNryHDvgWBoUOTJqwx2wU5r?= =?us-ascii?Q?pAkoPuIiHzulrsQm3T7rLe3mMxfcREc+/WifPvRkpUnaqdGIG3oL7TNY+swG?= =?us-ascii?Q?awjgkmi6rk9v/wZkDjC5hHlDusjXskJOVGe8lJldloeJbHx7ZFCbiB7Gprfe?= =?us-ascii?Q?W6IJdqri7oXZMIIPB67Fl+dpc4Bbo5LiHztc/1sN?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5056.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 550d4858-d707-46b1-4e10-08dbec11ade1 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2023 10:48:07.8413 (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: soDDBGvakMaTHEMoT1L6hCMgjI4HzKXOKYTLrGAUwIqB6towKhZrlgQuG4BTrhpc+8mzgBPBb0RJ/x+i+vAZ3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6258 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Thanks Thomas, makes sense. > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, November 22, 2023 4:38 PM > To: Dooley, Brian > Cc: dev@dpdk.org; stable@dpdk.org; Nicolau, Radu > ; Akhil Goyal ; Power, Ciara > > Subject: Re: [PATCH] examples/ipsec-secgw: fix partial overflow >=20 > > > Case of partial overflow detected with ASan. Added extra padding to > > > cdev_key structure. > > > > > > This structure is used for the key in hash table. > > > Padding is added to force the struct to use 8 bytes, to ensure > > > memory is notread past this structs boundary (the hash key > > > calculation reads 8 bytes if this struct is size 5 bytes). > > > The padding should be zeroed. > > > If fields are modified in this struct, the padding must be updated > > > to ensure multiple of 8 bytes size overall. > > > > > > Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample > > > application") > > > Cc: sergio.gonzalez.monroy@intel.com > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Brian Dooley > > > > Acked-by: Ciara Power >=20 > Applied and made the comment simpler with this: >=20 > uint8_t padding[3]; /* padding to 8-byte size should be zeroed */ >=20 >=20