From patchwork Fri Feb 19 12:09:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 8360281 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5A4A19F372 for ; Fri, 19 Feb 2016 12:09:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4A4B2041A for ; Fri, 19 Feb 2016 12:09:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA51E2040F for ; Fri, 19 Feb 2016 12:09:49 +0000 (UTC) Received: from localhost ([::1]:51443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWjsb-0006xL-0G for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Feb 2016 07:09:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWjsQ-0006wv-1c for qemu-devel@nongnu.org; Fri, 19 Feb 2016 07:09:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWjsP-0005gO-6c for qemu-devel@nongnu.org; Fri, 19 Feb 2016 07:09:37 -0500 Received: from mail-vk0-x233.google.com ([2607:f8b0:400c:c05::233]:33827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWjsO-0005gG-Vd for qemu-devel@nongnu.org; Fri, 19 Feb 2016 07:09:37 -0500 Received: by mail-vk0-x233.google.com with SMTP id e185so71983327vkb.1 for ; Fri, 19 Feb 2016 04:09:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=pTT63GZtZdlIXzUY8QzBLBuSbpAVK1UpxQuYaDP6shI=; b=Z6gMMivjM6auN1ZyPFqKAcG41Lj2uQbRVuseeLJ9yhv3ZipBXWHLIc6hH4tGifd3MY awuel8QBm68aam5iZQZSwE+LWvjqPKr4rYb4f0fsBQl0NPfdrzUlLVE0cTa/fSW0A+B6 kQarVySoxXypvZQ62ornYx8/V1RXT2TS4dm50= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=pTT63GZtZdlIXzUY8QzBLBuSbpAVK1UpxQuYaDP6shI=; b=ASYqj4r1K/4mhyt9v63BwLB09V0q9WeLhRIDdVIYqHsWwlUqQ4BFLfsUvBdbK7nHVf HO9P3EC+IiyTvcqZMtDrzjp/kfN2HKe0LUWQVLRO65bacBoj/F+MoHJfMMn0/iB7wMhL CVEc8jI5bi0liVqz5vUyeo2FVajBJCHn/GaIav3Qo5CtaMaifw/3w1uzvT1qgEXwkzka JcaH6DR2QqckMY2Nxs4jSsneKYr+G8hubdFCDbIuBPWaWMkGsuy5xXwlkP88k2cdVVv9 oT6LYV4KAKlya3j6J2l9wOYsND+LQahomEKejk7tyUdh8VzCjqzLiFLMF/EY5QBO4x/m yXjQ== X-Gm-Message-State: AG10YOS+rn3xWcMI20RZjH+JbXHZ/22tsD+3wnBZF4F70ixffBldWw1Yd1kn2xbWlQPZ1GAhKai6H/r6EMuHbnbd X-Received: by 10.31.131.199 with SMTP id f190mr10611723vkd.90.1455883776603; Fri, 19 Feb 2016 04:09:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.56.216 with HTTP; Fri, 19 Feb 2016 04:09:17 -0800 (PST) In-Reply-To: <1455868726-26350-1-git-send-email-mst@redhat.com> References: <1455868726-26350-1-git-send-email-mst@redhat.com> From: Peter Maydell Date: Fri, 19 Feb 2016 12:09:17 +0000 Message-ID: To: "Michael S. Tsirkin" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::233 Cc: "J. Kiszka" , Jason Wang , QEMU Developers , Samuel Thibault Subject: Re: [Qemu-devel] [PULL 00/13] vhost, virtio, pci, pxe X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 19 February 2016 at 08:00, Michael S. Tsirkin wrote: > The following changes since commit a5af12871fd4601c44f08d9e49131e9ca13ef102: > > Merge remote-tracking branch 'remotes/sstabellini/tags/xen-2016-02-12' into staging (2016-02-12 17:36:12 +0000) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream > > for you to fetch changes up to a28c393cc261afeb4863b05d7c33c2a5fc55ef38: > > tests/vhost-user-bridge: add scattering of incoming packets (2016-02-18 17:42:05 +0200) > > ---------------------------------------------------------------- > vhost, virtio, pci, pxe > > Fixes all over the place. > New tests for pxe. > > Signed-off-by: Michael S. Tsirkin Hi. With this pullreq I now see new errors in the clang runtime sanitizer config: GTESTER check-qtest-i386 /home/petmay01/linaro/qemu-for-merges/slirp/slirp.c:751:13: runtime error: index 1562 out of bounds for type 'char [1]' /home/petmay01/linaro/qemu-for-merges/slirp/slirp.c:751:13: runtime error: index 1562 out of bounds for type 'char [1]' I think these are "we started testing something new and so the sanitizer now warns about an old problem" issues. Still, it would be nice to avoid introducing new sanitizer complaints into the 'make check' run if we can. We can do that, I think, by updating slirp to use C99 flexible arrays: [compile-tested, but need to audit the slirp code to check that it doesn't care that m_dat and m_ext no longer have the same offset within the struct... I'm assuming we don't care about the fact we've used an extra 4 bytes of struct.] However that then needs us to add a new disable-warning flag -Wno-gnu-variable-sized-type-not-at-end, because slirp.h uses these 'struct mbuf's embedded inside another structure, and that is a GNU extension, which clang will default to complaining about. So I guess I'll apply this pullreq for now and we can look at improving the SLIRP code to be sanitizer-clean later. thanks -- PMM diff --git a/slirp/mbuf.h b/slirp/mbuf.h index 38fedf4..ef5a4f7 100644 --- a/slirp/mbuf.h +++ b/slirp/mbuf.h @@ -81,11 +81,9 @@ struct mbuf { Slirp *slirp; bool resolution_requested; uint64_t expiration_date; + char *m_ext; /* start of dynamic buffer area, must be last element */ - union { - char m_dat[1]; /* ANSI don't like 0 sized arrays */ - char *m_ext; - }; + char m_dat[]; }; #define ifq_prev m_prev