All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kvm@vger.kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	linux-kernel@vger.kernel.org,
	"Roman Kagan" <rkagan@virtuozzo.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"Stephen Hemminger" <sthemmin@microsoft.com>,
	x86@kernel.org,
	"Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>,
	"Nadav Amit" <nadav.amit@gmail.com>
Subject: Re: [PATCH] x86/hyper-v: define structures from TLFS as packed
Date: Fri, 30 Nov 2018 13:49:52 +0100	[thread overview]
Message-ID: <87y39awwzz.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1811301320410.17702@nanos.tec.linutronix.de>

Thomas Gleixner <tglx@linutronix.de> writes:

> On Fri, 30 Nov 2018, Vitaly Kuznetsov wrote:
>
>> Subject: x86/hyper-v: define structures from TLFS as packed
>
> Please start the first word after the prefix colon with an uppercase
> letter. Also structures from TLFS doesn't make sense to me. Something like
> this:
>
> Subject: x86/hyper-v: Mark TLFS structures packed
>
>> Without 'packed' compiler is free to add optimization paddings and re-order
>> structure fields for randomization/optimization. And structures from
>
> s/And/As/ ?
>
>> hyperv-tlfs.h are used for hypervisor-guest communication, we need to
>> ultimately forbid such practices.
>
> That whole paragraph reads a bit strange. Something like:
>
>   The TLFS structures are used for hypervisor-guest communication and must
>   exactly meet the specification.
>
>   Compilers can add alignment padding to structures or reorder struct
>   members for randomization and optimization, which would break the
>   hypervisor ABI.
>
>   Mark the structures as packed to prevent this.
>
> Hmm?

Sure, will do v2!

>
>> Suggested-by: Nadav Amit <nadav.amit@gmail.com>
>> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
>
> Other than that: Acked-by: Thomas Gleixner <tglx@linutronix.de>

Thanks!

-- 
Vitaly

  reply	other threads:[~2018-11-30 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 12:15 [PATCH] x86/hyper-v: define structures from TLFS as packed Vitaly Kuznetsov
2018-11-30 12:34 ` Thomas Gleixner
2018-11-30 12:49   ` Vitaly Kuznetsov [this message]
2018-11-30 13:11 ` Roman Kagan
2018-11-30 13:38   ` Thomas Gleixner
2018-11-30 13:44   ` Vitaly Kuznetsov
2018-11-30 14:26     ` Roman Kagan
2018-11-30 15:10       ` Vitaly Kuznetsov

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=87y39awwzz.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=Michael.H.Kelley@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kvm@vger.kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nadav.amit@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=rkagan@virtuozzo.com \
    --cc=rkrcmar@redhat.com \
    --cc=sthemmin@microsoft.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.