Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756188AbbKDAtb (ORCPT ); Tue, 3 Nov 2015 19:49:31 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:54180 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755670AbbKDAt2 (ORCPT ); Tue, 3 Nov 2015 19:49:28 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Andrew Morton Cc: Daniel Cashman , linux-kernel@vger.kernel.org, linux@arm.linux.org.uk, keescook@chromium.org, mingo@kernel.org, linux-arm-kernel@lists.infradead.org, corbet@lwn.net, dzickus@redhat.com, xypron.glpk@gmx.de, jpoimboe@redhat.com, kirill.shutemov@linux.intel.com, n-horiguchi@ah.jp.nec.com, aarcange@redhat.com, mgorman@suse.de, tglx@linutronix.de, rientjes@google.com, linux-mm@kvack.org, linux-doc@vger.kernel.org, salyzyn@android.com, jeffv@google.com, nnk@google.com, dcashman References: <1446574204-15567-1-git-send-email-dcashman@android.com> <20151103160410.34bbebc805c17d2f41150a19@linux-foundation.org> Date: Tue, 03 Nov 2015 18:40:31 -0600 In-Reply-To: <20151103160410.34bbebc805c17d2f41150a19@linux-foundation.org> (Andrew Morton's message of "Tue, 3 Nov 2015 16:04:10 -0800") Message-ID: <87k2pyppfk.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX1+fTxVSvmhwtvhtmGkb96WLy8cwWl8U+0c= X-SA-Exim-Connect-IP: 67.3.201.231 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_02 5+ unique symbols in subject * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Andrew Morton X-Spam-Relay-Country: X-Spam-Timing: total 614 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 4.1 (0.7%), b_tie_ro: 3.0 (0.5%), parse: 0.89 (0.1%), extract_message_metadata: 16 (2.5%), get_uri_detail_list: 1.69 (0.3%), tests_pri_-1000: 6 (1.0%), tests_pri_-950: 1.19 (0.2%), tests_pri_-900: 1.06 (0.2%), tests_pri_-400: 24 (3.9%), check_bayes: 23 (3.7%), b_tokenize: 6 (1.0%), b_tok_get_all: 8 (1.2%), b_comp_prob: 3.0 (0.5%), b_tok_touch_all: 3.7 (0.6%), b_finish: 0.69 (0.1%), tests_pri_0: 252 (41.1%), tests_pri_500: 306 (49.8%), poll_dns_idle: 299 (48.6%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v2 1/2] mm: mmap: Add new /proc tunable for mmap_base ASLR. X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1594 Lines: 40 Andrew Morton writes: > On Tue, 3 Nov 2015 10:10:03 -0800 Daniel Cashman wrote: > >> ASLR currently only uses 8 bits to generate the random offset for the >> mmap base address on 32 bit architectures. This value was chosen to >> prevent a poorly chosen value from dividing the address space in such >> a way as to prevent large allocations. This may not be an issue on all >> platforms. Allow the specification of a minimum number of bits so that >> platforms desiring greater ASLR protection may determine where to place >> the trade-off. > > Can we please include a very good description of the motivation for this > change? What is inadequate about the current code, what value does the > enhancement have to our users, what real-world problems are being solved, > etc. > > Because all we have at present is "greater ASLR protection", which doesn't > really tell anyone anything. The description seemed clear to me. More random bits, more entropy, more work needed to brute force. 8 bits only requires 256 tries (or a 1 in 256) chance to brute force something. We have seen in the last couple of months on Android how only having 8 bits doesn't help much. Each additional bit doubles the protection (and unfortunately also increases fragmentation of the userspace address space). Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/