lkml.org 
[lkml]   [1999]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: QUESTION: modifying kernel functions in a running kernel
noupe wrote:
>
> Is it possible to change a function (not a syscall) which is public
> (i.e shown in /proc/ksyms) from a module? Something like changing the
> address to the function so my function will be called instead of the
> public one?
>
> Let's assume that there's a bug in icmp_send() and that you just can't
> (i.e don't want to) reboot the machine (as you have to when installing
> a new kernel) for some reason..
>
> If you don't patch it, your machine will crash, sooner or later.
> If you patch it, you have to reboot the machine.
> But what if you could load a module that exchange the old icmp_send()
> with the one present in your module?
> Instead of rebooting your machine, you could just load a module that
> fixes the problem.
>
> So, my questions are:
> Is this in any way possible to do a thing like this?
> If yes, what techniques could one use? And is it possible
> to change functions that aren't public/exported?
>
> Thanks in advance, noupe.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

I recall reading something about in-memory kernel replacement, which
might solve this problem. I don't know what's the status of this
project, or if it's even active, but I imagine that the running kernel
can be made to have a list of active kernel images so that when a
process makes a transition to kernel mode, the appropiate kernel image
can be paged in. Each task_struct could have a field indicating which
kernel will service it. This would probably lead to the need to have
some structs in fixed memory locations, or something. It would allow
hot-swap kernels ;-D

I think I heard sometime ago that VMS had this capability. Imagine...

[root@pcmaster /root]# uptime
2:04pm up 3425 days, 3:50, 1 user, load average: 0.07, 0.12, 0.18

Does anybody know or have heard anything about this project?

--
Jorge Gonzalez <jorgegv@icai.upco.es> -o)
ICAI - Universidad Pontificia Comillas /\\
Administrador de Sistemas _\_v

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.053 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site