From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932239AbbJUNL7 (ORCPT ); Wed, 21 Oct 2015 09:11:59 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49897 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbbJUNL6 (ORCPT ); Wed, 21 Oct 2015 09:11:58 -0400 Date: Wed, 21 Oct 2015 09:11:43 -0400 From: Sowmini Varadhan To: David Miller Cc: steffen.klassert@secunet.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, herbert@gondor.apana.org.au, dhowells@redhat.com, zohar@linux.vnet.ibm.com, David.Woodhouse@intel.com Subject: Re: [PATCH net-next 2/2] xfrm: Fix unaligned access in xfrm_notify_sa() for DELSA Message-ID: <20151021131143.GQ6948@oracle.com> References: <20151021065704.GM7701@secunet.com> <20151021105442.GM6948@oracle.com> <20151021123628.GP6948@oracle.com> <20151021.062213.273447452472704627.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151021.062213.273447452472704627.davem@davemloft.net> 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 On (10/21/15 06:22), David Miller wrote: > memcpy() _never_ works for avoiding unaligned accessed. > > I repeat, no matter what you do, no matter what kinds of casts or > fancy typing you use, memcpy() _never_ works for this purpose. : > There is one and only one portable way to access unaligned data, > and that is with the get_unaligned() and put_unaligned() helpers. ok. I'll fix it up to use the *_unaligned functions and resend this out later today. --Sowmini