public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: searching exported symbols from modules
@ 2006-04-20  7:15 Antti Halonen
  2006-04-20  8:01 ` Kyle Moffett
  2006-04-20 17:00 ` Adrian Bunk
  0 siblings, 2 replies; 22+ messages in thread
From: Antti Halonen @ 2006-04-20  7:15 UTC (permalink / raw)
  To: Kyle Moffett; +Cc: James Morris, Arjan van de Ven, linux-kernel


Hi Kyle, 

> This makes me wonder why the hell you think you'll get help from this
> (open-source) list.  

I see, I figured this is the place to ask technical question related 
to programming in kernel space. 

> A large number of people on this list (including
> copyright-holders) consider what you are doing blatantly illegal,
> although nobody has yet gone to court over it.  

Um, which part is illegal? Are you saying that I cannot have a non-open
source kernel module? If I figured correctly, to violate GPL I should
compile GPL code into my module.

It is a standalone module, not distributed with any custom kernel.

> Please reconsider
> your decision and either opensource your code or find a way to do it
> in userspace.  

Certainly this needs to be clarified.

Br,
Antti


^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: searching exported symbols from modules
@ 2006-04-20  6:12 Antti Halonen
  2006-04-20  7:00 ` Kyle Moffett
  0 siblings, 1 reply; 22+ messages in thread
From: Antti Halonen @ 2006-04-20  6:12 UTC (permalink / raw)
  To: James Morris; +Cc: Arjan van de Ven, linux-kernel

> > This is commercial module and will not be merged into mainline.
> 
> Is it GPL or compatible?

Nope, MODULE_LICENSE("Proprietary").

BR,
Antti

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: searching exported symbols from modules
@ 2006-04-20  5:50 Antti Halonen
  2006-04-20  5:59 ` James Morris
  0 siblings, 1 reply; 22+ messages in thread
From: Antti Halonen @ 2006-04-20  5:50 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel

> > Exactly, I agree 100%. But here's the catch: it's not an option at
this
> > point in time.
> 
> eh why not? For your module to be ever merged into mainline this
change
> will need to be done anyway (and it'll save you time as well even on
the
> short term)

This is commercial module and will not be merged into mainline.

It would be helpful if I could get at least confirmation if the thing is
doable what I described earlier. 

Pardon me as I don't mean to sound rude; I'm not interested if this
should be done in some totally different way. Let's just say that my
curiosity is peaked to the point that I want & need to know how to
search modules by name in kernel space. I don't know how to be more
specific what comes to my problem.

Thanks in advance for any input!

Br,
antti


^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: searching exported symbols from modules
@ 2006-04-19 15:59 Antti Halonen
  2006-04-19 16:02 ` Arjan van de Ven
  0 siblings, 1 reply; 22+ messages in thread
From: Antti Halonen @ 2006-04-19 15:59 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel

> a better way would be then to have a "core" module which is basically
> collecting these algorithms, and then have the algorithm modules, when
> they are loaded, register themselves with this core module. (and
> unregister at unload). It's sort of inside-out with they way you're
> trying to do it, but it'll work out a lot nicer. Obviously the user of
> the algorithms can be another module in addition to this core module.
> (and even register algorithms itself)

Exactly, I agree 100%. But here's the catch: it's not an option at this
point in time. What I described earlier is what I currently need to do. 

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: searching exported symbols from modules
@ 2006-04-19 15:34 Antti Halonen
  2006-04-19 15:43 ` Arjan van de Ven
  0 siblings, 1 reply; 22+ messages in thread
From: Antti Halonen @ 2006-04-19 15:34 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel


Thanks for your persistence!

> but to what purpose?
> what on earth do you need this for?
> Again you talk about solutions not about the problem you're trying to
> solve.

I have module which has set of algorithms. When I load my module, I will
initialize my function pointer interface to point to these algorithms.
And then go ahead and use my pointers trough the application...

This way I can easily add new algorithm implementations into my product
and decide on the fly which ones to initialize into use.
 
Now. It happens that I have another module which offers algorithms I
want to be able to use. So when I shoot up my module it should be able
to initialize
either the ones the external module offers or use the internal
algorithms. In order to do this, I need to figure out on the fly if the
other module is present, where it is, where I can find the function
addresses...

