Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Weak x86 aliases



On Fri, Dec 28, 2018 at 07:36:12PM +0530, Cherry G.Mathew wrote:
> > There is a check in kobj_sym_lookup():
> >
> > 926 	case STB_WEAK:
> > 927 		kobj_error(ko, "weak symbols not supported");
> > 928 		return EINVAL;
> >
> > To resolve correctly I guess we need to take the strongest of the
> > duplicated symbols.
> >
> 
> I'll look into this unless someone else beats me to it - but for now I'm
> ok for the specific change that breaks things for NVMM to be rolled
> back.

I am not sure I like the idea of weak symbols in the kernel.

I would consider either runtime patching (since this is a one time only
change at early boot time) or explicitly using function pointers.

If you add support for weak symbols to the kobj loader, you will have to also
manage re-resolving them after any module unloads, plus finding the ones that
have been resolved to symbols provided by the module you are unloading.

Martin


Home | Main Index | Thread Index | Old Index