Messages in this thread | | | Date | Tue, 18 Sep 2012 17:30:27 +0200 | From | Oleg Nesterov <> | Subject | Re: [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.
| |