Date: Sun, 6 Feb 2005 12:50:26 +0000 (GMT) From: Robert Watson <rwatson@FreeBSD.org> To: Yan Yu <yanyu@CS.UCLA.EDU> Cc: freebsd-hackers@freebsd.org Subject: Re: falloc() Message-ID: <Pine.NEB.3.96L.1050206124427.55544A-100000@fledge.watson.org> In-Reply-To: <Pine.GSO.4.58.0502052156360.26089@panther.cs.ucla.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 5 Feb 2005, Yan Yu wrote: > I am wondering if there is a way to use kernel loadable module to > replace the original falloc() (kern/kern_descrip.c) in the system. I > know how to do this if the funciton to be replaced is some system call > function or ufs* operatio ( i could just change the symbol table which > holds these function pointers),. but i could not find the symbol table > which holds the falloc() function pointer... falloc() isn't considered a "pluggable" kernel API, that is to say, we've not engineered FreeBSD with the intent that it be replaced at run-time. As such, to get falloc() replaced on your out-of-the-box FreeBSD install, you'll need to modify the kernel linking. falloc is non-static, so it should be an exported symbol from kern_descrip.o and in theory exposed to modules -- however, replugging the current reference in kern_descript.o might be the hard one to modify. If you don't mind my asking, what motivates you to replace falloc()? Robert N M Watson
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1050206124427.55544A-100000>