From patchwork Thu Jun 18 14:47:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 50049 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C5CAF228CC for ; Thu, 18 Jun 2015 14:50:10 +0000 (UTC) Received: by laar3 with SMTP id r3sf9654998laa.1 for ; Thu, 18 Jun 2015 07:50:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=sSb5sPVaShmeo84kf4mtCOdChXFQXoqQ9iDoGp1NE7I=; b=g9a/1JVQ4JgJV6llW+TucshAOHtM3ROCaKxTDzTbF1FxFgL8KXSPIjG6KWrSFBkkdT aAXA6nrPE+lxXsZtBzJMuSeUZlgEVg6SBcFWBekDzIwHzDlNU5ghD2ky77TGF1BR86AN xV1f9IarxEo8JE3O0TMOF1mprhmJmzZWsDWb3aPdIHlBeC0Y+hwJLwkqIZdhs/Gbpqf4 c5KoWS1tVw+vDaSE3Fidz5zy9vZ2yn5Fk/rnLDcUH2NGcSC0xIRzbU27u0BUW5xTaGB2 nkttQNmHTv7ZwmcBi8HRjXQoQVwpJwDzBP1zreWN1JkJ0/qobnEKZJAA8tezdLmWb4cE eZtw== X-Gm-Message-State: ALoCoQkg89mDkmsEoJSgx1TMPBaukzx6JyH51j3Y4pSh+vex3FSMPYWmgn3YInuugTKQPJo30VSa X-Received: by 10.112.42.236 with SMTP id r12mr10677282lbl.2.1434639009675; Thu, 18 Jun 2015 07:50:09 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.163 with SMTP id t3ls482491lat.6.gmail; Thu, 18 Jun 2015 07:50:09 -0700 (PDT) X-Received: by 10.112.162.38 with SMTP id xx6mr13329899lbb.110.1434639009452; Thu, 18 Jun 2015 07:50:09 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id z9si1093474lba.29.2015.06.18.07.50.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2015 07:50:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbti3 with SMTP id ti3so53934722lbb.1 for ; Thu, 18 Jun 2015 07:50:09 -0700 (PDT) X-Received: by 10.112.220.7 with SMTP id ps7mr13148371lbc.72.1434639009317; Thu, 18 Jun 2015 07:50:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1234800lbb; Thu, 18 Jun 2015 07:50:08 -0700 (PDT) X-Received: by 10.68.98.133 with SMTP id ei5mr21898963pbb.51.1434639007693; Thu, 18 Jun 2015 07:50:07 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id bs1si11593466pad.232.2015.06.18.07.50.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2015 07:50:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5b76-0001yp-RF; Thu, 18 Jun 2015 14:48:20 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5b6u-0001gJ-J4 for linux-arm-kernel@lists.infradead.org; Thu, 18 Jun 2015 14:48:09 +0000 Received: by laka10 with SMTP id a10so56028875lak.0 for ; Thu, 18 Jun 2015 07:47:44 -0700 (PDT) X-Received: by 10.152.37.67 with SMTP id w3mr13194437laj.123.1434638864747; Thu, 18 Jun 2015 07:47:44 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id p6sm1829486laj.41.2015.06.18.07.47.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2015 07:47:43 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Mika Westerberg , Hartley Sweeten , Ryan Mallon Subject: [PATCH] ARM: ep93xx: toss the device ID into the entropy pool Date: Thu, 18 Jun 2015 16:47:39 +0200 Message-Id: <1434638859-27381-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150618_074808_878431_52572F58 X-CRM114-Status: GOOD ( 10.77 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.49 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.49 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Linus Walleij , Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 It doesn't hurt to add this random stuff into the entropy pool as is custom to do with device-unique numbers. Signed-off-by: Linus Walleij --- arch/arm/mach-ep93xx/core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 5e2151bcc0c5..c393b1b0310d 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -862,6 +863,12 @@ static const char __init *ep93xx_get_soc_id(void) if (id != id2) return "invalid"; + /* Toss the unique ID into the entropy pool */ + add_device_randomness(&id2, 4); + add_device_randomness(&id3, 4); + add_device_randomness(&id4, 4); + add_device_randomness(&id5, 4); + snprintf(ep93xx_soc_id, sizeof(ep93xx_soc_id), "%08x%08x%08x%08x", id2, id3, id4, id5);