Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-23 Thread Luis R. Rodriguez
On Tue, Feb 23, 2016 at 04:06:55PM -0800, H. Peter Anvin wrote: > On 02/23/2016 03:36 PM, Luis R. Rodriguez wrote: > > > >> 4. the only useful operator on a range is "is address X inside this > >>range"; this operator is likely *not* useful for a table, since

Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-23 Thread H. Peter Anvin
On 02/23/2016 03:36 PM, Luis R. Rodriguez wrote: > >> 4. the only useful operator on a range is "is address X inside this >>range"; this operator is likely *not* useful for a table, since >>if you have to ever invoke it you are probably doing something very >>wrong. > > kprobe uses it

Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-23 Thread Luis R. Rodriguez
On Tue, Feb 23, 2016 at 3:22 PM, H. Peter Anvin wrote: > On 02/23/2016 03:08 PM, Luis R. Rodriguez wrote: >> >> OK yes I see the issue now. I've modified this to use const, and >> retested the kprobe patch and it works well still. kprobe would not >> use LINKTABLE_TEXT, instead it uses its own mac

Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-23 Thread H. Peter Anvin
On 02/23/2016 03:08 PM, Luis R. Rodriguez wrote: > > OK yes I see the issue now. I've modified this to use const, and > retested the kprobe patch and it works well still. kprobe would not > use LINKTABLE_TEXT, instead it uses its own macro, however users of > LINKTABLE_TEXT would then have const d

Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-23 Thread Luis R. Rodriguez
On Fri, Feb 19, 2016 at 1:48 PM, Luis R. Rodriguez wrote: > On Fri, Feb 19, 2016 at 12:25:55PM -0800, H. Peter Anvin wrote: >> On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote: >> > + >> > +/** >> > + * DOC: Regular linker linker table constructors >> > + * >> > + * Regular constructors are expecte

Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-19 Thread Luis R. Rodriguez
On Fri, Feb 19, 2016 at 12:25:55PM -0800, H. Peter Anvin wrote: > On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote: > > + > > +/** > > + * DOC: Regular linker linker table constructors > > + * > > + * Regular constructors are expected to be used for valid linker table > > entries. > > + * Valid use

Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-19 Thread Luis R. Rodriguez
On Fri, Feb 19, 2016 at 12:33:27PM -0800, H. Peter Anvin wrote: > On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote: > > +/** > > + * LINKTABLE_RUN_ERR - run each linker table entry func and return error > > if any > > + * > > + * @tbl: linker table > > + * @func: structure name for the function nam

Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-19 Thread H. Peter Anvin
On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote: > +/** > + * LINKTABLE_RUN_ERR - run each linker table entry func and return error if > any > + * > + * @tbl: linker table > + * @func: structure name for the function name we want to call. > + * @args...: arguments to pass to func > + * > + * Examp

Re: [Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-19 Thread H. Peter Anvin
On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote: > + > +/** > + * DOC: Regular linker linker table constructors > + * > + * Regular constructors are expected to be used for valid linker table > entries. > + * Valid uses of weak entries other than the beginning and is currently > + * untested but s

[Xen-devel] [RFC v2 2/7] tables.h: add linker table support

2016-02-19 Thread Luis R. Rodriguez
A linker table is a data structure that is stitched together from items in multiple object files. Linux has historically implicitly used linker tables for ages, however they were all built in an adhoc manner which requires linker script modifications, per architecture. This adds a general linker ta