Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4005619pxb; Tue, 17 Nov 2020 08:57:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlD7pzpmBtrt2H+8sk79pYxa1N1+uzbgEDAo6+eewC4evB9xmQHMx0YLKfbOFQ/rVP9L4X X-Received: by 2002:a50:f604:: with SMTP id c4mr21264280edn.117.1605632268539; Tue, 17 Nov 2020 08:57:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605632268; cv=none; d=google.com; s=arc-20160816; b=XyFf6ekkrKOPKyzE0IdsYpf3wB1y8/Hszb+dMMlSn68U8N81YY3qJZv6MI+XZDtbkm vx55aaGmsFBnNS4FgteyzcJJ2BxOYu+DzqM+tts5lc01h0e1lijt8rhce6AH7ADkKMkt x7Fj90VQOYRmZd3mAFMM3GHis44oqfhuGxRt+yNu4Rm+yvIZHTkzf7kMnLYVfn5JF/uP 7l0jFbpKtlVKt5XZHIpo+NGsxOW3SpZ3rNNUyaNrcEVs9jAJavGRzAyhr4D7kk4IJrTf EXms/77SJ6yn5JwkE3yIupC1h9t1V5fg/eZrtFiqKUlosNGxf3bBg4OMcsjEn+NI3QLW tMbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SW6fmODD6xDvsJn1TWGyEiF//LJjiV8+TjvQ1ySSA88=; b=UZ1ntZdOQ72xvi/+SMU0b+8+RqhA5+ibeQukyrnGd8SLTwhWzRiN2w5CiNZo0hGWJo iDQXSM/Bg1XJIt4lKsIYwVPpFMJGXuJBHSdncWZDDfQmq/y87DPxqkQA9H3uIdL18fJc vospml5NW0mZAfz9lJZR2H+2Fc54JR4EUYne1izoDSp8JmmlnWZMIq5QXD+mc5lqymfN /lvluOJvw1cdmg7KBeh9lAUv/bW32ubfdvc5xR0CUOX7S7/oGuM0hPfNs8O1Dm8c8MmV VmDg6vr+I3UaE8+EYRnEcK27l7F13GdjwQ7Bv1lJ18bP3lUNueNVqRnLL5CU01XZI/Yc IfEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=lq3YVcTw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk12si14683773ejb.591.2020.11.17.08.57.24; Tue, 17 Nov 2020 08:57:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=lq3YVcTw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727649AbgKQQy7 (ORCPT + 99 others); Tue, 17 Nov 2020 11:54:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727410AbgKQQy7 (ORCPT ); Tue, 17 Nov 2020 11:54:59 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AD06C0613CF; Tue, 17 Nov 2020 08:54:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SW6fmODD6xDvsJn1TWGyEiF//LJjiV8+TjvQ1ySSA88=; b=lq3YVcTwd+YGG+6GKyTS2U/4rZ DH6zs9aNY7ifK5VmgM634jEFYzU+8ke9yjK9E2ysRtCijFn/0j16tWqdg627im/7uemflFmhT6Wrn aCARA0U74C4pI5wvVn0clSIzsiclO4FKldfvYQIUER2zef3Jcrchy9LGgmAAs0QvfYqKmp7g4aPCd BF1qHl6azNXXwj7eiOoJqvcgNICKuM1cEn0kxZboM8XzAAvRlVbdeWzKr086R7IoSYhHMpIqQahhA raFwLkGrH9u78GQfJQwVf8q/TLVUBai4znYY/Ae3TvXPo/7q2ZXfnBt0ggYFBlL93o9QhhVIsx1f7 ZcuJsSow==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kf4Fr-0003VZ-MI; Tue, 17 Nov 2020 16:54:56 +0000 Date: Tue, 17 Nov 2020 16:54:55 +0000 From: Matthew Wilcox To: Topi Miettinen Cc: linux-hardening@vger.kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jann Horn , Kees Cook , Mike Rapoport Subject: Re: [PATCH v4] mm: Optional full ASLR for mmap() and mremap() Message-ID: <20201117165455.GN29991@casper.infradead.org> References: <20201026160518.9212-1-toiwoton@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201026160518.9212-1-toiwoton@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 26, 2020 at 06:05:18PM +0200, Topi Miettinen wrote: > Writing a new value of 3 to /proc/sys/kernel/randomize_va_space > enables full randomization of memory mappings created with mmap(NULL, > ...). With 2, the base of the VMA used for such mappings is random, > but the mappings are created in predictable places within the VMA and > in sequential order. With 3, new VMAs are created to fully randomize > the mappings. Also mremap(..., MREMAP_MAYMOVE) will move the mappings > even if not necessary. Is this worth it? https://www.ndss-symposium.org/ndss2017/ndss-2017-programme/aslrcache-practical-cache-attacks-mmu/