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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 29 Jul 2013 14:45:28 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	Johannes Weiner <hannes@...xchg.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	David Rientjes <rientjes@...gle.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	azurIt <azurit@...ox.sk>, linux-mm@...ck.org,
	cgroups@...r.kernel.org, x86@...nel.org,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 4/6] x86: finish user fault error path with fatal signal

On Fri 26-07-13 14:46:57, Johannes Weiner wrote:
> On Fri, Jul 26, 2013 at 03:52:07PM +0200, Michal Hocko wrote:
> > On Thu 25-07-13 18:25:36, Johannes Weiner wrote:
> > > The x86 fault handler bails in the middle of error handling when the
> > > task has a fatal signal pending.  For a subsequent patch this is a
> > > problem in OOM situations because it relies on
> > > pagefault_out_of_memory() being called even when the task has been
> > > killed, to perform proper per-task OOM state unwinding.
> > > 
> > > Shortcutting the fault like this is a rather minor optimization that
> > > saves a few instructions in rare cases.  Just remove it for
> > > user-triggered faults.
> > 
> > OK, I thought that this optimization tries to prevent calling OOM
> > because the current might release some memory but that wasn't the
> > intention of b80ef10e8 (x86: Move do_page_fault()'s error path under
> > unlikely()).
> 
> out_of_memory() also checks the caller for pending signals, so it
> would not actually invoke the OOM killer if the caller is already
> dying.

Ohh, right you are! I should have checked deeper in the call chain.

> > > Use the opportunity to split the fault retry handling from actual
> > > fault errors and add locking documentation that reads suprisingly
> > > similar to ARM's.
> > > 
> > > Signed-off-by: Johannes Weiner <hannes@...xchg.org>
> > 
> > Reviewed-by: Michal Hocko <mhocko@...e.cz>
> 
> Thanks!

-- 
Michal Hocko
SUSE Labs
--
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