Re: [2.6 patch] make UNIX a bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2006-04-03 at 17:57 -0500, Kyle Moffett wrote:
> On Mar 3, 2006, at 16:31:51, James C. Georgas wrote:
> > On Thu, 2006-02-03 at 23:32 -0500, Kyle Moffett wrote:
> >> af_unix (IE: CONFIG_UNIX) currently uses the symbol  
> >> get_max_files.  It is the only module that uses that symbol, and  
> >> that symbol probably should not be exported as it's kind of an  
> >> internal API.  Therefore if we mandate that CONFIG_UNIX != m, then  
> >> that symbol may be properly unexported and made private, because  
> >> nothing modular would use it.  Does that clear things up?
> >
> > Yes, I think I understand.
> >
> > However, even if you don't export the symbol, I don't see how you  
> > can make it private (i.e. static declaration) to file_table.c,  
> > since it has to remain extern, in order to be visible to af_unix.c.
> 
> You're missing some crucial information about how Linux operates.   
> EXPORT_SYMBOL != extern.  Basically, Linux maintains a list of  
> symbols that dynamically loaded modules are allowed to use, along  
> with some technical usage restrictions on each  (Symbols exported  
> with EXPORT_SYMBOL_GPL may only be used by modules that declare  
> 'MODULE_LICENSE("GPL");'.) Exporting a symbol increases the 
> likliehood that some module author will use it inappropriately, and  
> bloats the kernel.  In this case, removing the EXPORT_SYMBOL() would  
> be a good thing.

Isn't it kind of pointless to not EXPORT a symbol if the symbol is still
declared globally in an include/linux/ header file? If the intent is to
prevent abuse of the symbol, then this doesn't do it, because I can just
statically compile my module into the kernel, and keep on using that
symbol.

It makes sense to me to remove the EXPORT of geget_max_filest_max_files,
if the intent is to eventually remove 




I was under the impression that Adrian wanted 
> 
> Cheers,
> Kyle Moffett
> 
-- 
James C. Georgas <[email protected]>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux