Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp607045rdb; Tue, 5 Dec 2023 14:37:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL8T4KUmzWmltHKNoggaPOfYuAgh2tunk0hdIkIJ4Y80uVfJ/7BGAv+Jllf0LpK3z4K1O0 X-Received: by 2002:a17:903:491:b0:1d0:d15c:8baa with SMTP id jj17-20020a170903049100b001d0d15c8baamr759465plb.83.1701815874411; Tue, 05 Dec 2023 14:37:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701815874; cv=none; d=google.com; s=arc-20160816; b=cYANeTKKUPqgzfjsDajdS/ReIJZ0NTbx3LRnN+KdsTF1EX+zu5Gbkgs0jM2e4opwou 1QcirK9BY01DIDwZH5ejOdEsghrtzDEKBxvD/QeiBHl4ocZvhutGu/KVZpQmldWqGOKp M6o+1Qqdo30+hOUVlo5JFOx5OkFM+FgWXMGevaaOYU+L3l+acvXQKgz+gTuHSB0VVwzL 9Sm2n3xXBasyjGTEuTh+KaTfEanybJ+aT6Fis4r25WxhDs7yuKa5EpGMOZwNNwNuhY37 yqH4xlJPIoVpKH2LCsXe7u5LOIp6WX1JWqHsKX/hQmnGjMWLIdlm+a2vbbqcTwkoyrUW PZcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=OIswzDWvRg+a4ZFHuUXlTcIuCrS5KbAXVLyxdVPQwRk=; fh=9Lm7+WBNnNjDDnu82zGOSfNYrGxIonLBQ8oaMi/fl/o=; b=Ir7VakFAsxpfXmffTc7IYBon4q1bSpKpRpFrBdrXAuvbnv50EfbgNxRfzJN1b3pY6S uD9kO+Rgy0w4EtdJwG19VfdL70hdhZkBhRyTPCshlgNAiOFB0Q57yUb7qBvHfINLkMUd KYhJvi1pdKbmpYuo1DJ2b2/o6q0UVq5vIEIPmaoUx4IhjKNQ0Y9jv0f3yRoWbEJq18vU M7go7hi+xhFqrlM/CfkUSYfErk0GsCyyo2UYrWiUX2ClbKwGuA2/qAefPdSoES4XEboD 8aXekfc80sH+tip2GyfZvjAVwKi3SW6lH4UquFt9h2IPAqXDpL4dO25cFiFqQpNqc1lL Y4kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=arznWVpT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id bf9-20020a170902b90900b001bc162f3318si9812988plb.640.2023.12.05.14.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 14:37:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=arznWVpT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id EEFA1828E8D8; Tue, 5 Dec 2023 14:37:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346501AbjLEWhf (ORCPT + 99 others); Tue, 5 Dec 2023 17:37:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346259AbjLEWhe (ORCPT ); Tue, 5 Dec 2023 17:37:34 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 295F4194 for ; Tue, 5 Dec 2023 14:37:41 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7E39C433C7; Tue, 5 Dec 2023 22:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701815860; bh=sREbz9DKSjqXuLOUL8jwggcX4KntV1Kh5sSgOifiQyE=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=arznWVpT85zXKYCMx2p9VwmS5C5YWedRxPvFBC90LJYoCFk3NcqnIXTMZpgAbE0L1 8wp7jgeiX6waz631/gRYN7zVbaDcPP8QwkjdU38PlAy+3VRuiNbfyvtXvGeKwHg+Og J25uOw2o1GNnMo7LZA0iKsqosECXODo0BStzoOOexxlzoKIBSvbC+/ez+urAlbyml0 dWfY8OMyh2MnRrNJhF0XvPes4rJLKgirZ8+OVH7NzRvcJzKD7iCVUZWk81uihxoFlp jcInj9Lrxy1nNoWxu5wrMwGOVXtgG/GcCznWSH+uk9jczslHFcH18kayl6nld/vhtf vvjUsDOKrKJHA== Date: Tue, 5 Dec 2023 14:37:38 -0800 (PST) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: Juergen Gross cc: linux-kernel@vger.kernel.org, Stefano Stabellini , Oleksandr Tyshchenko , xen-devel@lists.xenproject.org, Pry Mar Subject: Re: [PATCH] xen: update PV-device interface headers In-Reply-To: <20231205115121.11627-1-jgross@suse.com> Message-ID: References: <20231205115121.11627-1-jgross@suse.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 14:37:52 -0800 (PST) On Tue, 4 Dec 2023, Juergen Gross wrote: > Update the Xen PV-device interface headers in order to avoid undefined > behavior with flexible arrays being defined with one array element. > > Reported-by: Pry Mar > Signed-off-by: Juergen Gross Acked-by: Stefano Stabellini > --- > include/xen/interface/io/displif.h | 2 +- > include/xen/interface/io/ring.h | 2 +- > include/xen/interface/io/sndif.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/xen/interface/io/displif.h b/include/xen/interface/io/displif.h > index 18417b017869..60e42d3b760e 100644 > --- a/include/xen/interface/io/displif.h > +++ b/include/xen/interface/io/displif.h > @@ -537,7 +537,7 @@ struct xendispl_dbuf_create_req { > > struct xendispl_page_directory { > grant_ref_t gref_dir_next_page; > - grant_ref_t gref[1]; /* Variable length */ > + grant_ref_t gref[]; > }; > > /* > diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h > index ba4c4274b714..4fef1efcdcab 100644 > --- a/include/xen/interface/io/ring.h > +++ b/include/xen/interface/io/ring.h > @@ -95,7 +95,7 @@ struct __name##_sring { \ > RING_IDX req_prod, req_event; \ > RING_IDX rsp_prod, rsp_event; \ > uint8_t __pad[48]; \ > - union __name##_sring_entry ring[1]; /* variable-length */ \ > + union __name##_sring_entry ring[]; \ > }; \ > \ > /* "Front" end's private variables */ \ > diff --git a/include/xen/interface/io/sndif.h b/include/xen/interface/io/sndif.h > index 445657cdb1de..b818517588b5 100644 > --- a/include/xen/interface/io/sndif.h > +++ b/include/xen/interface/io/sndif.h > @@ -659,7 +659,7 @@ struct xensnd_open_req { > > struct xensnd_page_directory { > grant_ref_t gref_dir_next_page; > - grant_ref_t gref[1]; /* Variable length */ > + grant_ref_t gref[]; > }; > > /* > -- > 2.35.3 >