[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: |
Gerd Hoffmann |
Subject: |
Re: [PATCH v2 17/18] modules: check arch and block load on mismatch |
Date: |
Thu, 10 Jun 2021 14:57:21 +0200 |
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) ...
> for arch specific modules. That would let us load only the modules we know
> are applicable for the system target arch and not need this post-load
> filtering from metadata.
... so it's pre-load filtering, not post-load.
take care,
Gerd
- [PATCH v2 09/18] modules: add ui module annotations, (continued)
- [PATCH v2 09/18] modules: add ui module annotations, Gerd Hoffmann, 2021/06/10
- [PATCH v2 08/18] modules: add ccid module annotations, Gerd Hoffmann, 2021/06/10
- [PATCH v2 11/18] modules: add block module annotations, Gerd Hoffmann, 2021/06/10
- [PATCH v2 10/18] modules: add s390x module annotations, Gerd Hoffmann, 2021/06/10
- [PATCH v2 13/18] modules: load modinfo.json, Gerd Hoffmann, 2021/06/10
- [PATCH v2 12/18] modules: add module_load_path_init helper, 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 <=
- 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, 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