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 1E863A050C for ; Fri, 8 Apr 2022 15:48:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17CBB410EC; Fri, 8 Apr 2022 15:48:14 +0200 (CEST) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 818564003F; Fri, 8 Apr 2022 15:48:11 +0200 (CEST) Received: by mail-pl1-f181.google.com with SMTP id n18so7903353plg.5; Fri, 08 Apr 2022 06:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=S+ihGdRcvx43nCtzhEhQnsKLRLfh2Bk4bw70wRD4u28=; b=BbXfwmBfhMFouYN2hiy4pgHvc3kl+twc3ZLS5j1nTlfM86nvezU2ei7P89IE2CgssC 1GEsg3Zk1jyyVtjmSWgHZserKrHchZSwH5AGrNRmx6DO39qq53rt6rqlG631t8HT1C4V ry1P+PRdrbVjSNwEVGfqqxLtGMTxIY7JTUtGVsFlIRvO7ZYK5bETsFH6wtxB68fYb2HV U5JM+SoZR73x27eG9mI5bGeNXkEm/QdxF5+dr/XBUTw0h3qqIQ28cSLgy+lyr/YjW/KU PeCev0nxRSV2HLSzmq0mAe/3CYiI/nuSVIjJYsDKtFAOV3VdjUoBHT1DlGg4PSUWiEwi NheA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=S+ihGdRcvx43nCtzhEhQnsKLRLfh2Bk4bw70wRD4u28=; b=6FrFtvaqgaiTelpF4SqPrCPLhq4uOcP8pO4mpNbGOsHVZP0x+l5TRVIw9SmOvtnK7x CzMFnHIrxxFH0YVUfPt2HMuLAIqR+FhTJxYQsZRvf6P3pkkWhnaTYtDPlb5sGrDgIJSt lGK2fbCfaK5X2rwX+w9X7So0FEZcpr4ncNpHMPlG3gFfH/BiR4bhgdBORnB2Q0DnEXQ9 ARv+xNybSEG26eyBmMnMlaNjHsyu7FLRdDG8YlvoufEj3VhNfXxonmmyUKtLyNnXpMjx rf5O2PumroOJmTFnIhWUysEVH4EAIvaFR7fMq/Pgdul/oh7Ljs51Ie/N5nzNR+IcPTK4 /u5w== X-Gm-Message-State: AOAM533LJOTQnDPHMED4sP8G3Ztu0gXA2HxMbILgq2pJAYVbTBKuJ6aH nv6K1A3HQfVdDPPazuel/3Yp6y8jhf34CZfGshQ= X-Google-Smtp-Source: ABdhPJx0EFPlVWEn3WOhS/FbmVO7t+8QWbtora2W31YziqBrkLfHZtCKxuUz/og4KMgLhQ9dlX/2PXUgj9ihp4Bx/dA= X-Received: by 2002:a17:90b:3017:b0:1cb:10d1:93d with SMTP id hg23-20020a17090b301700b001cb10d1093dmr9840149pjb.217.1649425690686; Fri, 08 Apr 2022 06:48:10 -0700 (PDT) MIME-Version: 1.0 References: <20220115194102.444140-1-lucp.at.work@gmail.com> <20220225163804.506142-1-lucp.at.work@gmail.com> In-Reply-To: From: Luc Pelletier Date: Fri, 8 Apr 2022 09:47:59 -0400 Message-ID: Subject: Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs To: David Marchand Cc: "Ananyev, Konstantin" , "Richardson, Bruce" , "dev@dpdk.org" , "Li, Xiaoyun" , "stable@dpdk.org" , Aaron Conole , Owen Hilyard Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi David, Le jeu. 7 avr. 2022 =C3=A0 11:24, David Marchand a =C3=A9crit : > > As a side note, we probably need to check other similar places in DPDK = code. > > What would be the best way to detect those problematic places? As far as I'm aware, there is no silver bullet to detect all strict aliasing violations. A good summary of the different options are described here: https://gist.github.com/shafik/848ae25ee209f698763cffee272a58f8#catching-st= rict-aliasing-violations However, this is not 100% and might still miss some strict aliasing violati= ons. The bottom line is that anywhere there's a cast to something other than void* or char*, it could be a strict aliasing violation. So, doing an exhaustive search throughout the code base for casts seems like the only (tedious, time-consuming) solution.