* [PATCH] Add EXPORT_SYMBOL(ksize); @ 2007-12-02 8:43 Tetsuo Handa 2007-12-02 13:48 ` Adrian Bunk 0 siblings, 1 reply; 13+ messages in thread From: Tetsuo Handa @ 2007-12-02 8:43 UTC (permalink / raw) To: akpm; +Cc: linux-kernel mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> --- mm/slab.c | 1 + mm/slob.c | 1 + 2 files changed, 2 insertions(+) --- linux-2.6-mm.orig/mm/slab.c +++ linux-2.6-mm/mm/slab.c @@ -4479,3 +4479,4 @@ size_t ksize(const void *objp) return obj_size(virt_to_cache(objp)); } +EXPORT_SYMBOL(ksize); --- linux-2.6-mm.orig/mm/slob.c +++ linux-2.6-mm/mm/slob.c @@ -495,6 +495,7 @@ size_t ksize(const void *block) else return sp->page.private; } +EXPORT_SYMBOL(ksize); struct kmem_cache { unsigned int size, align; ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-02 8:43 [PATCH] Add EXPORT_SYMBOL(ksize); Tetsuo Handa @ 2007-12-02 13:48 ` Adrian Bunk 2007-12-02 21:34 ` Tetsuo Handa 2007-12-03 23:34 ` Andrew Morton 0 siblings, 2 replies; 13+ messages in thread From: Adrian Bunk @ 2007-12-02 13:48 UTC (permalink / raw) To: Tetsuo Handa; +Cc: akpm, linux-kernel On Sun, Dec 02, 2007 at 05:43:39PM +0900, Tetsuo Handa wrote: > > mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. >... That's due to the fact that my patch to remove this unused export from slub was not yet applied... Where is the modular in-kernel user? 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-02 13:48 ` Adrian Bunk @ 2007-12-02 21:34 ` Tetsuo Handa 2007-12-02 21:46 ` Arnaldo Carvalho de Melo 2007-12-03 23:34 ` Andrew Morton 1 sibling, 1 reply; 13+ messages in thread From: Tetsuo Handa @ 2007-12-02 21:34 UTC (permalink / raw) To: bunk; +Cc: akpm, linux-kernel Hello. Adrian Bunk wrote: > > mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. > That's due to the fact that my patch to remove this unused export from > slub was not yet applied... So, removing exports is intended thing? > Where is the modular in-kernel user? I don't know. But I think ksize() should be available to kernel modules as well as kmalloc() etc. Thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-02 21:34 ` Tetsuo Handa @ 2007-12-02 21:46 ` Arnaldo Carvalho de Melo 2007-12-03 11:41 ` Tetsuo Handa 0 siblings, 1 reply; 13+ messages in thread From: Arnaldo Carvalho de Melo @ 2007-12-02 21:46 UTC (permalink / raw) To: Tetsuo Handa; +Cc: bunk, akpm, linux-kernel Em Mon, Dec 03, 2007 at 06:34:20AM +0900, Tetsuo Handa escreveu: > Hello. > > Adrian Bunk wrote: > > > mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. > > That's due to the fact that my patch to remove this unused export from > > slub was not yet applied... > So, removing exports is intended thing? The ones that are leftovers from past, valid, uses, yes. Kudos to Adrian for being the zealot in action! > > Where is the modular in-kernel user? > I don't know. > 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. - Arnaldo ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-02 21:46 ` Arnaldo Carvalho de Melo @ 2007-12-03 11:41 ` Tetsuo Handa 2007-12-03 13:57 ` Adrian Bunk 0 siblings, 1 reply; 13+ messages in thread From: Tetsuo Handa @ 2007-12-03 11:41 UTC (permalink / raw) To: acme; +Cc: bunk, akpm, linux-kernel 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? If not, it sounds to me that this is a regression. 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? Thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-03 11:41 ` Tetsuo Handa @ 2007-12-03 13:57 ` Adrian Bunk 2007-12-03 14:07 ` Pekka Enberg 0 siblings, 1 reply; 13+ messages in thread From: Adrian Bunk @ 2007-12-03 13:57 UTC (permalink / raw) To: Tetsuo Handa; +Cc: acme, akpm, linux-kernel 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-03 13:57 ` Adrian Bunk @ 2007-12-03 14:07 ` Pekka Enberg 2007-12-03 21:19 ` Matt Mackall 0 siblings, 1 reply; 13+ messages in thread From: Pekka Enberg @ 2007-12-03 14:07 UTC (permalink / raw) To: Adrian Bunk; +Cc: Tetsuo Handa, acme, akpm, linux-kernel Hi, On Mon, Dec 03, 2007 at 08:41:44PM +0900, Tetsuo Handa wrote: > > 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? On Dec 3, 2007 3:57 PM, Adrian Bunk <bunk@kernel.org> wrote: > The interesting fact is that there are zero in-kernel modules using it. Yeah, and now that we have krealloc() I don't expect that many callers actually need ksize() either. Pekka ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-03 14:07 ` Pekka Enberg @ 2007-12-03 21:19 ` Matt Mackall 0 siblings, 0 replies; 13+ messages in thread From: Matt Mackall @ 2007-12-03 21:19 UTC (permalink / raw) To: Pekka Enberg; +Cc: Adrian Bunk, Tetsuo Handa, acme, akpm, linux-kernel On Mon, Dec 03, 2007 at 04:07:33PM +0200, Pekka Enberg wrote: > Hi, > > On Mon, Dec 03, 2007 at 08:41:44PM +0900, Tetsuo Handa wrote: > > > 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? > > On Dec 3, 2007 3:57 PM, Adrian Bunk <bunk@kernel.org> wrote: > > The interesting fact is that there are zero in-kernel modules using it. > > Yeah, and now that we have krealloc() I don't expect that many callers > actually need ksize() either. Yes, most of them ought not exist. -- Mathematics is the supreme nostalgia of our time. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-02 13:48 ` Adrian Bunk 2007-12-02 21:34 ` Tetsuo Handa @ 2007-12-03 23:34 ` Andrew Morton 2007-12-06 21:02 ` Adrian Bunk 1 sibling, 1 reply; 13+ messages in thread From: Andrew Morton @ 2007-12-03 23:34 UTC (permalink / raw) To: Adrian Bunk; +Cc: penguin-kernel, linux-kernel On Sun, 2 Dec 2007 14:48:42 +0100 Adrian Bunk <bunk@kernel.org> wrote: > On Sun, Dec 02, 2007 at 05:43:39PM +0900, Tetsuo Handa wrote: > > > > mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. > >... > > That's due to the fact that my patch to remove this unused export from > slub was not yet applied... > > Where is the modular in-kernel user? > binfmt_flat.c, binfmt_elf_fdpic.c. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-03 23:34 ` Andrew Morton @ 2007-12-06 21:02 ` Adrian Bunk 2007-12-06 21:07 ` Adrian Bunk 2007-12-11 10:46 ` Bernd Schmidt 0 siblings, 2 replies; 13+ messages in thread From: Adrian Bunk @ 2007-12-06 21:02 UTC (permalink / raw) To: Andrew Morton; +Cc: penguin-kernel, linux-kernel On Mon, Dec 03, 2007 at 03:34:59PM -0800, Andrew Morton wrote: > On Sun, 2 Dec 2007 14:48:42 +0100 > Adrian Bunk <bunk@kernel.org> wrote: > > > On Sun, Dec 02, 2007 at 05:43:39PM +0900, Tetsuo Handa wrote: > > > > > > mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. > > >... > > > > That's due to the fact that my patch to remove this unused export from > > slub was not yet applied... > > > > Where is the modular in-kernel user? > > > > binfmt_flat.c, binfmt_elf_fdpic.c. I could have sworn I had checked that both are bools, but BINFMT_FLAT is actually a tristate. Is anyone actually using binfmt_flat modular (considering it's only available for !MMU embedded systems)? If yes, then only exporting ksize() will not be enough for getting it working modular... 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-06 21:02 ` Adrian Bunk @ 2007-12-06 21:07 ` Adrian Bunk 2007-12-11 10:46 ` Bernd Schmidt 1 sibling, 0 replies; 13+ messages in thread From: Adrian Bunk @ 2007-12-06 21:07 UTC (permalink / raw) To: Andrew Morton; +Cc: penguin-kernel, linux-kernel On Thu, Dec 06, 2007 at 10:02:48PM +0100, Adrian Bunk wrote: > On Mon, Dec 03, 2007 at 03:34:59PM -0800, Andrew Morton wrote: > > On Sun, 2 Dec 2007 14:48:42 +0100 > > Adrian Bunk <bunk@kernel.org> wrote: > > > > > On Sun, Dec 02, 2007 at 05:43:39PM +0900, Tetsuo Handa wrote: > > > > > > > > mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. > > > >... > > > > > > That's due to the fact that my patch to remove this unused export from > > > slub was not yet applied... > > > > > > Where is the modular in-kernel user? > > > > > > > binfmt_flat.c, binfmt_elf_fdpic.c. > > I could have sworn I had checked that both are bools, but BINFMT_FLAT is > actually a tristate. > > Is anyone actually using binfmt_flat modular (considering it's only > available for !MMU embedded systems)? If yes, then only exporting > ksize() will not be enough for getting it working modular... Considering it even lacks a MODULE_LICENSE("GPL") I do very much suspect it simply lacks any use case. 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-06 21:02 ` Adrian Bunk 2007-12-06 21:07 ` Adrian Bunk @ 2007-12-11 10:46 ` Bernd Schmidt 2007-12-11 11:16 ` Greg Ungerer 1 sibling, 1 reply; 13+ messages in thread From: Bernd Schmidt @ 2007-12-11 10:46 UTC (permalink / raw) To: Adrian Bunk Cc: Andrew Morton, penguin-kernel, linux-kernel, Greg Ungerer, Paul Mundt, David Howells A couple of Cc:s added. Adrian Bunk wrote: > On Mon, Dec 03, 2007 at 03:34:59PM -0800, Andrew Morton wrote: >> On Sun, 2 Dec 2007 14:48:42 +0100 >> Adrian Bunk <bunk@kernel.org> wrote: >> >>> On Sun, Dec 02, 2007 at 05:43:39PM +0900, Tetsuo Handa wrote: >>>> mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. >>>> ... >>> That's due to the fact that my patch to remove this unused export from >>> slub was not yet applied... >>> >>> Where is the modular in-kernel user? >>> >> binfmt_flat.c, binfmt_elf_fdpic.c. > > I could have sworn I had checked that both are bools, but BINFMT_FLAT is > actually a tristate. > > Is anyone actually using binfmt_flat modular (considering it's only > available for !MMU embedded systems)? If yes, then only exporting > ksize() will not be enough for getting it working modular... We're not using modular binfmt_flat on the Blackfin, but I can't speak for other architectures. Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add EXPORT_SYMBOL(ksize); 2007-12-11 10:46 ` Bernd Schmidt @ 2007-12-11 11:16 ` Greg Ungerer 0 siblings, 0 replies; 13+ messages in thread From: Greg Ungerer @ 2007-12-11 11:16 UTC (permalink / raw) To: Bernd Schmidt Cc: Adrian Bunk, Andrew Morton, penguin-kernel, linux-kernel, Paul Mundt, David Howells Bernd Schmidt wrote: > A couple of Cc:s added. > > Adrian Bunk wrote: >> On Mon, Dec 03, 2007 at 03:34:59PM -0800, Andrew Morton wrote: >>> On Sun, 2 Dec 2007 14:48:42 +0100 >>> Adrian Bunk <bunk@kernel.org> wrote: >>> >>>> On Sun, Dec 02, 2007 at 05:43:39PM +0900, Tetsuo Handa wrote: >>>>> mm/slub.c exports ksize(), but mm/slob.c and mm/slab.c don't. I don't know why. >>>>> ... >>>> That's due to the fact that my patch to remove this unused export from >>>> slub was not yet applied... >>>> >>>> Where is the modular in-kernel user? >>>> >>> binfmt_flat.c, binfmt_elf_fdpic.c. >> I could have sworn I had checked that both are bools, but BINFMT_FLAT is >> actually a tristate. >> >> Is anyone actually using binfmt_flat modular (considering it's only >> available for !MMU embedded systems)? If yes, then only exporting >> ksize() will not be enough for getting it working modular... > > We're not using modular binfmt_flat on the Blackfin, but I can't speak > for other architectures. I don't know of any architectures that do (or have ever) used these as modules. Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Dude EMAIL: gerg@snapgear.com SnapGear -- a Secure Computing Company PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-12-11 11:41 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-12-02 8:43 [PATCH] Add EXPORT_SYMBOL(ksize); Tetsuo Handa 2007-12-02 13:48 ` Adrian Bunk 2007-12-02 21:34 ` Tetsuo Handa 2007-12-02 21:46 ` Arnaldo Carvalho de Melo 2007-12-03 11:41 ` Tetsuo Handa 2007-12-03 13:57 ` Adrian Bunk 2007-12-03 14:07 ` Pekka Enberg 2007-12-03 21:19 ` Matt Mackall 2007-12-03 23:34 ` Andrew Morton 2007-12-06 21:02 ` Adrian Bunk 2007-12-06 21:07 ` Adrian Bunk 2007-12-11 10:46 ` Bernd Schmidt 2007-12-11 11:16 ` Greg Ungerer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).