From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755474AbdCKJMu (ORCPT ); Sat, 11 Mar 2017 04:12:50 -0500 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:53622 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751788AbdCKJMj (ORCPT ); Sat, 11 Mar 2017 04:12:39 -0500 Date: Sat, 11 Mar 2017 10:12:22 +0100 From: Florian Westphal To: "Steven Rostedt (VMware)" Cc: LKML , netdev , David Miller , Pablo Neira Ayuso , Jozsef Kadlecsik , coreteam@netfilter.org, Florian Westphal Subject: Re: [PATCH] netfilter: Force fake conntrack entry to be at least 8 bytes aligned Message-ID: <20170311091222.GA24201@breakpoint.cc> References: <20170311002526.1d21e750@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170311002526.1d21e750@gandalf.local.home> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Steven Rostedt (VMware) wrote: > Since the nfct and nfctinfo have been combined, the nf_conn structure > must be at least 8 bytes aligned, as the 3 LSB bits are used for the > nfctinfo. But there's a fake nf_conn structure to denote untracked > connections, which is created by a PER_CPU construct. This does not > guarantee that it will be 8 bytes aligned and can break the logic in > determining the correct nfctinfo. > > I triggered this on a 32bit machine with the following error: [..] Ugh. Originally I had planned to also submit followup changes to get rid of the untracked objects but that part got delayed. > By using DEFINE/DECLARE_PER_CPU_ALIGNED we can enforce at least 8 byte > alignment as all cache line sizes are at least 8 bytes or more. Thanks for fixing this! Acked-by: Florian Westphal