From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933166AbdKGLo0 (ORCPT ); Tue, 7 Nov 2017 06:44:26 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:52423 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752347AbdKGLoZ (ORCPT ); Tue, 7 Nov 2017 06:44:25 -0500 X-Google-Smtp-Source: ABhQp+SjQ1JGoTAih4GI+KUfpsz6evmK0o/ZACYNRt7SRR4ESCd11vruXi8ytEthjP1PQ3CpCwtiPw== Date: Tue, 7 Nov 2017 14:44:22 +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: <20171107114422.bgnm5k6w2zqjoazc@node.shutemov.name> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Kirill A. Shutemov From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kirill A. Shutemov" Subject: Re: POWER: Unexpected fault when writing to brk-allocated memory Date: Tue, 7 Nov 2017 14:44:22 +0300 Message-ID: <20171107114422.bgnm5k6w2zqjoazc@node.shutemov.name> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org 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 List-Id: linux-arch.vger.kernel.org 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? -- Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org