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 6ED2043AA2; Wed, 7 Feb 2024 20:10:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1406D40295; Wed, 7 Feb 2024 20:10:45 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2051.outbound.protection.outlook.com [40.107.92.51]) by mails.dpdk.org (Postfix) with ESMTP id A8F6F4027D for ; Wed, 7 Feb 2024 20:10:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GyeiF2v6JO7h8R5VjCZ5w2kx94jRp0vLAieSAN6i1gQ2UpNoVSwVW6/a8LaIPBOyUn0Dv+RjOeHzT1WcJNV8P2QfKx++LrX+2FViBzBUhqipZ3DpAWWEnzRVjH/eOR0+Mi5H0quvM0cC3Er7Ik01D6CTqLlOObCuVYdpH5l2jhSMNYrG2C1Sj7lkpyhkn6wY2pDO0w4Iu7ImXOmGs9N0RVtj4SpaAS33O7gEdK/c7V9HgjJ5f1ReMOtbacVLfgyuy2PuLslg7BbWw6C4/yiFxyvD7PGg4V3Yorx9QcUueLFvqtqlNhG8afSlCRhOENhNevPE03VmHzFqAtfxLUiing== 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=PwOSC3Yo8lxGLk9OxHf4pee4ujCVxH1KJx0/ogohjKM=; b=HSwOOD+VkLA5+fbAZ+viz74JVePeCy289zADOJ51Y5mhqRmm/d74ILsmtTiFq/vEhOjGt/XmjIprwa990gmCK5UaJP6Elp9aeedktnfrg3Q6CAV2P8wHelzmQSiepVaBK9stCCyj3rOoW4UTr8dGl/Bb/btQQvlfSCz+X3rSmZvCFqbHcGon6IbsU8x5lakYuItY3YryldMxjWhHHpviyePuzgfixxplkFViGzLbnf1giyV5yLNeI3b8Ta2DPyNFZjWxIettRVx2P9EzXfSOmNIi852WTVe6nIxWjrHdQUs/K48tStoBDUj1JsCNTSAMIhajPiqLCxd+FGasXqTK4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PwOSC3Yo8lxGLk9OxHf4pee4ujCVxH1KJx0/ogohjKM=; b=pXhps3fBIjKt2w+i0kWFuCF/Ac8iklD8QbzRH9xUBCQfknrWD4HQ/p1j7kToHWUmG/ZEUF0a6d6bV8OCSk7553r7PUF6eAYZeVMTdeuIqBnhaNZ3J38ztOAneDEkYPnj36IpEX0FxvKxXprpW+PvGMnDOMNjMzBb4u9ZLoxEtW0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by IA0PR12MB9045.namprd12.prod.outlook.com (2603:10b6:208:406::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Wed, 7 Feb 2024 19:10:41 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f%4]) with mapi id 15.20.7270.016; Wed, 7 Feb 2024 19:10:41 +0000 Message-ID: Date: Wed, 7 Feb 2024 19:10:37 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] common/sfc: replace out of bounds condition with static_assert Content-Language: en-US To: Stephen Hemminger , dev@dpdk.org Cc: =?UTF-8?Q?Morten_Br=C3=B8rup?= References: <20240118201843.189978-1-stephen@networkplumber.org> <20240119221401.68182-1-stephen@networkplumber.org> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km/6UdcP/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NxKuyO 8Zk= In-Reply-To: <20240119221401.68182-1-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0262.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:37c::10) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|IA0PR12MB9045:EE_ X-MS-Office365-Filtering-Correlation-Id: c6d78b4d-bf78-4d80-6307-08dc28107a24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mLfbHipShQWt2uqVbUn9UAmrO5ayRVR4hs/BL2T23BrDV0t7Rk0Kr7WRQJiMQ7uPlr+Uh4j03N1f2O+XzpGoF7TpoBy6MKizFrCjfAYZzeL3r3QykyF1ndn0+wwwKwSChXOjVYrGYJWMKd4VxoDmDkAe1LG0MSevhUirJan8mmyB/liBQdJNWXaHQlrrLrVBx6/Aycb+rbX2o1qPLj0XtxBeuCW15G/rnwIFvz1wHbgFzNlUdhlVT9YKpShKLpnx2nIArWiZ3dweirMuDXxvSXmNPZ/xGsMVM+hJmuZg5iIu4wmshJmbaScV+RAj3ZOTvcy+/LtCSLjpDR/a/RTvR2T18dS5+NWBJsRtqvQCAfN9UT8AK4ByWvpAK2sZ6QfFUMZM2Kq1wWfYgbLHVVETD+k9ikGi4rI6Y0PErxQ0O5J8B8PIBg6PLtad7OCpGhJRFQnpf7AjL68ssFbjJSA9pwO/mfKBJTJWOaOQTbhIU1k+JB+9PQ5Xi+6P17AQxl9+AFeFaG6LiGHY6+mlClrbk4trOWnP7rmo+Ag+5XfmqN3gY6a2V5LGFT+8+LZc2TzBbxWSmBMcCYMZ6UFj/TLFdibv2HWqOm3aKqbhZElyEKXIRFkKndOtrUZ3F63a+trYLh83zVSa3dX81CB4Br5tyg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(39860400002)(376002)(366004)(346002)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(53546011)(6506007)(6666004)(2616005)(66574015)(26005)(6512007)(5660300002)(83380400001)(478600001)(2906002)(44832011)(6486002)(66556008)(8936002)(8676002)(316002)(66946007)(4326008)(66476007)(31696002)(36756003)(38100700002)(86362001)(31686004)(41300700001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?K1hnakpPWkNTRTRhV0RCOWNEZlhyTFlEcFI5QnhLVncrNDZRMGorZVlpZ014?= =?utf-8?B?ZWxTdVg3dXQzSGVFc0NoNm9xRVUrSkxHWnpWdm0ya20yRm5XbTA5TnVaREM5?= =?utf-8?B?ZkNBOWo4WXkzZGxCY2lDR3p6TjFrMjMySVF1TE5BbjgxNi9kclYyenBkU3BG?= =?utf-8?B?dkpha0kva08wY2xSVmIrMzl1cy9DamM3OWtrU3UxZ0lDSzZackJxYkxaQWla?= =?utf-8?B?Zjh2emFlVWJrYTRBSkZoZXNaT2FZenVuTHRPZFlKNEZqSW9naXVjdDM5OEZT?= =?utf-8?B?VHQvMHFjNVVweTByU0R3bDdSb0ZpNFJCbXZmSnhsMUJSblI1RGZ0UVBTTUVv?= =?utf-8?B?Rm1JVHROc25pbERKSVFYa1RwQUk1cHE3QWw2dVJqYkV3MW5TajQvL2pLT1My?= =?utf-8?B?bEtkNzcyYkNIcEpIdjdWb1ZLbWxXb0RCbVdkN1U0R1BkT3FMa3U5KzV5aEl5?= =?utf-8?B?S3dwQmJTSWtCdGE4ZGRQT0s2eCtNQ3I0TG55TUoxUUdqcFNXelVGMmQ5ZDlh?= =?utf-8?B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xvOFZudEUxeithMUpTZkNQY0lPQnpuaVMzREtrRGhBb3ZFS1pnUGQrT2x6?= =?utf-8?B?R2NidCsrNWF1bUR4U0RNWGhRaTBCSmk0cDkwTkVxak9QNnlqZjUwaVdpRU9v?= =?utf-8?B?MHE0UWZBaTg1TXI2ZkxwdlQ4T0tEUjJ0b0dMdEZHYnlrZFlDSE9jcHhFWHlu?= =?utf-8?B?VVdpOWVqWTRtRlgzdk5tQVFheDJua2gyOGx4NU8rUll3QXhMUU5kMDRleGpw?= =?utf-8?B?U25LeG1NSDA0RWR4Y1VUWWNVZmpVQWt3dG4rbFFKcEwrVEN0Qyt2a2tDRmFB?= =?utf-8?B?QktwWjdlb3orT3VVNU1USFQzcGFoRmNEcTh3aTZYeGU2Zkt3bnZ0V3RDM1BH?= =?utf-8?B?dStLaVF5NFVHcjlQdnJROHM2TllYQStqUmdKUW9ZWGpBQjFPSmVhK3oxWlI3?= =?utf-8?B?TjNHMmtGRU9ZK1ZtWGZXaHdJaW1tZFdpVWRMc1hxNitOOVdQdDhnMEEwTEpS?= =?utf-8?B?WlowRTUrK1NMR3NOUmJIUWxtdURHQWo0WXhkRWZOYmZSeVQ0RVk0WWlhOEpB?= =?utf-8?B?QWVDSkhnRWYrWngwVi9TaFVuZU04M0g4WkNnWWUyM0FET2N0MVJSVjRrc1pn?= =?utf-8?B?YWxCSEdsN1VzSnFvMGtqOE52ZUpkTVdaZjFVZml0cC9Lc1BhTlU4UXFZUlJX?= =?utf-8?Q?E3erTmVCam+1K3qpz2OWtq0ai?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6d78b4d-bf78-4d80-6307-08dc28107a24 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 19:10:41.6077 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4RVspHic13hZ4viPK6cW7zG4fOynjcUatiXPElc9/qSoX6TQRyo24+mM/MyK/YGy X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB9045 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 On 1/19/2024 10:13 PM, Stephen Hemminger wrote: > The sfc base code had its own definition of static assertions > using the out of bound array access hack. Replace it with a > static_assert like rte_common.h. > > Fixes: f67e4719147d ("net/sfc/base: fix coding style") > Signed-off-by: Stephen Hemminger > Acked-by: Morten Brørup > --- > v2 - add assert.h to make sure it works in other environments > > drivers/common/sfc_efx/base/efx.h | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h > index 3312c2fa8f81..38f2aed3e336 100644 > --- a/drivers/common/sfc_efx/base/efx.h > +++ b/drivers/common/sfc_efx/base/efx.h > @@ -7,6 +7,8 @@ > #ifndef _SYS_EFX_H > #define _SYS_EFX_H > > +#include > + > #include "efx_annote.h" > #include "efsys.h" > #include "efx_types.h" > @@ -17,8 +19,8 @@ > extern "C" { > #endif > > -#define EFX_STATIC_ASSERT(_cond) \ > - ((void)sizeof (char[(_cond) ? 1 : -1])) > +#define EFX_STATIC_ASSERT(_cond) \ > + do { static_assert((_cond), "assert failed" #_cond); } while (0) > > #define EFX_ARRAY_SIZE(_array) \ > (sizeof (_array) / sizeof ((_array)[0])) Getting following build error with clang: FAILED: drivers/common/sfc_efx/base/libsfc_base.a.p/ef10_filter.c.o ./drivers/common/sfc_efx/base/ef10_filter.c ../drivers/common/sfc_efx/base/ef10_filter.c:503:2: error: static_assert expression is not an integral constant expression EFX_STATIC_ASSERT((EFX_FIELD_OFFSET(efx_filter_spec_t, efs_outer_vid) % ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/common/sfc_efx/base/efx.h:23:21: note: expanded from macro 'EFX_STATIC_ASSERT' do { static_assert((_cond), "assert failed" #_cond); } while (0) ^~~~~~~ ../drivers/common/sfc_efx/base/ef10_filter.c:503:21: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression EFX_STATIC_ASSERT((EFX_FIELD_OFFSET(efx_filter_spec_t, efs_outer_vid) % ^ ../drivers/common/sfc_efx/base/efx.h:29:3: note: expanded from macro 'EFX_FIELD_OFFSET' ((size_t)&(((_type *)0)->_field)) ^ ../drivers/common/sfc_efx/base/ef10_filter.c:1246:18: error: shift count >= width of type [-Werror,-Wshift-count-overflow] matches_count = MCDI_OUT_DWORD(req, ^~~~~~~~~~~~~~~~~~~ ../drivers/common/sfc_efx/base/efx_mcdi.h:493:2: note: expanded from macro 'MCDI_OUT_DWORD' EFX_DWORD_FIELD(*MCDI_OUT2(_emr, efx_dword_t, _ofst), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/common/sfc_efx/base/efx_types.h:533:30: note: expanded from macro 'EFX_DWORD_FIELD' EFX_HIGH_BIT(_field)) & EFX_MASK32(_field)) ^~~~~~~~~~~~~~~~~~ ../drivers/common/sfc_efx/base/efx_types.h:145:23: note: expanded from macro 'EFX_MASK32' (((((uint32_t)1) << EFX_WIDTH(_field))) - 1)) ^ ~~~~~~~~~~~~~~~~~ 2 errors generated.