On Mon, 24 Sep 2007, [EMAIL PROTECTED] wrote:
> I think I looked at that, and it wasn't as easy as it looked, because there
> were ugly corner cases for what __builtin_return_address() returned depending
> on exactly what did or didn't get inlined. Basically, it's ugly stuff - if you
> try to use
On Mon, 24 Sep 2007 08:59:56 EDT, Kyle Moffett said:
> Proper fix is to give __kmalloc a "void *caller" parameter and have
> all of the various wrapper functions pass in the value of
> __builtin_return_address() appropriately. I believe that even works
> properly for inline functions which
On Sep 24, 2007, at 01:35:08, [EMAIL PROTECTED] wrote:
On Sun, 23 Sep 2007 00:03:49 +0400, Alexey Dobriyan said:
-static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
-{
- if (n != 0 && size > ULONG_MAX / n)
- return NULL;
- return __kmalloc(n * size, flags |
On Mon, 24 Sep 2007 11:44:35 +0400, Alexey Dobriyan said:
> Interesting. Here is output from kernel with patch applied and leak
> plugged into proc_dointvec() (I checked twice):
>
> $ grep kcalloc /proc/slab_allocators
> $ grep proc_dointvec /proc/slab_allocators
> size-64
On Mon, 24 Sep 2007 11:44:35 +0400, Alexey Dobriyan said:
> On 9/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > On Sun, 23 Sep 2007 00:03:49 +0400, Alexey Dobriyan said:
> >
> > > -static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
> > > -{
> > > - if (n != 0 && size > ULONG_M
On 9/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Sun, 23 Sep 2007 00:03:49 +0400, Alexey Dobriyan said:
>
> > -static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
> > -{
> > - if (n != 0 && size > ULONG_MAX / n)
> > - return NULL;
> > - return __kmalloc(n * si
On Mon, 24 Sep 2007 08:22:31 +0200, Jan Engelhardt said:
>
> On Sep 24 2007 01:35, [EMAIL PROTECTED] wrote:
> >On Sun, 23 Sep 2007 00:03:49 +0400, Alexey Dobriyan said:
> >
> >> -static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
> >> -{
> >> - if (n != 0 && size > ULONG_MAX / n)
> >
On Sep 24 2007 01:35, [EMAIL PROTECTED] wrote:
>On Sun, 23 Sep 2007 00:03:49 +0400, Alexey Dobriyan said:
>
>> -static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
>> -{
>> -if (n != 0 && size > ULONG_MAX / n)
>> -return NULL;
>> -return __kmalloc(n * size, flags |
On Sun, 23 Sep 2007 00:03:49 +0400, Alexey Dobriyan said:
> -static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
> -{
> - if (n != 0 && size > ULONG_MAX / n)
> - return NULL;
> - return __kmalloc(n * size, flags | __GFP_ZERO);
> -}
> +void *kcalloc(size_t n, size_t
This saves some bytes on usual config here and allows inserting integer
overflow warning without pissing off printk-haters crowd later on.
textdata bss dec hex filename
2662791 195347 159744 3017882 2e0c9a vmlinux -O2 before
2662535 195347 159744 3017626 2e0b9a vml
10 matches
Mail list logo