Re: kmodule: absolute symbols

2017-11-04 Thread Martin Husemann
On Sat, Nov 04, 2017 at 10:13:29AM +, Nick Hudson wrote: >  /* MI-MD interface. */ > -uintptr_t  kobj_sym_lookup(kobj_t, uintptr_t); > +int    kobj_sym_lookup(kobj_t, uintptr_t, uintptr_t *); >  int    kobj_reloc(kobj_t, uintptr_t, const void *, bool, bool); >  int  

Re: kmodule: absolute symbols

2017-11-04 Thread Nick Hudson
Hi, Index: sys/sys/kobj.h === RCS file: /cvsroot/src/sys/sys/kobj.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -p -r1.16 -r1.17 --- sys/sys/kobj.h  13 Aug 2011 21:04:07 -  1.16 +++ sys/sys/kobj.h  3

Re: kmodule: absolute symbols

2017-11-02 Thread Maxime Villard
Le 02/11/2017 à 18:41, Christos Zoulas a écrit : In article , Christos Zoulas wrote: (note: we've always had this issue, so what, no one has ever tried to modload COMPAT_16 on amd64?) I would declare getval_unlocked as taking void *symp, remove the cast in the call, and change: *sym

Re: kmodule: absolute symbols

2017-11-02 Thread Christos Zoulas
In article , Christos Zoulas wrote: >>(note: we've always had this issue, so what, no one has ever tried to >>modload COMPAT_16 on amd64?) > >I would declare getval_unlocked as taking void *symp, remove the cast >in the call, and change: > > *symp = (void *)es; >to > *(void **)symp =

Re: kmodule: absolute symbols

2017-11-02 Thread Christos Zoulas
In article <34ff5b41-51bb-fa19-b893-bbfff43f7...@m00nbsd.net>, Maxime Villard wrote: >Throwing this here in case someone cares. In the kernel module relocator we >don't support absolute symbols coming from the kernel, and it means that we >can't modload a module containing for example: > >

kmodule: absolute symbols

2017-11-02 Thread Maxime Villard
Throwing this here in case someone cares. In the kernel module relocator we don't support absolute symbols coming from the kernel, and it means that we can't modload a module containing for example: extern char sigcode[]; printf("sigcode = %p\n", sigcode); Currently, absolute sym