Re: Proposal for cleaning up kernel driver parameters

Michael Kujawa (kujawa@cs.ucf.edu)
Fri, 13 Dec 1996 10:04:03 -0500 (EST)


> insmod i82365.o opts="irq_mask=0xefff,poll_status"
>

Did you have ideas on how to handle naming? "pool_status", for example,
seems fairly generic. Two different approaches come to me immediately,
1) All modules/drivers share the same name space, and 2) All such
environment variables have an implied prefix unique to each driver.

The first is the most obvious and easiest to write but name collisions
have the potential to do very rude things. I think that we would end up
with the second approach, but the prefixes would be explicit
(insmod i82365.o opts="i82365-irq_mask=0xeff,i82365-poll_status".

I believe loaded modules cannot share the same name, and if this is so
then the module name would be a clear and easy way to generate a prefix that
could easily be added by the kernel functions. Preferably, one of the
call's parameters would specify whether or not to automatically add the
prefix.

Even with implied prefixes we have the same problem. If the getkenv
call adds the prefix, then a driver cannot access variables outside its
namespace. If getkenv does not add the prefix, then two different drivers
may read and write the same environment variable leading to chaos.

-Mike
kujawa@cs.ucf.edu