lkml.org 
[lkml]   [2010]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 3/21] Make vma_dump_size() generic
Suzuki, I didn't read this series. Still I have some concerns after
the very brief look...

On 12/14, Suzuki K. Poulose wrote:
>
> @@ -114,10 +113,18 @@ unsigned long vma_dump_size(struct vm_ar
> * Switch to the user "segment" for get_user(),
> * then put back what elf_core_dump() had in place.
> */
> - set_fs(USER_DS);
> - if (unlikely(get_user(word, header)))
> - word = 0;
> - set_fs(fs);
> + if (p->group_leader == current->group_leader) {

same_thread_group() ?

> + mm_segment_t fs = get_fs();
> + set_fs(USER_DS);
> + if (unlikely(get_user(word, header)))
> + word = 0;
> + set_fs(fs);
> + } else {
> + int bytes = access_process_vm(p, (unsigned long)header,
> + &word, sizeof (word), 0);

Well. This adds a little pessimization. It is possible that the
"normal" coredump dumps the CLONE_VM process which doesn't below
to current's thread group.

May be you can compare ->mm's, but I am not sure.

Oleg.



\
 
 \ /
  Last update: 2010-12-14 17:03    [from the cache]
©2003-2011 Jasper Spaans