[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080721000842.94DAE15421D@magilla.localdomain>
Date: Sun, 20 Jul 2008 17:08:42 -0700 (PDT)
From: Roland McGrath <roland@...hat.com>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Howells <dhowells@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] coredump: exit_mm: clear ->mm first, then play with ->core_state
> Yes, oom_kill.c in turn need fixes but still this is not nice, and I
> personally hate this coredump code in the middle of exit_mm().
I agree. I think what we should work towards is having the coredump
synchronization take place earlier (the tracehook_report_exit point should
be fine, i.e. before PF_EXITING). Then have the dumping and the waiting
for it be killable. I don't think we can get there in only one or two
steps, though.
[The rest if quite off-topic, please do it separately.]
> btw, arch/sparc64/kernel/ptrace.c has a lot of
>
> if (target == current)
> copy_xxx_user();
> else
> access_process_vm();
>
> perhaps it make sense to make a helper.
Dave actually has get_from_target and set_to_target helpers for that.
The places they aren't used, I assume are either just older code not
yet streamlined, or places where the separate get/put_user calls perform
especially better than copy_xxx_user (you'd have to ask Dave). If multiple
arch ports find such helpers useful, they could move into common code later.
> Just curious (I don't know what regset is), is it possible that ->get()
> is called when target->mm == NULL?
It should not happen. It's only kosher to use user_regset calls on a task
in a known state (like ptrace stop, or current), and never on kernel threads.
Thanks,
Roland
--
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