lkml.org 
[lkml]   [2020]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/7] livepatch: Apply vmlinux-specific KLP relocations early
On Wed, Apr 15, 2020 at 04:34:26PM +0200, Miroslav Benes wrote:
> Just a nit below
>
> > diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
> > index e894e74905f3..d9e9b76f6054 100644
> > --- a/include/linux/livepatch.h
> > +++ b/include/linux/livepatch.h
> > @@ -234,14 +234,30 @@ void klp_shadow_free_all(unsigned long id, klp_shadow_dtor_t dtor);
> > struct klp_state *klp_get_state(struct klp_patch *patch, unsigned long id);
> > struct klp_state *klp_get_prev_state(unsigned long id);
> >
> > +int klp_write_relocations(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
> > + const char *shstrtab, const char *strtab,
> > + unsigned int symindex, struct module *pmod,
> > + const char *objname);
> > +
> > #else /* !CONFIG_LIVEPATCH */
> >
> > +struct klp_object;
> > +
>
> Is the forward declaration necessary here?

Apparently not, that was leftover from a previous iteration...

> > static inline int klp_module_coming(struct module *mod) { return 0; }
> > static inline void klp_module_going(struct module *mod) {}
> > static inline bool klp_patch_pending(struct task_struct *task) { return false; }
> > static inline void klp_update_patch_state(struct task_struct *task) {}
> > static inline void klp_copy_process(struct task_struct *child) {}
> >
> > +static inline
> > +int klp_write_relocations(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
> > + const char *shstrtab, const char *strtab,
> > + unsigned int symindex, struct module *pmod,
> > + const char *objname)
> > +{
> > + return 0;
> > +}
> > +
> > #endif /* CONFIG_LIVEPATCH */
>
> Miroslav
>

--
Josh

\
 
 \ /
  Last update: 2020-04-15 18:32    [W:0.085 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site