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 027B3A00C2; Thu, 16 Jun 2022 16:53:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2FFA40FAE; Thu, 16 Jun 2022 16:53:25 +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 5D6E440141 for ; Thu, 16 Jun 2022 16:53:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655391203; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cHp/foZTp5MOHEP6sM9aseM0wLcRCaEmD1WYRt5vwhg=; b=KH5F185uZCw3qMv1RfPrN1deaNW1XfemWuk7PSrWDv3Er+lMx8INJxDIMjbzum0/qvUlPW eOPGVIgtSpr9KrUGewxRT0BFTfVi9JaY2VfFkey03E29vM0Qj3e9kNQkkDWu2skqRT6VpM jVYhjVszZTuylAE/dn5qLkxSeyOyB/E= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-28-tKGTK27HPAGJANk0DT49Mw-1; Thu, 16 Jun 2022 10:53:22 -0400 X-MC-Unique: tKGTK27HPAGJANk0DT49Mw-1 Received: by mail-lj1-f197.google.com with SMTP id c12-20020a2ebf0c000000b00258e5e6e125so252286ljr.17 for ; Thu, 16 Jun 2022 07:53:22 -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:content-transfer-encoding; bh=cHp/foZTp5MOHEP6sM9aseM0wLcRCaEmD1WYRt5vwhg=; b=k59Tt0atVpDat9yjxtm5fXPF4hnxXsuRAXt3o6NvV5ZUe/gfcD0/K2bmCW3SEb1yTm BnNercKwF+GIWIXB21mPEl/sDmfp/emjSxWJcIFA1V0qm+E0z51JhFGKzBZ+sj8mtEmP 7AW0d6pbs9gEB7syOVa42GLdp6Yd74TfrNOGl+gpTdI+uncBAGSiOPRUWmFJvfXIm0HF 2k6luqHOgNHpfvYzptNtxqYhiL5kb4OXQgGwO4n12oCNOixXJjoNoz2hM/2OLZwLcxYs eybjdonj/zsgazoQLRnZhZxGzDdfhI8KmVksh3S65KmxxsIs7uKipZMbkH3LZ4RjgCJG L4KA== X-Gm-Message-State: AJIora8x6B1KXW3VJ3b/+NHgIYOpHCBq7daJRx6vc1knOgPpWYrK/fUG cDtCSLmBxeUmReZ3nEiIaAZUvTcmrk3BZM2PARcHo8t4VaBavS+fpIdVmNZMu+HbQIAi0NRQawl G6r4MoLBhqgWF22l21iA= X-Received: by 2002:a05:651c:a04:b0:255:bf2e:72b9 with SMTP id k4-20020a05651c0a0400b00255bf2e72b9mr2697016ljq.333.1655391201322; Thu, 16 Jun 2022 07:53:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmkSRXcYmidD3+szFIIJdhexS7AMPfiE+e55C6qVoP8cklSkaI1a0xRpzDxdMHey7sY8OqqLnUP1KP1eF6Wq8= X-Received: by 2002:a05:651c:a04:b0:255:bf2e:72b9 with SMTP id k4-20020a05651c0a0400b00255bf2e72b9mr2697004ljq.333.1655391201109; Thu, 16 Jun 2022 07:53:21 -0700 (PDT) MIME-Version: 1.0 References: <20220518101657.1230416-11-david.marchand@redhat.com> <20220616093211.881984-1-david.marchand@redhat.com> In-Reply-To: <20220616093211.881984-1-david.marchand@redhat.com> From: David Marchand Date: Thu, 16 Jun 2022 16:53:09 +0200 Message-ID: Subject: Re: [PATCH v2] vhost/crypto: fix build with GCC 12 To: dev Cc: Bruce Richardson , dpdk stable , Maxime Coquelin , Chenbo Xia , Fan Zhang 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" Content-Transfer-Encoding: quoted-printable 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 Thu, Jun 16, 2022 at 11:32 AM David Marchand wrote: > > GCC 12 raises the following warning: > > In file included from ../lib/mempool/rte_mempool.h:46, > from ../lib/mbuf/rte_mbuf.h:38, > from ../lib/vhost/vhost_crypto.c:7: > ../lib/vhost/vhost_crypto.c: In function =E2=80=98rte_vhost_crypto_fetch_= requests=E2=80=99: > ../lib/eal/x86/include/rte_memcpy.h:371:9: warning: array subscript 1 is > outside array bounds of =E2=80=98struct virtio_crypto_op_data_req[1]= =E2=80=99 > [-Warray-bounds] > 371 | rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32)= ; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../lib/vhost/vhost_crypto.c:1178:42: note: while referencing =E2=80=98req= =E2=80=99 > 1178 | struct virtio_crypto_op_data_req req; > | ^~~ > > Split this function and separate the per descriptor copy. > This makes the code clearer, and the compiler happier. > > Note: logs for errors have been moved to callers to avoid duplicates. > > Fixes: 3c79609fda7c ("vhost/crypto: handle virtually non-contiguous buffe= rs") > Cc: stable@dpdk.org > > Signed-off-by: David Marchand Build fails on 32-bit. I had seen the issue while testing but sent a non amended patch... v3 incom= ing. --=20 David Marchand