Hope you can make any sense out of this!

br,
antti
 


^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: searching exported symbols from modules
@ 2006-04-19 14:54 Antti Halonen
  2006-04-19 15:17 ` Arjan van de Ven
  0 siblings, 1 reply; 22+ messages in thread
From: Antti Halonen @ 2006-04-19 14:54 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel


Hi Arjan,

Thanks for your response.

> they still are... but.. very often if you want to do this you have a
> crooked design, you were very vague about what you are really trying
to
> achieve (you only described your solution, not the problem)

The problem is that I cannot seem to have access to the module linked
list. Ie. I want to traverse the linked list who's nodes contain module
structures.

Or

Access to some global symbol table would be helpful as well. Where's
listed the symbol address and name. Same stuff which is found at
/proc/kallsyms.

Br,
Antti

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: searching exported symbols from modules
@ 2006-04-19 13:08 Antti Halonen
  2006-04-19 14:55 ` linux-os (Dick Johnson)
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Antti Halonen @ 2006-04-19 13:08 UTC (permalink / raw)
  To: linux-os (Dick Johnson); +Cc: Linux kernel


Hi Dick,

Thanks for your response.

> `insmod` (or modprobe) does all this automatically. Anything that's
> 'extern' will get resolved. You don't do anything special. You can
> also use `depmod` to verify that you won't have any problems loading.
> `man depmod`.

Yes, I know insmod and herein the problem lies. I have a module where
I want to use functions provided by another module, _if_ it is present, 
otherwise use modules internal functions. 

So if I hardcode the function calls statically in my module, the insmod
goes trough of course, if the service module is present. But, it fails
if it's not. 

So, I want to load up, check if the service module is present, and use
it's servides.
 
> If you are accessing functions or other objects that are not exported
> anymore, how do you know that they even exist? 

I meant that in previous kernel version, some module symbol searching
functions were available.

Br,
antti

^ permalink raw reply	[flat|nested] 22+ messages in thread
* searching exported symbols from modules
@ 2006-04-19 12:44 Antti Halonen
  2006-04-19 12:59 ` linux-os (Dick Johnson)
  2006-04-19 14:22 ` Arjan van de Ven
  0 siblings, 2 replies; 22+ messages in thread
From: Antti Halonen @ 2006-04-19 12:44 UTC (permalink / raw)
  To: linux-kernel


Hi,

Apologies if I posted this question to wrong place.

Here's the thing: when loading my module 'a', I want to search modules
list to check if module 'b' is presents, and if it is, initialize my
function pointers to the functions module b has exported. Or at least
search symbols from module b, whatever. The main question is; how to
locate modules 
by name from my module a?

Is this doable? Can anyone give me pointers? 

Sorry for posting such a stupid question, but I didn't run into
satisfactory when searching the archive & many of the functions which
would have resolved this are apparently not exported anymore.

Any comments are really appreciated!

Thanking in advance,
antti



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2006-04-21 14:03 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-20  7:15 searching exported symbols from modules Antti Halonen
2006-04-20  8:01 ` Kyle Moffett
2006-04-20 17:00 ` Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2006-04-20  6:12 Antti Halonen
2006-04-20  7:00 ` Kyle Moffett
2006-04-20  5:50 Antti Halonen
2006-04-20  5:59 ` James Morris
2006-04-19 15:59 Antti Halonen
2006-04-19 16:02 ` Arjan van de Ven
2006-04-19 15:34 Antti Halonen
2006-04-19 15:43 ` Arjan van de Ven
2006-04-19 14:54 Antti Halonen
2006-04-19 15:17 ` Arjan van de Ven
2006-04-19 13:08 Antti Halonen
2006-04-19 14:55 ` linux-os (Dick Johnson)
2006-04-19 15:53 ` Robin Holt
2006-04-21  7:33 ` Keith Owens
2006-04-21 14:03   ` Vernon Mauery
2006-04-19 12:44 Antti Halonen
2006-04-19 12:59 ` linux-os (Dick Johnson)
2006-04-19 14:55   ` Jim Cromie
2006-04-19 14:22 ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox