reply inlined Vishal Verma wrote: > I'm looking for a way to store variable,value pairs in the kernel at > runtime. For example, I need to able to execute a command from the > user-space and say > > my-kernel-set myvar "arbitrary value" > > This should create a variable in the kernel space with the name "myvar" create a varible? i can think of at least two way to DoS this.. > and set its value to "arbitrary value". Later, I want to be able to load > a > kernel module, that uses one of these variables. For example a kernel > module may make a call to the api as: > > my_kernel_get("myvar", buf, sizeof (buf)); > > Also, I want to be able to do: > > my-kernel-get myvar > > from the userspace. > > What I want to know is that if such a mechanism already exists in the > kernel or not? If not, do you people see if wanting such a module is a > valid requirement or the same problem could be solved in some other > existing/non-existing way, efficiently. > > thanks > -vish > > > Ideally, I want the module to use the variable just as any other symbol. > For example instead of the call to my_kernel_get(), I want to just use > the > variable "myvar" as: > > myvar = 10; > > This is only possible if the module which defines the variables can > change > the symbol table dynamically, which doesn't sound easily do-able to me. > But, still any insight, thoughts on that would help greatly too. > this would be a security risk too.. -- -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/