lkml.org 
[lkml]   [2002]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH][RFC] __init and friends support for loadable modules
Date
On Wed, 8 May 2002 14:29:33 +0400, 
Andrey Panin <pazke@orbita1.ru> wrote:
>attached patch adds support for freeing .init sections of loadable modules
>after init_module() function exits. Modutils have support for this since 19=
>98,
>but kernel support didn't exist.

The main reason I have not done this myself is the interaction between
freeing code areas and the exception and unwind tables. When you free
code, you should remove or nullify the related unwind and exception
entries. Another module could be loaded into the area that used to
contain init code and it would then be mapped by the first module's
tables, oops.

Fixing exception tables is relatively easy, search_exception_table()
can check if the address fits within the module (taking runsize into
account) before running the exception table. Unwind data is harder, it
is all architecture specific. Your patch will not be complete without
fixing all tables that point at module code. Don't forget the MIPS DBE
table.

Rusty and I plan to completely redo module loading and unloading and
the corresponding modutils support in 2.5. That will (hopefully)
include additional features such as per-node replication of pure module
areas for NUMA boxes. For me, the ability to free .init text and data
from modules falls into the category of "would be nice but the gain is
not worth the bother just for 2.4".

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

\
 
 \ /
  Last update: 2005-03-22 13:25    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site