lkml.org 
[lkml]   [2012]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm v2 2/2] coredump: add a new elf note with siginfo of the signal
On 09/18, Denys Vlasenko wrote:
>
> +static void fill_siginfo_note(struct memelfnote *note, siginfo_t *csigdata, siginfo_t *siginfo)
> +{
> + mm_segment_t old_fs = get_fs();
> + set_fs(KERNEL_DS);
> + copy_siginfo_to_user((siginfo_t __user *) csigdata, siginfo);
> + set_fs(old_fs);
> + fill_note(note, "CORE", NT_SIGINFO, sizeof(*csigdata), csigdata);
> +}

OK, I think this is fine.

But, somehow I forgot about compat tasks when we discussed this before.
Perhaps the code above should do

if (is_compat_task())
copy_siginfo_to_user32(...);
else
copy_siginfo_to_user(...);

?

Oleg.



\
 
 \ /
  Last update: 2012-09-18 18:01    [W:0.047 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site