lkml.org 
[lkml]   [2018]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/hyper-v: define structures from TLFS as packed

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?

> 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>

\
 
 \ /
  Last update: 2018-11-30 13:35    [W:0.121 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site