Re: [PATCH 3/8] ACPI, x86: Extended error log driver for x86 platform

From: Borislav Petkov
Date: Mon Oct 14 2013 - 13:08:01 EST


On Mon, Oct 14, 2013 at 09:50:00AM -0700, Tony Luck wrote:
> Now load the module with the not-weak definition of the function -
> the module loader would have to go do a relocation fix-up in the base
> kernel to point to this new function. At module unload it would have
> to undo that.

Ok, then. How about a reg/dereg functionality, something like what I did
in drivers/edac/mce_amd.c, near the top? We're basically handing down a
proper function pointer to call and at module unload time we clear it.

Also, those register/unregister functions could be made to return an
errval so that code calling them can handle that gracefully.

Bottom line is, IMO we're much better off having a clearly defined
interface like that instead of exporting a naked function pointer.

Thoughts?

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/