Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753046AbdHNQt1 (ORCPT ); Mon, 14 Aug 2017 12:49:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23437 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166AbdHNQnN (ORCPT ); Mon, 14 Aug 2017 12:43:13 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F2EA22DE42D Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=oleg@redhat.com Date: Mon, 14 Aug 2017 18:43:10 +0200 From: Oleg Nesterov To: "Kirill A. Shutemov" Cc: Dmitry Safonov , Thomas Gleixner , Andy Lutomirski , Borislav Petkov , Cyrill Gorcunov , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] x86: fix norandmaps Message-ID: <20170814164310.GA9897@redhat.com> References: <20170710111429.GA20038@redhat.com> <20170814162457.w7ddsrmco73cfbai@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170814162457.w7ddsrmco73cfbai@node.shutemov.name> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 14 Aug 2017 16:43:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 865 Lines: 25 On 08/14, Kirill A. Shutemov wrote: > > On Mon, Jul 10, 2017 at 01:14:29PM +0200, Oleg Nesterov wrote: > > Documentation/admin-guide/kernel-parameters.txt says: > > > > norandmaps Don't use address space randomization. Equivalent > > to echo 0 > /proc/sys/kernel/randomize_va_space > > > > but it doesn't work because arch_rnd() which is used to randomize > > mm->mmap_base returns a random value unconditionally. > > > > Shift the PF_RANDOMIZE check from arch_mmap_rnd() to arch_rnd(). > > > > Fixes: 1b028f784e8c ("x86/mm: Introduce mmap_compat_base() for 32-bit mmap()") > > Signed-off-by: Oleg Nesterov > > It also fixes personality(ADDR_NO_RANDOMIZE). Yes, good point. > Acked-by: Kirill A. Shutemov OK, thanks Kirill and Cyrill, I'll resend tomorrow with all acks I got. Oleg.