Re: [PATCH] Add EXPORT_SYMBOL(ksize);

From: Adrian Bunk
Date: Mon Dec 03 2007 - 08:57:20 EST


On Mon, Dec 03, 2007 at 08:41:44PM +0900, Tetsuo Handa wrote:
> Hello.
>
> Arnaldo Carvalho de Melo wrote:
> > > But I think ksize() should be available to kernel modules as well as kmalloc() etc.
> > Why do you think so? You have to justify that with some valid use.
> Is there an alternative function?

The question is not whether there's an alternative function.

The kernel does not waste memory for all users by providing a fixed API
for external modules, the purpose of the kernel is to provide everything
required for what is shipped with the kernel.

Simply send the patch adding the exports when you submit your module for
inclusion in the kernel.

> If not, it sounds to me that this is a regression.

That sounds strange considering that slab and slob AFAIR never exported
this symbol and only slub in 2.6.22 and 2.6.23 exports it.

> We couldn't know how much memory was allocated by kmalloc() in 2.4 era, and we can know it 2.6 era.
> But are we going back to 2.4 era for out-of-tree kernel modules?

The interesting fact is that there are zero in-kernel modules using it.

> Thanks.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

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