Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp915773yba; Thu, 9 May 2019 07:55:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWp+0NO/nSbg4ij3TtfPiBvj0PeQfDk41JyqRpR8WUbsSbXYmUbD2rBreGvOofT70SRpbD X-Received: by 2002:a63:b53:: with SMTP id a19mr5989765pgl.216.1557413742600; Thu, 09 May 2019 07:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557413742; cv=none; d=google.com; s=arc-20160816; b=UWdRDoFRU0ZxflfxEHVGk7fH4L4pc69vrkfhM67GTc8yBYCefYDusUoHw/45jE9jwr oQDUD2HiURMdTulhijNvE9B08Bu47q0FS6V8sz6NhkO3z8BiF3rcM/NDaH/s4lkxoIx1 N9NTTU5fmtwt0ph4IyIqC3vi5WOl3szX3etML5TS3KvJ4A8qKeE7rLqthdJqbJYSn2Sy 8iAcJW1aj7XXrGrC86tc3exVd2Z84d4n8icMRGBygHOsqUEWGInBh2SC9V12iGEcQ8yN b4zRF8vehWS4GuMEgPLKBeF6mmHqV1K6ifnYcQJEHfnBPy49gdp8w7XI9GfsYJpqu61d PCDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=cFStmXudmPAxY7E99fwGVsjcTzYKxyavw7olWzPnElg=; b=y/wOz7SIHQS4OpqDzrEs6yZkjFOjd7UEWfangONzElvyMDNDrGL6sdO9ZkBcWFFI/q lzNuvdunH41Ery3s6HxVnIdLttUI1CyqKVkqz92FUjBPKU5adlShdh3lViiMZwc4lvhJ JDtFyMCQd8wh+5bb/n6JRPpFYm7MvdxGBsl8CbE7ww3Sv7eTw2MFsbcWHtcCh2DF0/i5 Qn14N9UvfVqfIcGrhUeoDwodjsKb320QUq9EzXgmZh3WdzyRL6g55SM8LX3Gc7ubtZ8H V/6d3eIfkfNGuKH+Dz+xcN28rhixLmOTGmjN57AIvCWPphLqwmqdCe5Sdx/Z4jLa4Pl3 fXjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24si2912905plr.255.2019.05.09.07.55.28; Thu, 09 May 2019 07:55:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbfEIOyy (ORCPT + 99 others); Thu, 9 May 2019 10:54:54 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:57765 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726192AbfEIOyy (ORCPT ); Thu, 9 May 2019 10:54:54 -0400 X-UUID: 4d68c5eb26f54662a2d978ecfc2af531-20190509 X-UUID: 4d68c5eb26f54662a2d978ecfc2af531-20190509 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1440209227; Thu, 09 May 2019 22:54:49 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 9 May 2019 22:54:46 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 9 May 2019 22:54:46 +0800 Message-ID: <1557413686.23445.6.camel@mtkswgap22> Subject: Re: [PATCH 3/3] hwrng: add mt67xx-rng driver From: Neal Liu To: Herbert Xu CC: Stephan Mueller , , , , , , , , , , Date: Thu, 9 May 2019 22:54:46 +0800 In-Reply-To: <20190509052649.xfkgb3qd7rhcgktj@gondor.apana.org.au> References: <1557287937-2410-1-git-send-email-neal.liu@mediatek.com> <1557287937-2410-4-git-send-email-neal.liu@mediatek.com> <12193108.aNnqf5ydOJ@tauon.chronox.de> <1557311737.11818.11.camel@mtkswgap22> <20190509052649.xfkgb3qd7rhcgktj@gondor.apana.org.au> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-TM-SNTS-SMTP: DAF1C2FB982B2A5BC6E4832EA14731AB2E44B177010654C3FE819CDBF77FEEAE2000:8 X-MTK: N Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 2019-05-09 at 13:26 +0800, Herbert Xu wrote: > On Wed, May 08, 2019 at 06:35:37PM +0800, Neal Liu wrote: > > Hi Stephan, > > We think the cast is fine, and it cannot guarantee the buf is > > word-align. > > I reference multiple rng driver's implementation and found it's common > > usage for this. So it might be general usage for community. Is there any > > suggestion that is more appropriate? > > If you don't know whether it's unaligned or not then you should > do an unaligned operation. Hi Stephan/Herbert, My mistake. This buffer is allocated by kmalloc with larger than 32 bytes. So yes, it's word-align for sure. reference: https://elixir.bootlin.com/linux/latest/source/drivers/char/hw_random/core.c#L590 Thanks Best Regards, -Neal Liu