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 65C24A0C43; Tue, 19 Oct 2021 11:02:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B096410E7; Tue, 19 Oct 2021 11:02:45 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 309F9410DF for ; Tue, 19 Oct 2021 11:02:42 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10141"; a="289312787" X-IronPort-AV: E=Sophos;i="5.85,383,1624345200"; d="scan'208";a="289312787" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 02:02:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,383,1624345200"; d="scan'208";a="566849933" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by FMSMGA003.fm.intel.com with ESMTP; 19 Oct 2021 02:02:40 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 19 Oct 2021 02:02:40 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 19 Oct 2021 02:02:40 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 19 Oct 2021 02:02:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BZ8uKua1v3m++i4Ok5sFWyZI8okGjRMfSB1QEPHiffYjgj+NxFs9gH3cFS6EfnoLPFx8zNlJphMhuatgp2glzXmpdXM7KgCzwPPwzwDnBEka0xf1jVdKXTpBB8SBZzafnMDHeOzY6epIqS/wbMPEzaIiL8Nx9Cs0c0mYNYVFaaPoV46jxZ02BR/aYpF8thxOAB4i84GNIesk9JwDiLtlf4RjnAUM8Sw+inSNLO7gK/l/81tTNfIrmoTjFB5BT15J8ON7l0A8eOue3Kk3oUmu/KuUy1duHfj9kln8/E7TqlxG/qy1vwcZKf8y5jiy6S3nR095fsuD+m2Z6dN+m/O7jA== 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=GZTbpz22ZJdWvg9jqjhtuRu58fg1ggWrVHXdA3NcjV0=; b=Nd2Dp0iko6Q4CBap5rVypDaZP21z785JsDG5TKiSN4C4oTDFAuKKGgwMcY2NZh6NVDdp60UkBYcfMwmabDYJvoDMR/bqKWhWDfDv80F19Y94PkdI+nmRcFGgHmTehu6qDV12n9MpcI60tUCTNgyqGkP/29wzm+ia9i7jyvBAcHZaM6P5sonkDBpo3SYa2Pg7uYAXVw73+ukdMJKXzqbJ/j/D5tZm8mrUXv6P8+bmSlePU1MqV3XYjywEjp7lkGTyajGEu/AwQDRj+4Tr00eZEQelFO1SgmAJjfT2quX2RTK6WeNMNBwKxz7rV56kailBIyV+FFPHUUa82Lc88kzUIA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GZTbpz22ZJdWvg9jqjhtuRu58fg1ggWrVHXdA3NcjV0=; b=cTfxRAmMGUSTRQB/8EJ+C0OHnoZWGhltAaToQYRFs1JX8dIlxZmGt4Iha0w1bpuok4/H86MAcB23NFVfx9suvgRZPHAAV2koC6wtErovIj+sffEWhtzFFkvxDncKGSMbQkCEKrIZSM7tu7uVROYIlsV/iasfddtZH+nvWbpar1M= Received: from SN6PR11MB3086.namprd11.prod.outlook.com (2603:10b6:805:d6::14) by SN6PR11MB2655.namprd11.prod.outlook.com (2603:10b6:805:62::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Tue, 19 Oct 2021 09:02:39 +0000 Received: from SN6PR11MB3086.namprd11.prod.outlook.com ([fe80::9c71:18a8:8024:f8e5]) by SN6PR11MB3086.namprd11.prod.outlook.com ([fe80::9c71:18a8:8024:f8e5%6]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 09:02:39 +0000 From: "Mcnamara, John" To: "Peng, ZhihongX" , "david.marchand@redhat.com" , "Burakov, Anatoly" , "Ananyev, Konstantin" , "stephen@networkplumber.org" , "Dumitrescu, Cristian" CC: "dev@dpdk.org" , "Lin, Xueqin" Thread-Topic: [PATCH v10 1/4] Enable ASan for memory detector on DPDK Thread-Index: AQHXwdDcg9y9UG06/kKEQwNa9xQNHqvaCo4Q Date: Tue, 19 Oct 2021 09:02:38 +0000 Message-ID: References: <20211012094318.1154727-3-zhihongx.peng@intel.com> <20211015142739.1876210-1-zhihongx.peng@intel.com> In-Reply-To: <20211015142739.1876210-1-zhihongx.peng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: df8e9672-6020-434d-cd56-08d992df3399 x-ms-traffictypediagnostic: SN6PR11MB2655: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BwMxT1sksQm+5NOve1myo1rakB+kjH11pcuIBxzXrhZhlyXaquR08z2+io1Q9ppC9zhZcrfq1Q/CBXEI4bSxDOC7UqVId+zaQaWOyra+vLk8np0CXbzfhw7hjXt8JDEUFvmomw3BvLRmQw/BqGErJ74L3+7RQFfrpVq1SvMyHbbHJhuAfB/PNtTxF0GXWhQYF4LoEK1n2R9nyc6vOC8ZMz8eHgndLMmQjPQZXn9v9sB5Mrhuza/U4aixRbETMHf2GWT7YWEvgp8AOzCyiiWFYcpHfzkqOwUbGpnhUeHK8vFhkci8+vk4DmLbnRQ3vhaDeyHTncaKi7GLCDrxqh31jqwRhOVuCqpVrHBVZrUli7qpveEoAR3nmMqHlRvHyTfWzXF1lzfFI/TS8Yka+Xl6qpuj6z43rb9HitB/bLarr4NFbUK+ME9pSCDYdfVuYu/OoXzOnRS/4N81mqcYzd6LBM9l2r9JOtek9kEZQtuDMbBKxzZuPo8bou1zbibRvpkO5b1IUOBIFUoDKmhmdpK1vCvNs6T7e7oImw+mpYLqe9IBkEQReSvv32wOrZc6o4PhslN8PAScKUfTOcxA59gkoHQoL35JDj8q1WNIUPomBA4Kk6Y+v+JdhRJbdDzRFleMXNRUxEdcNUSm0GIt/+V3d+128gEWAOh/PU5KCpiyMse7UFwCI69m9cyp3sCMdv9hciIImn7pP9odMNvRCD6pSlw8z0soRtdjKVl1RC7P9jup29SgODSfFWdmsYMRiGxGdekd07R5vtg8Ix3j19XQhu/OyaST/oOD5pK81FLAJ0hkPFqdzIeqjFpbBsknhDLp x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3086.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(82960400001)(921005)(54906003)(66446008)(38070700005)(55016002)(186003)(110136005)(66476007)(107886003)(33656002)(7696005)(86362001)(6506007)(316002)(9686003)(64756008)(2906002)(6636002)(4326008)(38100700002)(53546011)(71200400001)(508600001)(8936002)(122000001)(76116006)(83380400001)(5660300002)(52536014)(8676002)(66556008)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4r9Ri27v3Xc6ZJ7DCA4z5zJNnhN5Gt2MO6OhdZKTb3i1VNrqifIFL8ZIESMu?= =?us-ascii?Q?i0Wi6dKBroi+Dwmu8RVOqwXf4fufX3g18qDRA9KS6vJ/JDOzbI8XWvCUZIxP?= =?us-ascii?Q?jBD9sPNIQFicDuvzhlsbfu4rz+70vFpsD7ADveGFnYZPWsZSinp53QMaVrjv?= =?us-ascii?Q?MbEhWuedz29rHHJTsbgy7sngVYMhPJhIUwNVR8HuS3rKC9Zwm93TlPc150Uq?= =?us-ascii?Q?Y9N+Zr2JewrhyRITgBpOPxU7EuD9GSphre/KXYswZtOJLcjJ1xFl7OGEiFtd?= =?us-ascii?Q?B5tE1MJfhwioKHH/b13jGGAr3Ic04ObeWJB3Yw/eQ7y3viSf0WjbZmCiSDMU?= =?us-ascii?Q?Qvqx88KhCbZ9JETp0RInlPZxr9lW6mCjmNZCpkvpt3jBEpqpL2oMdB0Le5h0?= =?us-ascii?Q?Ds9/MkrNMNAo7dVvei29sc0cIYfCQHqfle+VnDmCItCmFui+Vg5M0QHdw36y?= =?us-ascii?Q?HJZMqJyV8RFHul8MVWtAVljlGXl1UFKb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CId4U9FRnaIWo/3VxMVaXC/rRWSO?= 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: SN6PR11MB3086.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: df8e9672-6020-434d-cd56-08d992df3399 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2021 09:02:38.8926 (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: czGhicyNuqod+2wjz//th6QUBaTgsqMkVfhVSmYZq0eViT1zhsN42SvlX+HHVdJu1oNU2bRItWOhJWtp/2UzkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2655 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v10 1/4] Enable ASan for memory detector on DPDK 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 Sender: "dev" > -----Original Message----- > From: Peng, ZhihongX > Sent: Friday, October 15, 2021 3:28 PM > To: david.marchand@redhat.com; Burakov, Anatoly > ; Ananyev, Konstantin > ; stephen@networkplumber.org; Dumitrescu, > Cristian ; Mcnamara, John > > Cc: dev@dpdk.org; Lin, Xueqin ; Peng, ZhihongX > > Subject: [PATCH v10 1/4] Enable ASan for memory detector on DPDK >=20 > From: Zhihong Peng >=20 > `AddressSanitizer Good work on this. It is a good initiative. Some comments on the docs below= . > diff --git a/doc/guides/prog_guide/asan.rst > b/doc/guides/prog_guide/asan.rst new file mode 100644 index > 0000000000..b732288af3 > --- /dev/null > +++ b/doc/guides/prog_guide/asan.rst > @@ -0,0 +1,35 @@ > +.. Copyright (c) <2021>, Intel Corporation > + All rights reserved. > + > +Memory error detect standard tool - AddressSanitizer(ASan) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +`AddressSanitizer > +` (ASan) is There are a number of minor doc and grammar issues in the rst for this patc= h. Rather than going through each one here is a rework of the asan.rst with= these issues fixed: .. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2021 Intel Corporation Running Address Sanitizer =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D `AddressSanitizer `_ (ASan) is a widely-used debugging tool for detecting memory access errors. It helps detect issues like use-after-free, various kinds of buffer overruns and similar errors, as well as printing out detailed debug information whenever an error is detected. To enable ASan in the meson build system, use following meson build command: Example usage: * gcc:: meson build -Dbuildtype=3Ddebug -Db_sanitize=3Daddress ninja -C build * clang:: meson build -Dbuildtype=3Ddebug -Db_lundef=3Dfalse -Db_sanitize=3Dadd= ress ninja -C build AddressSanitizer is a part of LLVM (3.1+) and GCC (4.8+). .. Note:: a) To compile with gcc in Centos, libasan needs to be installed separatel= y. b) If the program being tested uses cmdline you will need to execute the "stty echo" command when a error occurs. > diff --git a/doc/guides/prog_guide/index.rst > b/doc/guides/prog_guide/index.rst index 2dce507f46..df8a4b93e1 100644 > --- a/doc/guides/prog_guide/index.rst > +++ b/doc/guides/prog_guide/index.rst > @@ -71,3 +71,4 @@ Programmer's Guide > lto > profile_app > glossary > + asan The asan file should go before "glossary" and after "profile_app".=20 > diff --git a/doc/guides/rel_notes/release_21_11.rst > b/doc/guides/rel_notes/release_21_11.rst > index 4c56cdfeaa..b6c4174dc6 100644 > --- a/doc/guides/rel_notes/release_21_11.rst > +++ b/doc/guides/rel_notes/release_21_11.rst > @@ -159,6 +159,15 @@ New Features > * Added tests to verify tunnel header verification in IPsec inbound. > * Added tests to verify inner checksum. >=20 > +* **Enable ASan for memory detector on DPDK.** Change to "**Enable ASan Address Sanitization.**" > + > + `AddressSanitizer > + ` (ASan) This text should match the edited text above. John