[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120918153027.GA21612@redhat.com>
Date: Tue, 18 Sep 2012 17:30:27 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Denys Vlasenko <vda.linux@...glemail.com>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Amerigo Wang <amwang@...hat.com>,
"Jonathan M. Foote" <jmfoote@...t.org>,
Roland McGrath <roland@...k.frob.com>,
Pedro Alves <palves@...hat.com>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists