Date: Wed, 16 Jul 1997 14:41:26 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: smp@csn.net (Steve Passe) Cc: smp@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: self modifying kernel code Message-ID: <199707162141.OAA01599@phaeton.artisoft.com> In-Reply-To: <199707162042.OAA09705@Ilsa.StevesCafe.com> from "Steve Passe" at Jul 16, 97 02:42:55 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> I see the possible usefullness for "self-modifying-code" in several places in > the SMP kernel. [ ... discussion of patch vectors vs. indirected jump tables ... ] > So what is the policy/reality of self-modifying code in the -current source? > The 1st example above can be handled during boot, so I suspect that the > modifications should be easy enough. The second involves modification of the > kernel code space after going multi-user (probaly dozens of times b4 its > finished), I'm not so sure about modifying kernel code-space at that point... > > Comments? Are we assuming that the processors will be Pentium only? The icache is not written back prior to the P5. This takes a significant number of NOP's to flush the pipeline (as discussed in Van Guilluwe's "The Undocumented PC" in the section where he investigates instruction cache depth using self-modifying code). Note that these patches would have to be done for 386/486 in the UP case. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707162141.OAA01599>