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 E568FA00C3 for ; 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 E01C2410D3; Thu, 16 Jun 2022 16:53:26 +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 AA5DE40FAE 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=1655391204; 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=f65QBm7lLiq/qNh/KcBzwRPkkj9AUfzxk8GAWIw/I7vpwYiTWfxonBpoEd9XlVocCbt7K5 zzFge/uCYtKXSecEN+DM4BvrkBBuhwgODCXgEzExp5If7+XExF2sXEQLLvRlHMzDvZipij KSaF2Fguz2Q1Fs4F3OLw+qha1JxDLz8= 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-14-fOfEYnhjN6CM_PEqNrE_IQ-1; Thu, 16 Jun 2022 10:53:22 -0400 X-MC-Unique: fOfEYnhjN6CM_PEqNrE_IQ-1 Received: by mail-lj1-f197.google.com with SMTP id t23-20020a2e7817000000b002555d1188bdso254124ljc.4 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=vxkxBR66O7kGcM2/e6GH8nPWJFBAz3EoNCxEsGOAmzGkGK3hkpQvnTg4K45H5MOQ68 jwSf/r3Y8GfGt/s7x1mNRMTlfTICPABHRCF43D6OOtVzJsHcNFmSsp5ja8OV4T8X2zKZ kdDWC0G6k1c7rWd5ETFLAO7dhXHZYWSW1gNQyHJKp8zNA+ThEQGvb1nrHyVeoz6c5ptA iWJpV+NYAO+9b3SrPBWKOXdVkksp/diAuabGV9AMAru8BZoFweTLFcjLlHqBNw3RzEg2 1nvsYHcxU06/l2dtoIfetJ2QzQPqq+QDL5/2JtDjwWbxSAqObsnPtEWmzSHWanbGG/fK JnXg== X-Gm-Message-State: AJIora/VchuSodCLNvs7PW1Sk6qplxctUqn7eJMzuaA7UdsxGvRG+hrF kke2a1nXRtUnUYTYTI5TX6nb1sTZR+OeWMjT8nrZKSm6ILM8Y2M+nvVzbPKbx2C6pv2B1aANiFH Rff/1HOGXfbSMNPGb5I6BkWY= X-Received: by 2002:a05:651c:a04:b0:255:bf2e:72b9 with SMTP id k4-20020a05651c0a0400b00255bf2e72b9mr2697013ljq.333.1655391201320; 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: 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, 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