[lkml]   [1999]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: linux-ipsec: valid module function pointer?
On Fri, Sep 17, 1999 at 04:21:44PM -0400, Richard Guy Briggs wrote:
> Can anyone suggest a way to test a module function pointer for
> validity? The problem is that we currently save pointers to kernel
> space funciton pointers which might go away if a pcmcia card is
> removed. Is there a way to test if the function pointer belongs to a
> module which is still loaded?

No, you don't.

Counter example: Something is unloaded, and after a while, something
else is loaded into same memory area.

Now how you know that the pointer is valid ?
I would say: you don't.

A way out could be eternally growing array of pointers, which may then
latter be removoked by writing a NULL back into place at module unload.
... but it would be eternally growing non-swappable array... Not good.

You must find some other approach. What is the original problem, which
is now "solved" with cached function pointers ?

> slainte mhath, RGB
> - --
> Richard Guy Briggs -- PGP key available Auto-Free Ottawa! Canada
> <> </>
> Prevent Internet Wiretapping! -- FreeS/WAN:<>

/Matti Aarnio <>

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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