From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [net-next 2/3] tipc: implement socket diagnostics for AF_TIPC Date: Fri, 29 Jun 2018 06:57:56 -0700 Message-ID: <0ec77195-241f-44b2-cf69-60553fc2592f@gmail.com> References: <1521639465-3169-1-git-send-email-mohan.krishna.ghanta.krishnamurthy@ericsson.com> <1521639465-3169-3-git-send-email-mohan.krishna.ghanta.krishnamurthy@ericsson.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Parthasarathy Bhuvaragan To: GhantaKrishnamurthy MohanKrishna , tipc-discussion@lists.sourceforge.net, jon.maloy@ericsson.com, maloy@donjonn.com, ying.xue@windriver.com, netdev@vger.kernel.org, davem@davemloft.net Return-path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:34935 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932529AbeF2N57 (ORCPT ); Fri, 29 Jun 2018 09:57:59 -0400 Received: by mail-pf0-f196.google.com with SMTP id a24-v6so623576pfo.2 for ; Fri, 29 Jun 2018 06:57:59 -0700 (PDT) In-Reply-To: <1521639465-3169-3-git-send-email-mohan.krishna.ghanta.krishnamurthy@ericsson.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 03/21/2018 06:37 AM, GhantaKrishnamurthy MohanKrishna wrote: > This commit adds socket diagnostics capability for AF_TIPC in netlink > family NETLINK_SOCK_DIAG in a new kernel module (diag.ko). ... > +static u64 __tipc_diag_gen_cookie(struct sock *sk) > +{ > + u32 res[2]; > + > + sock_diag_save_cookie(sk, res); > + return *((u64 *)res); > +} I am pretty sure some combination of compiler / arch could be not happy with this assumption that res[] is aligned to allow an u64 to be read like that.