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 792FBA0503 for ; Thu, 19 May 2022 18:47:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5582440156; Thu, 19 May 2022 18:47:51 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 6723640156 for ; Thu, 19 May 2022 18:47:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652978868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Cq0zxJWR5YPKpl0BPcupK4Ose6FRq52oqmVfIRKcd7o=; b=g4bwJHOc+l0Vwr2PxRoFjIwCoHWmHzSdVWxMkRFwnHyOKvVYN90rnIbm+V0GBALFHVpjtG TzYTdp8YSc0QETOp0lLVobe3oks8MSfIRzg6oD6DmZpFMXl6u/pmx+vohuAYUCEjoRqJF7 R0yAU1LgeLaRTYRsY9YCKFhnmmVjEBc= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-66-QhPPaQQBOnydT9pBcvYEnA-1; Thu, 19 May 2022 12:47:47 -0400 X-MC-Unique: QhPPaQQBOnydT9pBcvYEnA-1 Received: by mail-lf1-f72.google.com with SMTP id br24-20020a056512401800b00477cb7c9a9dso831605lfb.1 for ; Thu, 19 May 2022 09:47:47 -0700 (PDT) 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; bh=Cq0zxJWR5YPKpl0BPcupK4Ose6FRq52oqmVfIRKcd7o=; b=Kv7oEjcAhm5PVQN/CbLQVZaPXiMASfdSKdeSm5chcFv+Z8FmZj8cOxhQdh8De/sAfT /teLHN3K2S+SIiiAv8HUiPYJhKy/rLN8PyIhURkL7AOQ67Et2NDsuVXuVmhheP2IILXP 4U9c4Pq5gaweSILHM72qkd271xVbWofn+pr24dX++73laogvSZII0zZwRMFliEW3ZcWS /Ds3brHAwEmtCbk5y6gdp4T/vyL66pSno0NWHVnLbafDYTyCrqTaiPkmKpZKU5nLU7rl zdSfXVjPM+YLGpTtIvADNU+DoPUHvWnjwexwh6HCkKR1ARiCk08mo2n4/FZEQggU3Uic nsLA== X-Gm-Message-State: AOAM5326CGyF/nmndxdjCVo3AubuOPq8VzBQgE8LHEpyUA8G27J0e+eA weyl51BRucH+e+bnZ6Uj/YiIeJOtoVzVp8m9T8si2GeoxzO8+IF2rrhvnI+3rx6ClP9QCN+nLLp Wns5CT7mnoFmmV38oSioBdQc= X-Received: by 2002:a19:9102:0:b0:477:bbc5:182c with SMTP id t2-20020a199102000000b00477bbc5182cmr3801672lfd.265.1652978866345; Thu, 19 May 2022 09:47:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0Cs5bWIlI5qr51/jyVFYOwHak9JfGa0JRx56S/k+XNPPs7jOouYIMhgS+8SIR9FYL9bN/bt3N6p1D6A3EnYg= X-Received: by 2002:a19:9102:0:b0:477:bbc5:182c with SMTP id t2-20020a199102000000b00477bbc5182cmr3801659lfd.265.1652978866173; Thu, 19 May 2022 09:47:46 -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: David Marchand Date: Thu, 19 May 2022 18:47:35 +0200 Message-ID: Subject: Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs To: Luc Pelletier Cc: "Richardson, Bruce" , "dev@dpdk.org" , "Li, Xiaoyun" , "stable@dpdk.org" , Aaron Conole , Owen Hilyard , "Ananyev, Konstantin" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 On Thu, Apr 7, 2022 at 5:24 PM David Marchand wrote: > On Thu, Mar 10, 2022 at 3:55 PM Ananyev, Konstantin > wrote: > > > Calls to rte_memcpy for 1 < n < 16 could result in unaligned > > > loads/stores, which is undefined behaviour according to the C > > > standard, and strict aliasing violations. > > > > > > The code was changed to use a packed structure that allows aliasing > > > (using the __may_alias__ attribute) to perform the load/store > > > operations. This results in code that has the same performance as the > > > original code and that is also C standards-compliant. > > > Fixes: af75078fece3 ("first public release") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Luc Pelletier > > Acked-by: Konstantin Ananyev > > Tested-by: Konstantin Ananyev > Applied, thanks Luc. -- David Marchand