Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1560598

Re: arm: Add livepatch arch specific code

From Miroslav Benes <mbenes@suse.cz>
Newsgroups linux.kernel
Subject Re: arm: Add livepatch arch specific code
Date 2017-01-17 15:00 +0100
Message-ID <t0CsO-7MA-17@gated-at.bofh.it> (permalink)
References <sLrpE-4T9-11@gated-at.bofh.it> <sLrpE-4T9-27@gated-at.bofh.it> <t0iDM-30L-19@gated-at.bofh.it> <t0pOV-8cy-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> > But apply_relocate_add() is not implemented on arm yet. I guess it would
> > nice to have it... otherwise we could get to an unpleasant situation.
> > Livepatch module can rely on its livepatching relocations (that is, there
> > are some). apply_relocate_add() returns 0 on arm, so everything seems to
> > be nice and then boom some time later.
> 
> Doesn't it return -ENOEXEC? MODULES_USE_ELF_RELA is not defined
> on arm, I think (see moduleloader.h).

You're right. It confused me too.
 
> > The question is what happens with normal modules. There are no SHT_RELA
> > records probably.
> 
> For arm, I think there are only SHT_REL relocation sections
> (MODULES_USE_ELF_REL is set instead of MODULES_USE_ELF_RELA), so
> during apply_relocations() in load_module(), only apply_relocate()
> should be called, and not apply_relocate_add().

True.

> Hm, I guess that means if we want livepatch support for the
> architectures that don't support RELA relocations, we would have to
> check if the section is SHT_REL or SHT_RELA before calling the right
> apply_relocate* function.

Agreed.

Miroslav

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: arm: Add livepatch arch specific code Jessica Yu <jeyu@redhat.com> - 2017-01-17 01:30 +0100
  Re: arm: Add livepatch arch specific code Jessica Yu <jeyu@redhat.com> - 2017-01-17 03:30 +0100
  Re: arm: Add livepatch arch specific code Miroslav Benes <mbenes@suse.cz> - 2017-01-17 15:00 +0100

csiph-web