lkml.org 
[lkml]   [2014]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH] fs/binfmt_elf.c: fix inconsistent vma dump size
From
2014-11-26 21:43 GMT+09:00 Andrew Morton <akpm@linux-foundation.org>:
> On Wed, 26 Nov 2014 21:37:54 +0900 Jungseung Lee <js07.lee@gmail.com> wrote:
>
>> 2014-11-26 15:51 GMT+09:00 Jungseung Lee <js07.lee@gmail.com>:
>>
>> >>> @@ -2093,7 +2083,20 @@ static int elf_core_dump(struct coredump_params *cprm)
>> >>>
>> >>> dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
>> >>>
>> >>> - offset += elf_core_vma_data_size(gate_vma, cprm->mm_flags);
>> >>> + vma_filesz = kmalloc(sizeof(*vma_filesz) * (segs - 1), GFP_KERNEL);
>> >>
>> >> Use kmalloc_array() here, in case a disaster has occurred...
>> >>
>> > I'll try to find another way how to pass or save vma size with consistency.
>> >
>> it looks like just to replace kmalloc to vmalloc could be solution.
>> I'll send patch, thanks.
>
> Solution to what? I was merely suggesting the use of kmalloc_array()
> instead of open-coded kmalloc(n * m).
>
Ah.. I misunderstood with my poor english. Thanks for the notice to me.


\
 
 \ /
  Last update: 2014-11-26 14:41    [W:0.918 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site