Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2619785imm; Sun, 12 Aug 2018 19:29:14 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxdRKv2CuyRw5PQMvV7SCmrUZnU4JoQZy8M0n3giAvGNNZ6eZX2empXgMpFIeSOhwl6UuWo X-Received: by 2002:a63:4663:: with SMTP id v35-v6mr15005833pgk.178.1534127354682; Sun, 12 Aug 2018 19:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534127354; cv=none; d=google.com; s=arc-20160816; b=RTPh5IgKVBRoxxbTP/iZgEwlV8tL6jdv9MBCDi2NFpD4FyiYtFeuBhwjcNJar9CJlb bEwzuF78N9yNB/6aSzzM1YXt3FuOoe97hc9R1gesTYmHO10aIfz098lh7LI39SUL8gUP aA/dSUWa7f3cslrYS59a+PmNzvFbyL4dQ9zX3yv7YNTJnVXFs1g75FfXalatRUWw6ngD u87IpJu7GAbAaWaXN3YiPmXJXsjCyMbeyqL2ik83/om9Z0gO9UAVFP7le321orbS2GgU O6g9Xxprx+dU0JZGJM7omcOtwg9PUlOFiBbqx87E75uGG73FIkaRp6CQhEU780xeUW5k 73CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=sJ/vE+Usyh+WP8JepeFGkbUvJMcLy7ACgzeJcsIgEcE=; b=Ml7KfIS+d+bTHdnuKS3xk3T/l4WJCOoRwNxIodhQB61GjkoPSFM/DZuIUQLWG4yB7N URqYsVQUS8Bcpdt3R7/3hAFRWe1WTo1atiNgR5kzaqvtWp4n8PGYHO8NHlZUzNXbXRTf vSQN8gZGmnay7rvUX8xRiCd/cR7j5TeXqy2MCGxutTgniYZbD9oPIoAlpCb3v+NAVUmN 4V91a8HIVEora/8MCC7abr7eG5W8DNMb1xH6mO921LRIZBrTEzZ7qtwkn120gH5/knOC cvRrxXfG8o6CHwcGa5rjULCNE9/Ll0euMPpCM3BcWpF+m24bb0Cmkrvs94BUrC0Dy9ED cMVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x68-v6si16673763pfc.239.2018.08.12.19.28.58; Sun, 12 Aug 2018 19:29:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726648AbeHMFHl (ORCPT + 99 others); Mon, 13 Aug 2018 01:07:41 -0400 Received: from exmail.andestech.com ([59.124.169.137]:47627 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbeHMFHk (ORCPT ); Mon, 13 Aug 2018 01:07:40 -0400 Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id w7D2PuS8015231; Mon, 13 Aug 2018 10:25:56 +0800 (GMT-8) (envelope-from zong@andestech.com) Received: from atcsqa06.andestech.com (10.0.1.85) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Mon, 13 Aug 2018 10:27:13 +0800 From: Zong Li To: , , , , CC: , , Zong Li Subject: [PATCH] net: Change the layout of structure trace_event_raw_fib_table_lookup Date: Mon, 13 Aug 2018 10:26:52 +0800 Message-ID: <1534127212-13186-1-git-send-email-zong@andestech.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.1.85] X-DNSRBL: X-MAIL: ATCSQR.andestech.com w7D2PuS8015231 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is an unalignment access about the structure 'trace_event_raw_fib_table_lookup'. In include/trace/events/fib.h, there is a memory operation which casting the 'src' data member to a pointer, and then store a value to this pointer point to. p32 = (__be32 *) __entry->src; *p32 = flp->saddr; The offset of 'src' in structure trace_event_raw_fib_table_lookup is not four bytes alignment. On some architectures, they don't permit the unalignment access, it need to pay the price to handle this situation in exception handler. Adjust the layout of structure to avoid this case. Signed-off-by: Zong Li --- include/trace/events/fib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/fib.h b/include/trace/events/fib.h index 9763cddd0594..6271bab63bfb 100644 --- a/include/trace/events/fib.h +++ b/include/trace/events/fib.h @@ -22,6 +22,7 @@ TRACE_EVENT(fib_table_lookup, __field( int, err ) __field( int, oif ) __field( int, iif ) + __field( u8, proto ) __field( __u8, tos ) __field( __u8, scope ) __field( __u8, flags ) @@ -31,7 +32,6 @@ TRACE_EVENT(fib_table_lookup, __array( __u8, saddr, 4 ) __field( u16, sport ) __field( u16, dport ) - __field( u8, proto ) __dynamic_array(char, name, IFNAMSIZ ) ), -- 2.16.1