From nobody Tue Oct 28 12:14:08 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515432868635312.2375600019068; Mon, 8 Jan 2018 09:34:28 -0800 (PST) Received: from localhost ([::1]:46993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYbJb-0003Gc-Pk for importer@patchew.org; Mon, 08 Jan 2018 12:34:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYbEa-00080y-1d for qemu-devel@nongnu.org; Mon, 08 Jan 2018 12:29:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYbEZ-0008L4-4Y for qemu-devel@nongnu.org; Mon, 08 Jan 2018 12:29:16 -0500 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:42847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYbEZ-0008KV-0L for qemu-devel@nongnu.org; Mon, 08 Jan 2018 12:29:15 -0500 Received: by mail-qk0-x243.google.com with SMTP id d202so15091031qkc.9 for ; Mon, 08 Jan 2018 09:29:14 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id j127sm787922qkd.88.2018.01.08.09.29.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jan 2018 09:29:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zK0xYjKtPdBGHDdAS5b19DY5vVhlqFJgNyVJCGi58Hg=; b=qfXobxQabOh79+Ofge0isQkxVdcltvEnUSewy/WOiPAtzICzsPbhSXU9a8ARm1pkCC nEZIXi6xNpWq0Mq7klrT39fTf+7e1rDOsFSWKQRzChFX6lSTcYQw8jDA1rYM7df5Ffcs WlKAxMTzTr++Qx4i3MAK2uzYhHqtinpkP5TU5khwBvC/6tjiHAopWecK1Gzyz84u4Juv V+44kXfDxHn8vJVeiQOTywS28SngG/jbzmIC08U3mt/fkj51w1dKZSvLcrJ9C7jLXoeR zSon/Znmvvp4ENPVcsQqubzi3IJiZ0s4otXmH696mUMf3JEnLgToWviom3I1hp+etIFT N29g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zK0xYjKtPdBGHDdAS5b19DY5vVhlqFJgNyVJCGi58Hg=; b=EDYXDK4f34QPUsApHCYw4thCQ6SzxMynqAXgBkd1OffhFK9R7TssjuK1KIX+oNYw1n M+Vptx9YtHi4RtGc3uyuu65opjxBAP0+0aeCDpOoZVuSTPz92lndbEVWnbiqDs7VVs51 H8f24HlMVPBtsUF/lgBKRp3eGskrwATOGFlHOwmWO2mKeSRkAGm4qcDQnjiwWOaQ4AlQ Um4kkt6gP1i4vcZyotp3+rF4loz3ObT3Km5Ma9jATXf2zS811JMrramy6zlvziLIV5BF B7vSzgwxmuCTzgYvTWNwurqxu+701L40H7RrFnznunBInDQjvtD23WbqVExYh05e9uTH lBFA== X-Gm-Message-State: AKwxytfCHpK14gw1cI5QWj7gCsktmuekrrHuBEQ+VHBgYNpiLsBp54aE 2TIxnYz94e5Rd8kEXPIslww= X-Google-Smtp-Source: ACJfBot0mHd2T/UM9gwMlwN1vhtsGgdInO3OENo7BKMleIcOwWa9RFaUCS+k2psLEn+7tp4ghCiwIg== X-Received: by 10.55.212.129 with SMTP id s1mr17924708qks.44.1515432554433; Mon, 08 Jan 2018 09:29:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Samuel Thibault , Jan Kiszka , "Michael S . Tsirkin" , Paolo Bonzini , Eric Blake , Thomas Huth Date: Mon, 8 Jan 2018 14:28:53 -0300 Message-Id: <20180108172904.8772-2-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180108172904.8772-1-f4bug@amsat.org> References: <20180108172904.8772-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::243 Subject: [Qemu-devel] [PATCH 01/12] slirp: remove QEMU_PACKED from structures with don't require it X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 theses structures are not serialized and often store host pointers. slirp/ip_input.c:159:43: warning: taking address of packed member 'ip_lin= k' of class or structure 'ipq' may result in an unaligned pointer value [-Waddress-of-packed-member] for (l =3D slirp->ipq.ip_link.next; l !=3D &slirp->ipq.ip= _link; ^~~~~~~~~~~~~~~~~~ Reported-by: John Arbuckle Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- slirp/ip.h | 10 +++++----- slirp/slirp.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/slirp/ip.h b/slirp/ip.h index 1df6723357..e29ccd3c9f 100644 --- a/slirp/ip.h +++ b/slirp/ip.h @@ -179,11 +179,11 @@ struct ip_timestamp { struct mbuf_ptr { struct mbuf *mptr; uint32_t dummy; -} QEMU_PACKED; +}; #else struct mbuf_ptr { struct mbuf *mptr; -} QEMU_PACKED; +}; #endif struct qlink { void *next, *prev; @@ -199,7 +199,7 @@ struct ipovly { uint16_t ih_len; /* protocol length */ struct in_addr ih_src; /* source internet address */ struct in_addr ih_dst; /* destination internet address */ -} QEMU_PACKED; +}; =20 /* * Ip reassembly queue structure. Each fragment @@ -215,7 +215,7 @@ struct ipq { uint8_t ipq_p; /* protocol of this fragment */ uint16_t ipq_id; /* sequence id for reassembly */ struct in_addr ipq_src,ipq_dst; -} QEMU_PACKED; +}; =20 /* * Ip header, when holding a fragment. @@ -225,7 +225,7 @@ struct ipq { struct ipasfrag { struct qlink ipf_link; struct ip ipf_ip; -} QEMU_PACKED; +}; =20 #define ipf_off ipf_ip.ip_off #define ipf_tos ipf_ip.ip_tos diff --git a/slirp/slirp.h b/slirp/slirp.h index 898ec9516d..9f29b52610 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -136,7 +136,7 @@ bool arp_table_search(Slirp *slirp, uint32_t ip_addr, struct ndpentry { unsigned char eth_addr[ETH_ALEN]; /* sender hardware address */ struct in6_addr ip_addr; /* sender IP address */ -} QEMU_PACKED; +}; =20 #define NDP_TABLE_SIZE 16 =20 --=20 2.15.1