From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next] neighbor: Add protocol attribute Date: Mon, 10 Dec 2018 19:47:33 -0700 Message-ID: References: <8c071e1e-0211-5e7b-a150-a5e942d8da96@gmail.com> <0e223b2f-0677-2450-c75d-1ce18a6c017b@gmail.com> <20181207.154553.2153174795925914538.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com To: David Miller , eric.dumazet@gmail.com Return-path: Received: from mail-pg1-f195.google.com ([209.85.215.195]:33812 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728031AbeLKCri (ORCPT ); Mon, 10 Dec 2018 21:47:38 -0500 Received: by mail-pg1-f195.google.com with SMTP id 17so5930791pgg.1 for ; Mon, 10 Dec 2018 18:47:37 -0800 (PST) In-Reply-To: <20181207.154553.2153174795925914538.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/7/18 4:45 PM, David Miller wrote: > > Right, neigh->ha[] should probably be kept 8-byte aligned. > >>From what I can see ha is only used with memcpy, and neighbour struct is annotated with __randomize_layout. Are you saying that ha should be marked with __aligned(8)? @@ -150,7 +150,7 @@ struct neighbour { __u8 type; __u8 dead; seqlock_t ha_lock; - unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; + unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))] __aligned(8); struct hh_cache hh; int (*output)(struct neighbour *, struct sk_buff *); const struct neigh_ops *ops;