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]
Message-ID: <54C2FD35.9070803@roeck-us.net>
Date:	Fri, 23 Jan 2015 18:02:29 -0800
From:	Guenter Roeck <linux@...ck-us.net>
To:	Johannes Weiner <hannes@...xchg.org>
CC:	Christoph Lameter <cl@...ux.com>, akpm@...ux-foundation.org,
	mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
	linux-next@...r.kernel.org,
	Stephen Rothwell <sfr@...b.auug.org.au>, mhocko@...e.cz
Subject: Re: mmotm 2015-01-22-15-04: qemu failure due to 'mm: memcontrol:
 remove unnecessary soft limit tree node test'

On 01/23/2015 09:36 AM, Johannes Weiner wrote:
> On Fri, Jan 23, 2015 at 08:59:51AM -0800, Guenter Roeck wrote:
>> On 01/23/2015 08:02 AM, Johannes Weiner wrote:
>>> On Fri, Jan 23, 2015 at 09:17:44AM -0600, Christoph Lameter wrote:
>>>> On Fri, 23 Jan 2015, Johannes Weiner wrote:
>>>>
>>>>> Is the assumption of this patch wrong?  Does the specified node have
>>>>> to be online for the fallback to work?
>>>>
>>>> Nodes that are offline have no control structures allocated and thus
>>>> allocations will likely segfault when the address of the controls
>>>> structure for the node is accessed.
>>>>
>>>> If we wanted to prevent that then every allocation would have to add a
>>>> check to see if the nodes are online which would impact performance.
>>>
>>> Okay, that makes sense, thank you.
>>>
>>> Andrew, can you please drop this patch?
>>>
>> Problem is that there are three patches.
>>
>> 2537ffb mm: memcontrol: consolidate swap controller code
>> 2f9b346 mm: memcontrol: consolidate memory controller initialization
>> a40d0d2 mm: memcontrol: remove unnecessary soft limit tree node test
>>
>> Reverting (or dropping) a40d0d2 alone is not possible since it modifies
>> mem_cgroup_soft_limit_tree_init which is removed by 2f9b346.
>
> ("mm: memcontrol: consolidate swap controller code") gave me no issues
> when rebasing, but ("mm: memcontrol: consolidate memory controller
> initialization") needs updating.
>
> So how about this one to replace ("mm: memcontrol: remove unnecessary
> soft limit tree node test"):
>
> ---
> From: Johannes Weiner <hannes@...xchg.org>
> Subject: [patch] mm: memcontrol: simplify soft limit tree init code
>
> - No need to test the node for N_MEMORY.  node_online() is enough for
>    node fallback to work in slab, use NUMA_NO_NODE for everything else.
>
> - Remove the BUG_ON() for allocation failure.  A NULL pointer crash is
>    just as descriptive, and the absent return value check is obvious.
>
> - Move local variables to the inner-most blocks.
>
> - Point to the tree structure after its initialized, not before, it's
>    just more logical that way.
>
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>

The latest version in mmotm passes my ppc64 qemu test, so it works
at least in this context.

Tested-by: Guenter Roeck <linux@...ck-us.net>

--
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