From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754232AbcEDQrP (ORCPT ); Wed, 4 May 2016 12:47:15 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:39720 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbcEDQrO convert rfc822-to-8bit (ORCPT ); Wed, 4 May 2016 12:47:14 -0400 Date: Wed, 04 May 2016 12:47:12 -0400 (EDT) Message-Id: <20160504.124712.1261854747800227136.davem@davemloft.net> To: nicolas.dichtel@6wind.com Cc: netdev@vger.kernel.org, philipp.reisner@linbit.com, drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2] block/drbd: use nla_put_u64_64bit() From: David Miller In-Reply-To: <5729EFBC.7040002@6wind.com> References: <20160503.120556.1317913903199470646.davem@davemloft.net> <20160504090529.GJ16459@soda.linbit> <5729EFBC.7040002@6wind.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 04 May 2016 09:47:13 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Dichtel Date: Wed, 4 May 2016 14:49:00 +0200 > Le 04/05/2016 11:05, Lars Ellenberg a écrit : > [snip] >> We don't have an "alignment problem" there, btw. >> Last time I checked, we did work fine without this alignment magic, >> we already take care of that, yes, even on affected architectures. > The code adds several consecutive u64 attributes. The nl attribute header is 4 > bytes, thus the full attribute length is 12 bytes. If the first u64 is aligned > on 8 (nla_data()), the next one is not aligned on 8: it starts 12 bytes (8 (u64) > + 4 (nl attr hdr)) after the previous u64. Right.