lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 03 Sep 2014 12:33:21 -0400
From:	Rik van Riel <riel@...hat.com>
To:	Oleg Nesterov <oleg@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Mel Gorman <mgorman@...e.de>
CC:	Kautuk Consul <consul.kautuk@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Hocko <mhocko@...e.cz>,
	David Rientjes <rientjes@...gle.com>,
	Ionut Alexa <ionut.m.alexa@...il.com>,
	Guillaume Morin <guillaume@...infr.org>,
	linux-kernel@...r.kernel.org, Kirill Tkhai <tkhai@...dex.ru>
Subject: Re: task_numa_fault() && TASK_DEAD

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/03/2014 12:08 PM, Oleg Nesterov wrote:
> On 09/02, Oleg Nesterov wrote:
>> 
>> The usage of TASK_DEAD in task_numa_fault() is wrong in any
>> case.
> 
> Rik, I can't understand why task_numa_fault() needs this check at
> all, but "if (p->state == TASK_DEAD)" looks certainly wrong. You
> could replace this check with BUG_ON(p->state == TASK_DEAD).
> Perhaps you meant PF_EXITING?

I do not know why that code is in there, either.

I suspect it was added after some conversation on irc, with
either Peter or Mel.

> And a stupid (really, I don't understand this code) question:
> 
> /* for example, ksmd faulting in a user's mm */ if (!p->mm) 
> return;
> 
> OK, but perhaps it make sense to pass "mm" as another argument and
> do
> 
> /* ksmd faulting in a user's mm, or debugger, or kthread use_mm()
> caller */ if (p->mm != mm) return;

I suppose that makes sense, since it would be possible for one task
to cause a page fault in another task's mm, with eg. ptrace peek/poke
or similar code paths.

Currently the numa code could end up accounting such a fault in the
wrong mm, when it would be better to not account the fault at all.

This is a bit of a corner case, and probably not the highest priority
thing to fix right now, but it would be fairly easy.

- -- 
All rights reversed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUB0LQAAoJEM553pKExN6DGBEIALBBKq0N3GlzjRWBzxI361dg
+Xn/C789TZFhk2tvZMNYwJgZRS7xaTRr6IfNcMZNlT9enVlXtrPj2BFiTJ1dF+bh
iwr2eS8c+VVHM+lvzEyiNbrTnvgVNgECI76qsjpvuS0BiUKLh51JSTNLdHA4/CEZ
yJrd+WyulTrv9dHchIO53MQ8+ttCNdzQv/1JK+L2R7vizGnnwA6FysTVQFOPLDxd
ZdvdlAb16uouYQ+1skufxwftvydkbv5voDzp2kb7W0vtwp45MEmj72KPCjHvm1JV
XoX6x1tdNuuZtGdY6WQvFup9ABUnMnILHaX4bkYvxxUqE6/NbfNGOC0CBO41IjE=
=NFQx
-----END PGP SIGNATURE-----
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