Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756004Ab3EWIKW (ORCPT ); Thu, 23 May 2013 04:10:22 -0400 Received: from 7of9.schinagl.nl ([88.159.158.68]:35660 "EHLO 7of9.schinagl.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372Ab3EWIKS (ORCPT ); Thu, 23 May 2013 04:10:18 -0400 Message-ID: <519DCEE9.6070208@schinagl.nl> Date: Thu, 23 May 2013 10:10:17 +0200 From: Oliver Schinagl User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130322 Thunderbird/17.0.4 MIME-Version: 1.0 To: Linus Walleij CC: Maxime Ripard , Arnd Bergmann , Greg KH , Oliver Schinagl , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 1/2] Initial support for Allwinner's Security ID fuses References: <1368797744-13737-1-git-send-email-oliver+list@schinagl.nl> <1368797744-13737-2-git-send-email-oliver+list@schinagl.nl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1793 Lines: 44 On 05/23/13 09:56, Linus Walleij wrote: > On Fri, May 17, 2013 at 3:35 PM, Oliver Schinagl > wrote: > > (...) >> While initially these fuses are used to somewhat determin the chipID, these >> appear to be writeable by the user and thus can be used for other purpouses. >> For example storing a 128 bit root key, a unique serial number, which could >> then even be used as a MAC address. > (...) > Then follows some code to read out the keys from sysfs I guess.. >> +static int __init sid_probe(struct platform_device *pdev) > > It's really simple to actually make the kernel use this to seed the > entropy pool. > > #include > add_device_randomness(u8 *, num); > > If you know after probe that you can read out a number of bytes > of device-unique data, I think you should add those bytes to the > entropy pool like this. While that is a great idea, we can't guarantee device uniqueness. We've already seen some chips that where 'forgotten' to program and default set to all 0. I guess that doesn't have to be a bad thing. Then, i'm not sure if the driver is the best for this to be loaded? Maxime, what do you think? Personally I would feel more in having this in the mach-sunxi/core.c bit, but then again, this is currently a module and wouldn't be useful to have there. Maxime is far more knowledgeable to answer that. It should probably be noted, that the sunxi series have a hardware crypto engine, with hardware random seed generator, one for a later project. > > Yours, > Linus Walleij > -- 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/