Received: by 10.223.164.202 with SMTP id h10csp272060wrb; Tue, 7 Nov 2017 06:12:38 -0800 (PST) X-Google-Smtp-Source: ABhQp+SAqjhHwBFuDf0Y7sdRO4XdKjj+gTBTHLCuBvHHPamw4geaiATNq9J+Lpx1biTucwlm5GMA X-Received: by 10.84.241.15 with SMTP id a15mr5473848pll.199.1510063958656; Tue, 07 Nov 2017 06:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510063958; cv=none; d=google.com; s=arc-20160816; b=DZWzfxmBpFthBAvRENry7VYNwA+OR8cTc5WjXmJdC4MZB62EMYT8hHInMeoG8YAd/l U2YW3meWR+9nSLNSor9M8MOgsY5n50zT+++q01FDmOoGpo5rBqyMBZfQFrMVFatOowZM CfeU181Rrs6vicpzp/wTnJPpHABy8RctKHTXyGxdVJM5SIz4o9jqq7sC8bdxeypy4mUr AFXu2KnidA3+QlKOyTxu7ykaUKVQyitCgqiT3R8V57/inIFN2YTRGM1iWrcJQFnbAzTP k1Jfrh2H4nbu3hd8IKBnlyl1cTti76ce4/Y/l2Voi7pz8FrTX2bfSpncE6OcxbRJRVLj GGbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=7JdP56PBzpYKeGp2VA59jHfh7GA5mjMLNGkJsXYefQw=; b=n0Mmqu9Dqhi4IPmo7eNY9+roliGc7OSFkTKQV2kXkriFxd5VgdPuOVYm1AN1+p1q7b P6h5DS/mHB2rW02cXXafQLruSxYXD+dOtkLLLf+4Gp89rfgGIRYdPSHyCm+BT7IHxa8G OZU7A1vaXKf4kl0LWt4RA8dcqP9oMv/jCrKXY9uV33kcbbNA9U6WQNJ04vv2XzvKfxen uofKGdF7o8IsBpaJBS4hCg9iHf53j6srjr2jDmuP4EHYBZRE4fghJSiM+oyTYAzs+0Nb SvyesgYcOnMqNUgOv7CafvzmCeE+/PEJs1+kC9NeRbF5ow1N4tUgDAnTPPshfV4ywSw5 xKxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=zbaByPZI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bf2si1260075plb.521.2017.11.07.06.12.25; Tue, 07 Nov 2017 06:12:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=zbaByPZI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934113AbdKGNQV (ORCPT + 91 others); Tue, 7 Nov 2017 08:16:21 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:52365 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933902AbdKGNQT (ORCPT ); Tue, 7 Nov 2017 08:16:19 -0500 Received: by mail-wm0-f41.google.com with SMTP id t139so3818239wmt.1 for ; Tue, 07 Nov 2017 05:16:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7JdP56PBzpYKeGp2VA59jHfh7GA5mjMLNGkJsXYefQw=; b=zbaByPZIH1wzcKNHIWwHYTLkBRpaWumT+3XglLXV3QFsmG7G3JizG79/lurXf59uNS DquQcvPZudRvAsAFdE/bYa91Q6RRDvfTAh8UVad6YIy3NZBvuuLP8pG0sG+YlKatg7gI 0paP2uVmd/S4uY8EW5gkL4avXm3kEzCYJLKy3lWk/PP7KcmLZg7/bn9ZCsUDwPZLl79p My3pXZDPkYhBGSd84hIkKqLXMbmXUUGhTHtQYCF3OmJlDgiYbtgSa+kHIKMptdZO3a+q J2LAwGMIfzuUE+n9/awEaVUYWFeGCpirq3i8ILlHIOubouq2/e0A+M/6K+munhgyyRlH IjYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7JdP56PBzpYKeGp2VA59jHfh7GA5mjMLNGkJsXYefQw=; b=POjaJlWiwWEP9LOWgPhWmlbyWjerRUZtF6Sf3Nrd8Hn+wy3HfaoF43FZ6tcT4A2rV5 XHUHV26kEu8iWpKXjaPWEhpjrQbodARgkN+LAE0igLXj7AaucRIwvyKhij94TVA+t7tZ gc0ccjmJeHY7P/UusW3S7lD/QKRW+vTb55+f8VISLe32Cc8Ub6/Br4u4H7dY5x7vS9Xz Sr6RKWqTpAZ/u599LM+AuEP/OcqLnCbd7cL/SiCUEb0NVlx+M7epK4bV1aj6jPQ9u90X 8a9ysDpHG4dme6BYSi1q/vpohKaQmvp0JBQOm9Il6YRfePjeIjfhrJVu2zFaWyOEz8FP f6IA== X-Gm-Message-State: AJaThX7A18D8o6SS1QqQka3vayH1QWXHT3RS06OV3lUZIRn6sQBJzs09 k/9wkzzagyyDHln1SEHOmbnH6w== X-Received: by 10.80.207.134 with SMTP id h6mr14543104edk.189.1510060577959; Tue, 07 Nov 2017 05:16:17 -0800 (PST) Received: from node.shutemov.name (mm-29-3-84-93.mgts.dynamic.pppoe.byfly.by. [93.84.3.29]) by smtp.gmail.com with ESMTPSA id k51sm1377759ede.42.2017.11.07.05.16.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 05:16:17 -0800 (PST) Received: by node.shutemov.name (Postfix, from userid 1000) id 67424648D520; Tue, 7 Nov 2017 16:16:16 +0300 (+03) Date: Tue, 7 Nov 2017 16:16:16 +0300 From: "Kirill A. Shutemov" To: Florian Weimer Cc: Nicholas Piggin , "Aneesh Kumar K.V" , "Kirill A. Shutemov" , linuxppc-dev@lists.ozlabs.org, linux-mm , Andrew Morton , Andy Lutomirski , Dave Hansen , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , linux-arch@vger.kernel.org, Ingo Molnar , Linux Kernel Mailing List Subject: Re: POWER: Unexpected fault when writing to brk-allocated memory Message-ID: <20171107131616.342goolaujjsnjge@node.shutemov.name> References: <20171106174707.19f6c495@roar.ozlabs.ibm.com> <24b93038-76f7-33df-d02e-facb0ce61cd2@redhat.com> <20171106192524.12ea3187@roar.ozlabs.ibm.com> <546d4155-5b7c-6dba-b642-29c103e336bc@redhat.com> <20171107160705.059e0c2b@roar.ozlabs.ibm.com> <20171107111543.ep57evfxxbwwlhdh@node.shutemov.name> <20171107114422.bgnm5k6w2zqjoazc@node.shutemov.name> <7fc1641b-361c-2ee2-c510-f7c64d173bf8@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7fc1641b-361c-2ee2-c510-f7c64d173bf8@redhat.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 07, 2017 at 02:05:42PM +0100, Florian Weimer wrote: > On 11/07/2017 12:44 PM, Kirill A. Shutemov wrote: > > On Tue, Nov 07, 2017 at 12:26:12PM +0100, Florian Weimer wrote: > > > On 11/07/2017 12:15 PM, Kirill A. Shutemov wrote: > > > > > > > > First of all, using addr and MAP_FIXED to develop our heuristic can > > > > > never really give unchanged ABI. It's an in-band signal. brk() is a > > > > > good example that steadily keeps incrementing address, so depending > > > > > on malloc usage and address space randomization, you will get a brk() > > > > > that ends exactly at 128T, then the next one will be > > > > > > DEFAULT_MAP_WINDOW, and it will switch you to 56 bit address space. > > > > > > > > No, it won't. You will hit stack first. > > > > > > That's not actually true on POWER in some cases. See the process maps I > > > posted here: > > > > > > > > > > Hm? I see that in all three cases the [stack] is the last mapping. > > Do I miss something? > > Hah, I had not noticed. Occasionally, the order of heap and stack is > reversed. This happens in approximately 15% of the runs. Heh. I guess ASLR on Power is too fancy :) That's strange layout. It doesn't give that much (relatively speaking) virtual address space for both stack and heap to grow. -- Kirill A. Shutemov From 1583412776185510581@xxx Tue Nov 07 13:08:16 +0000 2017 X-GM-THRID: 1583404961130869946 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread