Messages in this thread | | | Date | Sat, 18 Sep 1999 00:10:21 +0300 | From | Matti Aarnio <> | Subject | Re: 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 > <http://www.conscoop.ottawa.on.ca/rgb/> </www.flora.org/afo/> > Prevent Internet Wiretapping! -- FreeS/WAN:<www.xs4all.nl/~freeswan>
/Matti Aarnio <matti.aarnio@sonera.fi>
- 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/
| |