Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754073Ab2KGEmg (ORCPT ); Tue, 6 Nov 2012 23:42:36 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:32604 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753566Ab2KGEmf (ORCPT ); Tue, 6 Nov 2012 23:42:35 -0500 Message-ID: <5099E6A4.7050802@oracle.com> Date: Wed, 07 Nov 2012 12:42:12 +0800 From: Jeff Liu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 MIME-Version: 1.0 To: Kees Cook CC: akpm@linux-foundation.org, aedilger@gmail.com, alan@linux.intel.com, arnn@arndb.de, gregkh@linuxfoundation.org, jakub@redhat.com, james.l.morris@oracle.com, john.sobecki@oracle.com, tytso@mit.edu, viro@zeniv.linux.org.uk, LKML Subject: Re: + binfmt_elfc-use-get_random_int-to-fix-entropy-depleting.patch added to -mm tree References: <20121107001609.9B7A9100047@wpzn3.hot.corp.google.com> <5099E1C7.5000007@oracle.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1535 Lines: 32 On 11/07/2012 12:29 PM, Kees Cook wrote: > On Tue, Nov 6, 2012 at 8:21 PM, Jeff Liu wrote: >> Hi Andrew and Kees, >> >> Great thanks for both your comments! >> >> On 11/07/2012 09:11 AM, Kees Cook wrote: >>> Hrm, I don't like this. get_random_int() specifically says: "Get a >>> random word for internal kernel use only." The intent of AT_RANDOM is >>> for userspace pRNG seeding (though glibc currently uses it directly >>> for stack protector and pointer mangling), which is not "internal >>> kernel use only". :) Though I suppose this is already being used for >>> the randomize_stack_top(), but I think it'd still be better to use >>> higher quality bits. >> Btw Kees, does it sounds make sense if we just return the 16 bytes >> uninitialized stack array if the user disable the stack randomize via >> "/proc/sys/kernel/randomize_va_space = 0" or via the related sysctl, or >> even specified norandmaps on boot? > > No, I feel that ASLR (randomize_va_space) is distinctly separate from > how glibc uses AT_RANDOM (stack protector and pointer mangling). > AT_RANDOM should remain active even if randomize_va_space is 0. Ok, I was confused about the semantics of ASLR, thanks for your clarification, will post another patch soon according to your feedback. -Jeff -- 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/