Re: [RFC v2 0/7] linux: add linker tables

From: Luis R. Rodriguez
Date: Fri Feb 19 2016 - 16:19:57 EST


On Fri, Feb 19, 2016 at 12:16:29PM -0800, H. Peter Anvin wrote:
> On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote:
> > This is my v2 of the original linker table work [0], now with
> > six proof of concepts ports of existing code using custom section
> > with custom linker script modifications:
> >
> > * DEFINE_LINKTABLE_TEXT(char, kprobes);
> > * DEFINE_LINKTABLE_DATA(struct jump_entry, __jump_table);
> > * DEFINE_LINKTABLE_DATA(struct _ddebug, __verbose);
> > * DEFINE_LINKTABLE_RO(struct builtin_fw, builtin_fw);
> > * DEFINE_LINKTABLE_INIT(struct x86_init_fn, x86_init_fns);
> > * DEFINE_LINKTABLE_INIT_DATA(unsigned long, _kprobe_blacklist);
> >
> > I've tested all except jump tables, I'd appreaciate some help with that.
> >
>
> We should add support for read-mostly, probably.

Sure, any candidate in mind? I actually don't see any hacks built
on top of READ_MOSTLY_DATA include/asm-generic/vmlinux.lds.h so
pointers appreciated for a case I could try.

> In fact, some of these probably *are* read-mostly.

To avoid regressions I made sure to use the same exact section that
these original solutions came from, do we want to move some? If so
I think perhaps that's best done as a separate atomic patch and
it may be easier to read and review once ported on linker tables?

Luis