From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Mon, 2 Jun 2014 20:57:46 -0700 Subject: EXPORT_SYMBOL and rebinding functions In-Reply-To: <1401766156.2748.6.camel@mwynne-laptop> References: <1401766156.2748.6.camel@mwynne-laptop> Message-ID: <20140603035746.GC13130@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, Jun 02, 2014 at 08:29:16PM -0700, Peter Tosh wrote: > Hey guys, > > I have a module which defines a specific print function, and another > module that uses said function. From the first module I have used > EXPORT_SYMBOL(function_1). From within the second module I would like to > rebind that function to another printing function, and once I'm > finished, rebind it back to the original function. Wait, why? Don't have modules messing with the function pointers of other modules, that way lies madness. Or root kits, which honestly, there are better ways of making money if you have Linux kernel skills. don't do this. greg k-h