From patchwork Wed Feb 12 01:33:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 3633661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D252ABF13A for ; Wed, 12 Feb 2014 01:34:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6764020204 for ; Wed, 12 Feb 2014 01:34:08 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60BBD20123 for ; Wed, 12 Feb 2014 01:34:07 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDOi5-0003hO-U4; Wed, 12 Feb 2014 01:33:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDOi3-000253-HZ; Wed, 12 Feb 2014 01:33:55 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDOhz-00023D-Qr for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2014 01:33:53 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 892FA13F121; Wed, 12 Feb 2014 01:33:32 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 7C41913F306; Wed, 12 Feb 2014 01:33:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lauraa-linux1.qualcomm.com (i-global252.qualcomm.com [199.106.103.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lauraa@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E1B5313F121; Wed, 12 Feb 2014 01:33:31 +0000 (UTC) From: Laura Abbott To: Grant Likely , Rob Herring , Arnd Bergmann Subject: [RFC/PATCH 2/3] arm: Add ARCH_WANT_OF_RANDOMNESS Date: Tue, 11 Feb 2014 17:33:24 -0800 Message-Id: <1392168805-14200-3-git-send-email-lauraa@codeaurora.org> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1392168805-14200-1-git-send-email-lauraa@codeaurora.org> References: <1392168805-14200-1-git-send-email-lauraa@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140211_203352_037700_FDE8BA95 X-CRM114-Status: GOOD ( 13.20 ) X-Spam-Score: -2.5 (--) Cc: devicetree@vger.kernel.org, Laura Abbott , Kees Cook , linux-kernel@vger.kernel.org, Kumar Gala , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The stack canary for ARM is currently the same across reboots due to lack of randomness early enough. Add ARCH_WANT_OF_RANDOMNESS to allow devices to add whatever randomness they need. Signed-off-by: Laura Abbott --- arch/arm/Kconfig | 3 +++ arch/arm/kernel/vmlinux.lds.S | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e254198..7ab0db1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -222,6 +222,9 @@ config NEED_RET_TO_USER config ARCH_MTD_XIP bool +config ARCH_WANT_OF_RANDOMNESS + def_bool n + config VECTORS_BASE hex default 0xffff0000 if MMU || CPU_HIGH_VECTOR diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 7bcee5c..2198258 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -202,6 +202,7 @@ SECTIONS INIT_SETUP(16) INIT_CALLS CON_INITCALL + EARLY_RANDOM_FUNCS SECURITY_INITCALL INIT_RAM_FS }