[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [livepatch-build-tools part3 1/3] create-diff-object: Do not create empty .livepatch.funcs section
> On 29. Apr 2019, at 16:37, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> wrote: > > On 4/25/19 5:51 AM, Konrad Rzeszutek Wilk wrote: >> On Tue, Apr 16, 2019 at 12:22:39PM +0000, Pawel Wieczorkiewicz wrote: >>> When there is no changed function in the generated payload, do not >>> create an empty .livepatch.funcs section. Hypervisor code considers >>> such payloads as broken and rejects to load them. >>> >>> Such payloads without any changed functions may appear when only >>> hooks are specified. >> Ross, I am going to push this in next week unless you have other thoughts? > Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> > > This code change looks OK to me. However: > Thank you for reviewing. > 1) I think that the hypervisor should treat an empty .livepatch.funcs section > the same as it treats a non-present .livepatch.funcs section (i.e. it allows > it) which would make this change unnecessary. > I do not have a strong opinion here, but it felt unnecessary (and a bit confusing) to generate an empty section. Also I did not want to touch hypervisor code for this. > 2) Unless I'm being stupid, I don't see how this change would work anyway. > Surely this code at the start of prepare_payload() would fail if the section > were missing? > > sec = livepatch_elf_sec_by_name(elf, ELF_LIVEPATCH_FUNC); > ASSERT(sec); > if ( !section_ok(elf, sec, sizeof(*payload->funcs)) ) > return -EINVAL; > In my soon-to-be-upstreamed backlog I have the following commit: livepatch: Do not enforce ELF_LIVEPATCH_FUNC section presence Where I actually make use of this new functionality. The main idea behind this change, was to enable generation of hooks-only hotpatch modules (i.e. modules that does not patch anything, just trigger actions). > Regards, > -- > Ross Lagerwall Best Regards, Pawel Wieczorkiewicz Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich Ust-ID: DE 289 237 879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |