All of lore.kernel.org
 help / color / mirror / Atom feed
* EXPORT_SYMBOL missing in the kernel?
@ 2011-05-24 13:03 Pierre Rondou
  2011-05-24 13:40 ` Eric Dumazet
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Rondou @ 2011-05-24 13:03 UTC (permalink / raw)
  To: netfilter-devel; +Cc: evyncke, guy.leduc, Cyril Soldani

Hello,

I'm a student at the University of Liege, currently developing a NAT64 
(see RFC 6146) module for Netfilter.

In order to develop this module, I had to use some in-kernel function, 
such as icmp_send, ip6_output, ip_finish_output, ... and many more.

But many of those functions didn't have an "EXPORT_SYMBOL" allowing them 
to be reachable from outside the kernel.

So, to be able to use them, I had to copy paste about 1500 lines of 
kernel source code (those functions + related functions). This makes the 
module hardly updatable as all those functions are likely to be updated.

Is there a reason why those functions are not associated with an 
"EXPORT_SYMBOL"?

Regards,

Pierre Rondou

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

* Re: EXPORT_SYMBOL missing in the kernel?
  2011-05-24 13:03 EXPORT_SYMBOL missing in the kernel? Pierre Rondou
@ 2011-05-24 13:40 ` Eric Dumazet
  2011-05-24 13:48   ` Pierre Rondou
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2011-05-24 13:40 UTC (permalink / raw)
  To: Pierre Rondou; +Cc: netfilter-devel, evyncke, guy.leduc, Cyril Soldani

Le mardi 24 mai 2011 à 15:03 +0200, Pierre Rondou a écrit :
> Hello,
> 
> I'm a student at the University of Liege, currently developing a NAT64 
> (see RFC 6146) module for Netfilter.
> 
> In order to develop this module, I had to use some in-kernel function, 
> such as icmp_send, ip6_output, ip_finish_output, ... and many more.
> 
> But many of those functions didn't have an "EXPORT_SYMBOL" allowing them 
> to be reachable from outside the kernel.
> 
> So, to be able to use them, I had to copy paste about 1500 lines of 
> kernel source code (those functions + related functions). This makes the 
> module hardly updatable as all those functions are likely to be updated.
> 
> Is there a reason why those functions are not associated with an 
> "EXPORT_SYMBOL"?

We dont export all possible symbols (each export has a memory cost)

We export one symbol when its needed from a module.

Dont copy/paste code, but add EXPORT_SYMBOL when/if needed.

icmp_send() is for sure already exported (needed in various netfilter
modules)



--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: EXPORT_SYMBOL missing in the kernel?
  2011-05-24 13:40 ` Eric Dumazet
@ 2011-05-24 13:48   ` Pierre Rondou
  2011-05-24 14:41     ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Rondou @ 2011-05-24 13:48 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netfilter-devel, evyncke, guy.leduc, Cyril Soldani

Le 24/05/11 15:40, Eric Dumazet a écrit :
> Le mardi 24 mai 2011 à 15:03 +0200, Pierre Rondou a écrit :
>    
>> Hello,
>>
>> I'm a student at the University of Liege, currently developing a NAT64
>> (see RFC 6146) module for Netfilter.
>>
>> In order to develop this module, I had to use some in-kernel function,
>> such as icmp_send, ip6_output, ip_finish_output, ... and many more.
>>
>> But many of those functions didn't have an "EXPORT_SYMBOL" allowing them
>> to be reachable from outside the kernel.
>>
>> So, to be able to use them, I had to copy paste about 1500 lines of
>> kernel source code (those functions + related functions). This makes the
>> module hardly updatable as all those functions are likely to be updated.
>>
>> Is there a reason why those functions are not associated with an
>> "EXPORT_SYMBOL"?
>>      
> We dont export all possible symbols (each export has a memory cost)
>
> We export one symbol when its needed from a module.
>
> Dont copy/paste code, but add EXPORT_SYMBOL when/if needed.
>
> icmp_send() is for sure already exported (needed in various netfilter
> modules)
>
>    

Ok, thanks for the info.

Though, my module doesn't need a kernel recompilations as its developed 
for Xtables, I'm not likely to develop a kernel patch to apply for each 
kernel my module could be connected.

Of course, the best way would be to patch the currently dev kernel 
(2.6.39 if I take your word from previous mail) to use my module.
But I'm not a kernel developper and my previously proposed module 
(NATIVI, which had the same problem) didn't seem to get interest from 
kernel or Xtables developers :(
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: EXPORT_SYMBOL missing in the kernel?
  2011-05-24 13:48   ` Pierre Rondou
@ 2011-05-24 14:41     ` Jan Engelhardt
  2011-05-24 15:42       ` Pierre Rondou
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2011-05-24 14:41 UTC (permalink / raw)
  To: Pierre Rondou
  Cc: Eric Dumazet, netfilter-devel, evyncke, guy.leduc, Cyril Soldani



On Tuesday 2011-05-24 15:48, Pierre Rondou wrote:
> Of course, the best way would be to patch the currently dev kernel (2.6.39 if I
> take your word from previous mail) to use my module.
> But I'm not a kernel developper and my previously proposed module (NATIVI,
> which had the same problem) didn't seem to get interest from kernel or Xtables
> developers :(

On the contrary. If there was no interest, I would not have written a 
reply. But you seem to have chosen to ignore that and went away with "it 
fixed itself".

http://www.spinics.net/lists/netfilter-devel/msg18073.html

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

* Re: EXPORT_SYMBOL missing in the kernel?
  2011-05-24 14:41     ` Jan Engelhardt
@ 2011-05-24 15:42       ` Pierre Rondou
  2011-05-24 21:32         ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Rondou @ 2011-05-24 15:42 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Eric Dumazet, netfilter-devel, evyncke, guy.leduc, Cyril Soldani

Hello Jan,

I appreciate your help !

This problem is not related with the problem I had at this moment.

The "old" problem was about an output problem with ip6_local_out. I was 
at this time on an old debian testing (between lenny and squeeze) and 
the update to "complete" squeeze solved the problem, so I thought that 
it was a problem related to my OS situation.

Now that you say that, I have realized that ip6_local_out (which I don't 
use anymore, I use ip6_output) was creating kernel panic when asked to 
send an IPv6 packet with a size higher than the link mtu, should have 
talked about it earlier though.

The little complain about NATIVI 
(http://www.spinics.net/lists/netfilter-devel/msg18248.html) was that no 
kernel / Xtables developers told me they wanted the module inside the 
kernel/Xtables or even sent me a remark about it and therefore could 
take care about the missing "EXPORT_SYMBOL".
This module is developed inside Xtables and therefore doesn't need to 
recompile a kernel.


While I'm sending you an e-mail, I may contribute to your very 
interesting "Writing Netfilter modules" ebook.
I had to deal with checksums changes/update in both IPv4 and IPv6 and 
may contribute to this section (5.7) if you still need someone to :-).

Regards,

Pierre

Le 24/05/11 16:41, Jan Engelhardt a écrit :
>
> On Tuesday 2011-05-24 15:48, Pierre Rondou wrote:
>    
>> Of course, the best way would be to patch the currently dev kernel (2.6.39 if I
>> take your word from previous mail) to use my module.
>> But I'm not a kernel developper and my previously proposed module (NATIVI,
>> which had the same problem) didn't seem to get interest from kernel or Xtables
>> developers :(
>>      
> On the contrary. If there was no interest, I would not have written a
> reply. But you seem to have chosen to ignore that and went away with "it
> fixed itself".
>
> http://www.spinics.net/lists/netfilter-devel/msg18073.html
>    

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: EXPORT_SYMBOL missing in the kernel?
  2011-05-24 15:42       ` Pierre Rondou
@ 2011-05-24 21:32         ` Jan Engelhardt
  2011-05-25 13:05           ` Pierre Rondou
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2011-05-24 21:32 UTC (permalink / raw)
  To: Pierre Rondou
  Cc: Eric Dumazet, netfilter-devel, evyncke, guy.leduc, Cyril Soldani


On Tuesday 2011-05-24 17:42, Pierre Rondou wrote:
>
>The little complain about NATIVI
>(http://www.spinics.net/lists/netfilter-devel/msg18248.html) was
>that no kernel/Xtables developers told me they wanted the module
>inside the kernel/Xtables

But they did not say "don't want" either :)

Sorry, I must have skipped over that mail somehow. It's still in
my inbox, so that means the topic had not been closed.

The only other "excuse" I can give is that, on a closer look now, the
mail did not contain a merge request, just an offer for help.
(Wording: "If you believe that this module can be included is the
Linux Kernel or in the Xtables-addons framework, I'll be glad and
will help you in this task.")

If you, or somebody else, wants to have it merged, in either the
kernel or Xtables-addons, please send in a patch, and we will discuss
it from there on.

> While I'm sending you an e-mail, I may contribute to your very interesting
> "Writing Netfilter modules" ebook.

If you replace .pdf in the URL by .lyx, you can get at the source
of the document and make a patch against that if you like.
Other ways to convey your additions are also acceptable - it
is not required to be diff.

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

* Re: EXPORT_SYMBOL missing in the kernel?
  2011-05-24 21:32         ` Jan Engelhardt
@ 2011-05-25 13:05           ` Pierre Rondou
  0 siblings, 0 replies; 7+ messages in thread
From: Pierre Rondou @ 2011-05-25 13:05 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Eric Dumazet, netfilter-devel, evyncke, guy.leduc, Cyril Soldani

Le 24/05/11 23:32, Jan Engelhardt a écrit :
> On Tuesday 2011-05-24 17:42, Pierre Rondou wrote:
>    
>> The little complain about NATIVI
>> (http://www.spinics.net/lists/netfilter-devel/msg18248.html) was
>> that no kernel/Xtables developers told me they wanted the module
>> inside the kernel/Xtables
>>      
> But they did not say "don't want" either :)
>
> Sorry, I must have skipped over that mail somehow. It's still in
> my inbox, so that means the topic had not been closed.
>
> The only other "excuse" I can give is that, on a closer look now, the
> mail did not contain a merge request, just an offer for help.
> (Wording: "If you believe that this module can be included is the
> Linux Kernel or in the Xtables-addons framework, I'll be glad and
> will help you in this task.")
>
> If you, or somebody else, wants to have it merged, in either the
> kernel or Xtables-addons, please send in a patch, and we will discuss
> it from there on.
>    

Ok, I didn't know how adding kernel functionalities works actually...
I'll propose a patch to get it added on current dev kernel a bit later 
(gotta finish writing my thesis first).

>    
>> While I'm sending you an e-mail, I may contribute to your very interesting
>> "Writing Netfilter modules" ebook.
>>      
> If you replace .pdf in the URL by .lyx, you can get at the source
> of the document and make a patch against that if you like.
> Other ways to convey your additions are also acceptable - it
> is not required to be diff.
>    

Ok, I'll send you a patch or something like that after I finished the 
writing of my thesis.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2011-05-25 13:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 13:03 EXPORT_SYMBOL missing in the kernel? Pierre Rondou
2011-05-24 13:40 ` Eric Dumazet
2011-05-24 13:48   ` Pierre Rondou
2011-05-24 14:41     ` Jan Engelhardt
2011-05-24 15:42       ` Pierre Rondou
2011-05-24 21:32         ` Jan Engelhardt
2011-05-25 13:05           ` Pierre Rondou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.