Received: by 10.223.164.202 with SMTP id h10csp867085wrb; Tue, 7 Nov 2017 16:30:33 -0800 (PST) X-Google-Smtp-Source: ABhQp+QxiDWNrqqtLd6nENJ38vNFWFQIgEAf7xMsEAcytVsn7D3mAnLYFH4Sw2Rp5wUTJX1DDxqj X-Received: by 10.99.178.77 with SMTP id t13mr474070pgo.219.1510101033473; Tue, 07 Nov 2017 16:30:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510101033; cv=none; d=google.com; s=arc-20160816; b=EZHE0dQgdtTrVBAIwmBkR8TIV54dr4iGSI2VAQi/mNYzI1bF1+i9StfvGaDRKx0ULW 0S73j1SlYr6ZWrUw+N3ApJ0MJDU4jQp5/68JHgD2UhNICfvtOg4dhaa4miQQZOlodCzo EeM56qbCCgrU+irxUoc9uQGP/akWmoZwHZI8gvDBzpqHouYZAeDZ2QrHN+Ea7f5s1x// 9l2q6pg66dep2840QPrFlV9xfVmG21htdkrEhKBJiqzmRbJ4HkVsWqYqKj/mRGKAvsLk 0/ScGq45toupoDYa7EL2gb89PX7VpRjBw1+gLhO2SmmbQaC3emOFbVNVa81BhgK5iF4i hLOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :dmarc-filter:arc-authentication-results; bh=rxHKac6zu9yqxBnNKyfh0XjpvghNwgx5helv2fp8240=; b=ziVHy8zUPtD0BLtW83NyEC/6wAWdy4dK926J4bDf89Got0vlaT346DKOvfeAPA2wlQ wMTgGS8fhGJEXsp6hCbijI7VVR6rDzyOqjOzlZlmvmDWNxKUBliisOqr4lw8LdhWC/U5 3kDZHKZMRdGEv8i2VggW6Tviqw4snalGyiMztMqGnIQK8owYVSNxc5EtD0Rlk8DHKHfw A/pqosUYlnQ0we8rNxUQCLdVbtrezKGnqNOli1LdVYPh/9hr9MLaxCyCyczEXj1hSSJc 4zzazr2tsLSKa/4jRl7imBKQgZPCLv+0u93oNQuRPKEKOzyqEtG1Xw+C4d8p/zLxpCm6 CTPg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z129si2322175pgb.30.2017.11.07.16.30.20; Tue, 07 Nov 2017 16:30:33 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933971AbdKGNFs (ORCPT + 91 others); Tue, 7 Nov 2017 08:05:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14123 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932476AbdKGNFr (ORCPT ); Tue, 7 Nov 2017 08:05:47 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1AEAC03BD52; Tue, 7 Nov 2017 13:05:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A1AEAC03BD52 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer@redhat.com Received: from oldenburg.str.redhat.com (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7BA3360C8D; Tue, 7 Nov 2017 13:05:43 +0000 (UTC) Subject: Re: POWER: Unexpected fault when writing to brk-allocated memory To: "Kirill A. Shutemov" 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 References: <20171105231850.5e313e46@roar.ozlabs.ibm.com> <871slcszfl.fsf@linux.vnet.ibm.com> <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> From: Florian Weimer Message-ID: <7fc1641b-361c-2ee2-c510-f7c64d173bf8@redhat.com> Date: Tue, 7 Nov 2017 14:05:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171107114422.bgnm5k6w2zqjoazc@node.shutemov.name> Content-Type: multipart/mixed; boundary="------------381B9005558AE185EB668BF2" Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 07 Nov 2017 13:05:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------381B9005558AE185EB668BF2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. See the attached example. Thanks, Florian --------------381B9005558AE185EB668BF2 Content-Type: text/plain; charset=UTF-8; name="maps.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="maps.txt" N2ZmZmFjYzUwMDAwLTdmZmZhY2M5MDAwMCBydy1wIDAwMDAwMDAwIDAwOjAwIDAgCjdmZmZh Y2M5MDAwMC03ZmZmYWNjZjAwMDAgci0tcCAwMDAwMDAwMCBmZDowMCAyNTE2NzkyNSAgICAg ICAgICAgICAgICAgICAvdXNyL2xpYi9sb2NhbGUvZW5fVVMudXRmOC9MQ19DVFlQRQo3ZmZm YWNjZjAwMDAtN2ZmZmFjZDAwMDAwIHItLXAgMDAwMDAwMDAgZmQ6MDAgMjUxNjc5MjggICAg ICAgICAgICAgICAgICAgL3Vzci9saWIvbG9jYWxlL2VuX1VTLnV0ZjgvTENfTlVNRVJJQwo3 ZmZmYWNkMDAwMDAtN2ZmZmFjZDEwMDAwIHItLXAgMDAwMDAwMDAgZmQ6MDAgMTY3OTg5Mjkg ICAgICAgICAgICAgICAgICAgL3Vzci9saWIvbG9jYWxlL2VuX1VTLnV0Zj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2Jpbi9jYXQKN2ZmZmFkMTIwMDAw LTdmZmZhZDEzMDAwMCByLS1wIDAwMDAwMDAwIGZkOjAwIDYzNTQzICAgICAgICAgICAgICAg ICAgICAgIC91c3IvYmluL2NhdAo3ZmZmYWQxMzAwMDAtN2ZmZmFkMTQwMDAwIHJ3LXAgMDAw MTAwMDAgZmQ6MDAgNjM1NDMgICAgICAgICAgICAgICAgICAgICAgL3Vzci9iaW4vY2F0Cjdm ZmZhZDE0MDAwMC03ZmZmYWQxNjAwMDAgci14cCAwMDAwMDAwMCAwMDowMCAwICAgICAgICAg ICAgICAgICAgICAgICAgICBbdmRzb10KN2ZmZmFkMTYwMDAwLTdmZmZhZDFhMDAwMCByLXhw IDAwMDAwMDAwIGZkOjAwIDgzOTAzMjggICAgICAgICAgICAgICAgICAgIC91c3IvbGliNjQv bGQtMi4yNS5zbwo3ZmZmYWQxYTAwMDAtN2ZmZmFkMWIwMDAwIHItLXAgMDAwMzAwMDAgZmQ6 MDAgODM5MDMyOCAgICAgICAgICAgICAgICAgICAgL3Vzci9saWI2NC9sZC0yLjI1LnNvCjdm ZmZhZDFiMDAwMC03ZmZmYWQxYzAwMDAgcnctcCAwMDA0MDAwMCBmZDowMCA4MzkwMzI4ICAg ICAgICAgICAgICAgICAgICAvdXNyL2xpYjY0L2xkLTIuMjUuc28KN2ZmZmMyY2YwMDAwLTdm ZmZjMmQyMDAwMCBydy1wIDAwMDAwMDAwIDAwOjAwIDAgICAgICAgICAgICAgICAgICAgICAg ICAgIFtzdGFja10KN2ZmZmM4YzEwMDAwLTdmZmZjOGM0MDAwMCBydy1wIDAwMDAwMDAwIDAw OjAwIDAgICAgICAgICAgICAgICAgICAgICAgICAgIFtoZWFwXQo= --------------381B9005558AE185EB668BF2-- From 1583449602710701119@xxx Tue Nov 07 22:53:37 +0000 2017 X-GM-THRID: 1583404961130869946 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread