Re: [PATCH] x86/hyper-v: define structures from TLFS as packed

2018-11-30 Thread Vitaly Kuznetsov
Roman Kagan writes: > On Fri, Nov 30, 2018 at 02:44:54PM +0100, Vitaly Kuznetsov wrote: > >> I also checked this patch before sending out, WS2016 guest boots without >> issues. Any particular places you're worried about? > > It's Linux guests on Hyper-V that need to be checked. > That's exactly

Re: [PATCH] x86/hyper-v: define structures from TLFS as packed

2018-11-30 Thread Roman Kagan
On Fri, Nov 30, 2018 at 02:44:54PM +0100, Vitaly Kuznetsov wrote: > Roman Kagan writes: > > > On Fri, Nov 30, 2018 at 01:15:11PM +0100, Vitaly Kuznetsov wrote: > >> Without 'packed' compiler is free to add optimization paddings and re-order > >> structure fields for randomization/optimization. An

Re: [PATCH] x86/hyper-v: define structures from TLFS as packed

2018-11-30 Thread Vitaly Kuznetsov
Roman Kagan writes: > On Fri, Nov 30, 2018 at 01:15:11PM +0100, Vitaly Kuznetsov wrote: >> Without 'packed' compiler is free to add optimization paddings and re-order >> structure fields for randomization/optimization. And structures from >> hyperv-tlfs.h are used for hypervisor-guest communicati

Re: [PATCH] x86/hyper-v: define structures from TLFS as packed

2018-11-30 Thread Thomas Gleixner
On Fri, 30 Nov 2018, Roman Kagan wrote: > On Fri, Nov 30, 2018 at 01:15:11PM +0100, Vitaly Kuznetsov wrote: > > Without 'packed' compiler is free to add optimization paddings and re-order > > structure fields for randomization/optimization. And structures from > > hyperv-tlfs.h are used for hyperv

Re: [PATCH] x86/hyper-v: define structures from TLFS as packed

2018-11-30 Thread Roman Kagan
On Fri, Nov 30, 2018 at 01:15:11PM +0100, Vitaly Kuznetsov wrote: > Without 'packed' compiler is free to add optimization paddings and re-order > structure fields for randomization/optimization. And structures from > hyperv-tlfs.h are used for hypervisor-guest communication, we need to > ultimately

Re: [PATCH] x86/hyper-v: define structures from TLFS as packed

2018-11-30 Thread Vitaly Kuznetsov
Thomas Gleixner 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: > >

Re: [PATCH] x86/hyper-v: define structures from TLFS as packed

2018-11-30 Thread Thomas Gleixner
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 struc

[PATCH] x86/hyper-v: define structures from TLFS as packed

2018-11-30 Thread Vitaly Kuznetsov
Without 'packed' compiler is free to add optimization paddings and re-order structure fields for randomization/optimization. And structures from hyperv-tlfs.h are used for hypervisor-guest communication, we need to ultimately forbid such practices. Suggested-by: Nadav Amit Signed-off-by: Vitaly K