[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 17/18] modules: check arch and block load on mismatch
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v2 17/18] modules: check arch and block load on mismatch |
Date: |
Thu, 10 Jun 2021 14:06:08 +0100 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
On Thu, Jun 10, 2021 at 02:57:21PM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > > for (modlist = modinfo->list; modlist != NULL; modlist =
> > > modlist->next) {
> > > + if (modlist->value->has_arch) {
> > > + if (strcmp(modlist->value->name, module_name) == 0) {
> > > + if (!module_arch ||
> > > + strcmp(modlist->value->arch, module_arch) != 0) {
> > > + return false;
> > > + }
> > > + }
> > > + }
> >
> > I have a little hard time following the code paths, but IIUC, with this
> > change, instead of "module.so" we would have multiple copies of something
> > like "module-$arch.so" ?
>
> Not yet with this series, but easily doable on top of this (see other
> patch series sent today).
>
> > Then we load them all, read their modinfo section
> > and discard the ones with non-matching arch ?
>
> No. There is a utility reading the modinfo section (patch #2), write
> out the info as json (patch #2 has the schema), then qemu will read that
> json file (patch #13) ...
Ah ok, missed that.
Is the JSON file completely static, listing all modules that were built
regardless of whether they are currently installed, or would it need to
be refreshed when installing/uninstalling RPMs with modules ? I would
think we can do the former and simply handle missing modules on disk
fairly easily
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [PATCH v2 08/18] modules: add ccid module annotations, (continued)
- [PATCH v2 08/18] modules: add ccid module annotations, Gerd Hoffmann, 2021/06/10
- [PATCH v2 10/18] modules: add s390x module annotations, Gerd Hoffmann, 2021/06/10
- [PATCH v2 11/18] modules: add block module annotations, Gerd Hoffmann, 2021/06/10
- [PATCH v2 12/18] modules: add module_load_path_init helper, Gerd Hoffmann, 2021/06/10
- [PATCH v2 13/18] modules: load modinfo.json, Gerd Hoffmann, 2021/06/10
- [PATCH v2 14/18] modules: use modinfo for dependencies, Gerd Hoffmann, 2021/06/10
- [PATCH v2 15/18] modules: use modinfo for qom load, Gerd Hoffmann, 2021/06/10
- [PATCH v2 17/18] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/10
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch, Daniel P . Berrangé, 2021/06/10
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/10
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch,
Daniel P . Berrangé <=
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/10
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch, Claudio Fontana, 2021/06/14
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/14
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch, Daniel P . Berrangé, 2021/06/14
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/14
- Re: [PATCH v2 17/18] modules: check arch and block load on mismatch, Claudio Fontana, 2021/06/14
[PATCH v2 16/18] modules: use modinfo for qemu opts load, Gerd Hoffmann, 2021/06/10
[PATCH v2 18/18] [fixup] module_load_modinfo, Gerd Hoffmann, 2021/06/10
Re: [PATCH v2 00/18] modules: add metadata database, Claudio Fontana, 2021/06/10