xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Simon Graham <simon.graham@citrix.com>
Subject: [PATCH] xenalyze: Make sure that the shadow information structs are packed
Date: Thu, 6 Jun 2013 14:30:06 +0100	[thread overview]
Message-ID: <e9dc6fd0b1be1a3b1bc7.1370525406@elijah> (raw)

# HG changeset patch
# User George Dunlap <george.dunlap@eu.citrix.com>
# Date 1370525135 -3600
# Node ID e9dc6fd0b1be1a3b1bc77efca93f71ec2deb2ea3
# Parent  71eeac989efca6a590051edc3dd132df1bd55f7b
xenalyze: Make sure that the shadow information structs are packed

As they are in the hypervisor code, just to make sure everything is
the same.

Spotted-by: Simon Graham <simon.graham@citrix.com>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>

diff --git a/xenalyze.c b/xenalyze.c
--- a/xenalyze.c
+++ b/xenalyze.c
@@ -5618,17 +5618,17 @@ void shadow_emulate_process(struct recor
             unsigned gl1e, write_val;
             unsigned va;
             unsigned flags:29, emulation_count:3;
-        } gpl2;
+        } __attribute__((packed)) gpl2;
         struct {
             unsigned long long gl1e, write_val;
             unsigned va;
             unsigned flags:29, emulation_count:3;
-        } gpl3;
+        } __attribute__((packed)) gpl3;
         struct {
             unsigned long long gl1e, write_val;
             unsigned long long va;
             unsigned flags:29, emulation_count:3;
-        } gpl4;
+        } __attribute__((packed)) gpl4;
     } *r = (typeof(r))ri->d;
  
     union shadow_event sevt = { .event = ri->event };
@@ -5720,12 +5720,12 @@ void shadow_parse_other(struct record_in
            64-bit... :-/ */
         struct {
             unsigned int gfn, va;
-        } gpl2;
+        } __attribute__((packed)) gpl2;
 #endif
         struct {
             unsigned long long gfn;
             unsigned int va;
-        } gpl3;
+        } __attribute__((packed)) gpl3;
         struct {
             unsigned long long gfn, va;
         } gpl4;
@@ -5924,15 +5924,15 @@ void shadow_fixup_process(struct record_
            so put it first for alignment sake. */
         struct {
             unsigned int gl1e, va, flags;
-        } gpl2;
+        } __attribute__((packed)) gpl2;
         struct {
             unsigned long long gl1e;
             unsigned int va, flags;
-        } gpl3;
+        } __attribute__((packed)) gpl3;
         struct {
             unsigned long long gl1e, va;
             unsigned int flags;
-        } gpl4;
+        } __attribute__((packed)) gpl4;
     } *r = (typeof(r))ri->d;
     union shadow_event sevt = { .event = ri->event };
     int rec_gpl = sevt.paging_levels + 2;
@@ -6112,15 +6112,15 @@ void shadow_propagate_process(struct rec
            so put it first for alignment sake. */
         struct {
             unsigned int gl1e, va, flags;
-        } gpl2;
+        } __attribute__((packed)) gpl2;
         struct {
             unsigned long long gl1e;
             unsigned int va, flags;
-        } gpl3;
+        } __attribute__((packed)) gpl3;
         struct {
             unsigned long long gl1e, va;
             unsigned int flags;
-        } gpl4;
+        } __attribute__((packed)) gpl4;
     } *r = (typeof(r))ri->d;
     union shadow_event sevt = { .event = ri->event };
     int rec_gpl = sevt.paging_levels + 2;

                 reply	other threads:[~2013-06-06 13:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9dc6fd0b1be1a3b1bc7.1370525406@elijah \
    --to=george.dunlap@eu.citrix.com \
    --cc=simon.graham@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).