From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 848D9C2D0E4 for ; Tue, 17 Nov 2020 16:55:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4F9C824248 for ; Tue, 17 Nov 2020 16:55:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="lq3YVcTw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F9C824248 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8B2466B007E; Tue, 17 Nov 2020 11:55:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 83C456B0080; Tue, 17 Nov 2020 11:55:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 704066B0081; Tue, 17 Nov 2020 11:55:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0049.hostedemail.com [216.40.44.49]) by kanga.kvack.org (Postfix) with ESMTP id 404A36B007E for ; Tue, 17 Nov 2020 11:55:03 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D4C8F180AD81A for ; Tue, 17 Nov 2020 16:55:02 +0000 (UTC) X-FDA: 77494510044.14.bikes41_220b24327333 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id AE02F18229835 for ; Tue, 17 Nov 2020 16:55:02 +0000 (UTC) X-HE-Tag: bikes41_220b24327333 X-Filterd-Recvd-Size: 2341 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Tue, 17 Nov 2020 16:55:01 +0000 (UTC) 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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/