Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbcDURpW (ORCPT ); Thu, 21 Apr 2016 13:45:22 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:25137 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbcDURpU (ORCPT ); Thu, 21 Apr 2016 13:45:20 -0400 Date: Thu, 21 Apr 2016 13:44:42 -0400 From: Sowmini Varadhan To: Tadeusz Struk Cc: linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au, smueller@chronox.de, mmarek@suse.com, arnd@arndb.de, andrew.zaborowski@intel.com Subject: Re: [PATCH] lib/mpi: Fix kernel unaligned acces in mpi_write_to_sgl Message-ID: <20160421174442.GD25698@oracle.com> References: <20160421110736.GL22060@oracle.com> <57190C88.8000608@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57190C88.8000608@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 509 Lines: 19 On (04/21/16 10:23), Tadeusz Struk wrote: > > What if the mpi_limb_t will happen to be 64 bit? > Thanks, When I checked this with cscope, I found typedef unsigned long int mpi_limb_t; thus I used the *32 functions. But you obviously know better, since you wrote this code (and bug). If you anticipate that mpi_limb_t in some environment today, I can check for sizeof(mpi_limb_t), and predicate it to use the *32 or *64 functions based on the result. Do you think that is necessary? Regards, --Sowmini