On Thu, Mar 17, 2022 at 02:26:50PM +0100, Jan Beulich wrote:
> On 17.03.2022 12:08, Roger Pau Monne wrote:
> > Track whether symbols belong to ignored sections in order to avoid
> > applying relocations referencing those symbols. The address of such
> > symbols won't be resolved and thus the relocation will likely fail or
> > write garbage to the destination.
> > 
> > Return an error in that case, as leaving unresolved relocations would
> > lead to malfunctioning payload code.
> > 
> > Signed-off-by: Roger Pau Monné <roger....@citrix.com>
> 
> Reviewed-by: Jan Beulich <jbeul...@suse.com>
> with one nit (which can likely be addressed while committing):
> 
> > --- a/xen/arch/arm/arm32/livepatch.c
> > +++ b/xen/arch/arm/arm32/livepatch.c
> > @@ -272,6 +272,13 @@ int arch_livepatch_perform(struct livepatch_elf *elf,
> >                     elf->name, symndx);
> >              return -EINVAL;
> >          }
> > +        else if ( elf->sym[symndx].ignored )
> > +        {
> > +            printk(XENLOG_ERR LIVEPATCH
> > +                    "%s: Relocation against ignored symbol %s cannot be 
> > resolved\n",
> > +                    elf->name, elf->sym[symndx].name);
> 
> Indentation here (and in the other two instances mirroring this)
> is off by one.

Oh, thanks, sorry for not noticing.

Roger.

Reply via email to