[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading functio
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function |
Date: |
Thu, 12 Sep 2013 13:44:59 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Sep 12, 2013 at 05:59:30AM -0600, Eric Blake wrote:
> On 09/11/2013 11:36 PM, Michael Tokarev wrote:
> >
> > A solution which I proposed at the very beginning -- to export
> > a "hashed" init function from modules, and call it from the
> > main executable. Like, instead of, say, qemu_module_init(),
> > call qemu_module_init_0xdeadbeaf(), where 0xdeadbeaf is a
> > hash of some build-dependent value. This should be enough
> > to keep it going.
>
> And of course, since we store sources in git, you already have such a
> hash value at your disposal:
> $CC -DBUILD_HASH=$(git rev-parse HEAD) ...
> coupled with
> glue(qemu_module_init_, BUILD_HASH)
> where the only trick is to figure out how to bake in a hash when
> building from a released tarball rather than git.
IMHO we want this to change any time you do './configure', so I would
not tie this to git hash - we don't want all users of particular
release tar.gz to have the same hash regardless of configure options.
We want a situation where any time a distro builds an RPM or equiv,
a new hash is used. So to me generating it in 'configure' seems like
a reasonable place.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
- Re: [Qemu-devel] [PATCH v6 3/8] Makefile: introduce common-obj-m and block-obj-m for DSO, (continued)
- [Qemu-devel] [PATCH v6 4/8] module: implement module loading function, Fam Zheng, 2013/09/11
- Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function, Daniel P. Berrange, 2013/09/11
- Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function, Alex Bligh, 2013/09/11
- Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function, Richard Henderson, 2013/09/11
- Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function, Fam Zheng, 2013/09/11
- Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function, Michael Tokarev, 2013/09/12
- Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function, Daniel P. Berrange, 2013/09/12
- Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function, Eric Blake, 2013/09/12
- Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function,
Daniel P. Berrange <=
[Qemu-devel] [PATCH v6 5/8] configure: introduce --enable-modules, Fam Zheng, 2013/09/11
[Qemu-devel] [PATCH v6 6/8] Makefile: install modules with "make install", Fam Zheng, 2013/09/11
[Qemu-devel] [PATCH v6 7/8] .gitignore: ignore module related files (dll, so, mo), Fam Zheng, 2013/09/11
[Qemu-devel] [PATCH v6 8/8] block: convert block drivers linked with libs to modules, Fam Zheng, 2013/09/11