Received: by 10.213.65.68 with SMTP id h4csp343613imn; Fri, 30 Mar 2018 06:40:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ldXL1oFJVVdYLtQoN0ElwD1x1RCgnU4w3xJR7xwyqKQGZHFNXus7gEQnbviY8EHMMZ5PZ X-Received: by 2002:a17:902:1e2:: with SMTP id b89-v6mr12789974plb.389.1522417240576; Fri, 30 Mar 2018 06:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522417240; cv=none; d=google.com; s=arc-20160816; b=vm9+OJoPLZwpmLFmQbhnzhXZjJ6x5olrrjmLyWaXNYNZ5j8jb8FNKUhpQ0d56G8brn 2mugPYDEAjdLMGefW7DE5S9UVhn9ldT/VIT+aJn3kuv44I8T+MKIB1lRSqiWmRFx1nMH W2UspX1qLmieEV+3/6nQZ80nwVR+/Rj2Bm5X2ZIGpN9c6m41op8P+/QEPS8dNnNc4wfs b+5NZOY12twvpLCbdAtfqT4JzZ7gsVnG2i/fofdiXAVFXHtJKkaOianECYBZbaKH/02U GB6UpoJ61IWFDlwmOJ89obZKeV+tEXAl0dbSrX1d2HAjaRzNWv4wO6TWahOEuNmZDU+c YmiA== 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:arc-authentication-results; bh=unLrJkcKTk4y8YOSC9S+MVfHaBZqaDdQtlIp+z/u4xQ=; b=LgbIG1lk9VIjJScOlfzgcxaqQ9HeQEz55Ci8KhuwA2T64YULres4tzJz1dt5Ce6H9b Q/e5w28CS7A8Og4lMV8/kpcl6ZkqZvqY0P9PdAckMAXhGQ11sOeRZATf4Dko/WlkQsEH XnxNVhQ/zpHngPuDGNInaSDP44AUbzvsEZn2KbEHr1782FQepKQ9R50qaO+PuMlosC/U XYEwYADQJ4pnexZXitXJluIJt71v2OClKsfjewO4TnOcBmSjfx8HyoJ4bh31Zvoi4/jR FiBpwIeGbLWpLKg76vVVAodn1r/jdzsv0ZJXM6vomCV7AeiXE4ZGw/2/dmnlrvpHHRuG cwIQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1-v6si8413208plb.127.2018.03.30.06.39.54; Fri, 30 Mar 2018 06:40:40 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752222AbeC3NhC (ORCPT + 99 others); Fri, 30 Mar 2018 09:37:02 -0400 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:33596 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbeC3Ng5 (ORCPT ); Fri, 30 Mar 2018 09:36:57 -0400 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1f1uA8-0002L6-00; Fri, 30 Mar 2018 13:33:48 +0000 Date: Fri, 30 Mar 2018 09:33:48 -0400 From: Rich Felker To: Pavel Machek Cc: Ilya Smith , rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com, vgupta@synopsys.com, linux@armlinux.org.uk, tony.luck@intel.com, fenghua.yu@intel.com, jhogan@kernel.org, ralf@linux-mips.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, ysato@users.sourceforge.jp, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, nyc@holomorphy.com, viro@zeniv.linux.org.uk, arnd@arndb.de, gregkh@linuxfoundation.org, deepa.kernel@gmail.com, mhocko@suse.com, hughd@google.com, kstewart@linuxfoundation.org, pombredanne@nexb.com, akpm@linux-foundation.org, steve.capper@arm.com, punit.agrawal@arm.com, paul.burton@mips.com, aneesh.kumar@linux.vnet.ibm.com, npiggin@gmail.com, keescook@chromium.org, bhsharma@redhat.com, riel@redhat.com, nitin.m.gupta@oracle.com, kirill.shutemov@linux.intel.com, dan.j.williams@intel.com, jack@suse.cz, ross.zwisler@linux.intel.com, jglisse@redhat.com, willy@infradead.org, aarcange@redhat.com, oleg@redhat.com, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap. Message-ID: <20180330133348.GR1436@brightrain.aerifal.cx> References: <1521736598-12812-1-git-send-email-blackzert@gmail.com> <20180330075508.GA21798@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180330075508.GA21798@amd> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 30, 2018 at 09:55:08AM +0200, Pavel Machek wrote: > Hi! > > > Current implementation doesn't randomize address returned by mmap. > > All the entropy ends with choosing mmap_base_addr at the process > > creation. After that mmap build very predictable layout of address > > space. It allows to bypass ASLR in many cases. This patch make > > randomization of address on any mmap call. > > How will this interact with people debugging their application, and > getting different behaviours based on memory layout? > > strace, strace again, get different results? Normally gdb disables ASLR for the process when invoking a program to debug. I don't see why that would be terribly useful with strace but you can do the same if you want. Rich