Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-15 Thread Fam Zheng
On Tue, 01/14 15:45, Daniel P. Berrange wrote: > On Tue, Jan 14, 2014 at 04:19:41PM +0100, Paolo Bonzini wrote: > > Il 14/01/2014 15:47, Richard Henderson ha scritto: > > +echo "CONFIG_STAMP=`date +%s`_$$_$RANDOM" >> $config_host_mak > > >>> >> > > >>> >> I really really don't like random numb

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-14 Thread Daniel P. Berrange
On Tue, Jan 14, 2014 at 04:31:00PM +0100, Paolo Bonzini wrote: > Il 14/01/2014 16:25, Peter Maydell ha scritto: > > I definitely think we want at least a basic molly-guard on > > "module not compiled for this qemu"; we need not attempt > > to make it impervious to somebody who's determined to get >

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-14 Thread Daniel P. Berrange
On Tue, Jan 14, 2014 at 04:19:41PM +0100, Paolo Bonzini wrote: > Il 14/01/2014 15:47, Richard Henderson ha scritto: > +echo "CONFIG_STAMP=`date +%s`_$$_$RANDOM" >> $config_host_mak > >>> >> > >>> >> I really really don't like random numbers that make for non-repeatable > >>> >> builds. > >>>

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-14 Thread Richard Henderson
On 01/14/2014 07:31 AM, Paolo Bonzini wrote: > Il 14/01/2014 16:25, Peter Maydell ha scritto: >> I definitely think we want at least a basic molly-guard on >> "module not compiled for this qemu"; we need not attempt >> to make it impervious to somebody who's determined to get >> around it, because

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-14 Thread Paolo Bonzini
Il 14/01/2014 16:25, Peter Maydell ha scritto: > I definitely think we want at least a basic molly-guard on > "module not compiled for this qemu"; we need not attempt > to make it impervious to somebody who's determined to get > around it, because that's impossible. Something like the > git hash /

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-14 Thread Peter Maydell
On 14 January 2014 15:19, Paolo Bonzini wrote: > Il 14/01/2014 15:47, Richard Henderson ha scritto: >> Build systems like we use at Red Hat want to be able to produce bit-for-bit >> identical binaries when given the exact same input. Using random numbers >> during the build process prevents that.

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-14 Thread Paolo Bonzini
Il 14/01/2014 15:47, Richard Henderson ha scritto: +echo "CONFIG_STAMP=`date +%s`_$$_$RANDOM" >> $config_host_mak >>> >> >>> >> I really really don't like random numbers that make for non-repeatable >>> >> builds. >>> >> It's a quality-assurance nightmare. >> > >> > Can you elaborate this,

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-14 Thread Richard Henderson
On 01/13/2014 07:06 PM, Fam Zheng wrote: > On Mon, 01/13 14:15, Richard Henderson wrote: >> On 01/13/2014 08:59 AM, Paolo Bonzini wrote: >>> +echo "CONFIG_STAMP=`date +%s`_$$_$RANDOM" >> $config_host_mak >> >> I really really don't like random numbers that make for non-repeatable >> builds. >> It

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-13 Thread Fam Zheng
On Mon, 01/13 22:05, Peter Maydell wrote: > On 13 January 2014 16:59, Paolo Bonzini wrote: > > From: Fam Zheng > > > > This patch adds loading, stamp checking and initialization of modules. > > > > The init function of dynamic module is no longer directly called as > > __attribute__((constructor)

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-13 Thread Fam Zheng
On Mon, 01/13 22:09, Peter Maydell wrote: > On 13 January 2014 16:59, Paolo Bonzini wrote: > > From: Fam Zheng > > > > This patch adds loading, stamp checking and initialization of modules. > > > > The init function of dynamic module is no longer directly called as > > __attribute__((constructor)

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-13 Thread Fam Zheng
On Mon, 01/13 14:15, Richard Henderson wrote: > On 01/13/2014 08:59 AM, Paolo Bonzini wrote: > > +echo "CONFIG_STAMP=`date +%s`_$$_$RANDOM" >> $config_host_mak > > I really really don't like random numbers that make for non-repeatable builds. > It's a quality-assurance nightmare. Can you elabora

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-13 Thread Richard Henderson
On 01/13/2014 08:59 AM, Paolo Bonzini wrote: > +echo "CONFIG_STAMP=`date +%s`_$$_$RANDOM" >> $config_host_mak I really really don't like random numbers that make for non-repeatable builds. It's a quality-assurance nightmare. If you want a non-random number unique to the build, try git log -n1

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-13 Thread Peter Maydell
On 13 January 2014 16:59, Paolo Bonzini wrote: > From: Fam Zheng > > This patch adds loading, stamp checking and initialization of modules. > > The init function of dynamic module is no longer directly called as > __attribute__((constructor)) in static linked version, it is called > only after pa

Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-13 Thread Peter Maydell
On 13 January 2014 16:59, Paolo Bonzini wrote: > From: Fam Zheng > > This patch adds loading, stamp checking and initialization of modules. > > The init function of dynamic module is no longer directly called as > __attribute__((constructor)) in static linked version, it is called > only after pa

[Qemu-devel] [PATCH v15 6/9] module: implement module loading

2014-01-13 Thread Paolo Bonzini
From: Fam Zheng This patch adds loading, stamp checking and initialization of modules. The init function of dynamic module is no longer directly called as __attribute__((constructor)) in static linked version, it is called only after passed the checking of presense of stamp symbol: qemu_sta