From patchwork Sun Oct 25 19:46:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jozsef Kadlecsik X-Patchwork-Id: 535623 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A35F7141355 for ; Mon, 26 Oct 2015 06:45:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751852AbbJYTpY (ORCPT ); Sun, 25 Oct 2015 15:45:24 -0400 Received: from smtp0.kfki.hu ([148.6.0.25]:54571 "EHLO smtp0.kfki.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751608AbbJYTpW (ORCPT ); Sun, 25 Oct 2015 15:45:22 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp0.kfki.hu (Postfix) with ESMTP id 229D867400C1; Sun, 25 Oct 2015 20:45:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at smtp0.kfki.hu Received: from smtp0.kfki.hu ([127.0.0.1]) by localhost (smtp0.kfki.hu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id p0MEkShGUsS3; Sun, 25 Oct 2015 20:45:17 +0100 (CET) Received: from blackhole.kfki.hu (blackhole.kfki.hu [148.6.0.114]) by smtp0.kfki.hu (Postfix) with ESMTP id C90C967400C0; Sun, 25 Oct 2015 20:45:15 +0100 (CET) Received: by blackhole.kfki.hu (Postfix, from userid 1000) id B5B2522316; Sun, 25 Oct 2015 20:46:47 +0100 (CET) Date: Sun, 25 Oct 2015 20:46:47 +0100 (CET) From: Jozsef Kadlecsik To: Gerhard Wiesinger cc: Willy Tarreau , Linux Kernel Network Developers , netfilter-devel@vger.kernel.org, Greg KH , linux-kernel@vger.kernel.org, Andrew Morton , torvalds@linux-foundation.org, stable@vger.kernel.org, lwn@lwn.net, Jiri Slaby Subject: Re: Linux 4.2.4 In-Reply-To: <562CB396.2080509@wiesinger.com> Message-ID: References: <20151023003306.GA25388@kroah.com> <562C83FD.6010402@wiesinger.com> <20151025082547.GA22300@kroah.com> <20151025090308.GA17656@1wt.eu> <562CA13C.90500@wiesinger.com> <20151025094634.GA6832@1wt.eu> <562CB396.2080509@wiesinger.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, On Sun, 25 Oct 2015, Gerhard Wiesinger wrote: > On 25.10.2015 10:46, Willy Tarreau wrote: > > ipset *triggered* the problem. The whole stack dump would tell more. > > OK, find the stack traces in the bug report: > https://bugzilla.redhat.com/show_bug.cgi?id=1272645 > > Kernel 4.1.10 triggered also a kernel dump when playing with ipset commands > and IPv6, details in the bug report .... It seems to me it is an architecture-specific alignment issue. I don't have a Cortex-A7 ARM hardware and qemu doesn't seem to support it either, so I'm unable to reproduce it (ipset passes all my tests on my hardware, including more complex ones than what breaks here). My first wild guess is that the dynamic array of the element structure is not aligned properly. Could you give a try to the next patch? If that does not solve it, then could you help to narrow down the issue? Does the bug still appear if your remove the counter extension of the set? Best regards, Jozsef - E-mail : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences H-1525 Budapest 114, POB. 49, Hungary --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h index afe905c..1cf357d 100644 --- a/net/netfilter/ipset/ip_set_hash_gen.h +++ b/net/netfilter/ipset/ip_set_hash_gen.h @@ -1211,6 +1211,9 @@ static const struct ip_set_type_variant mtype_variant = { .same_set = mtype_same_set, }; +#define IP_SET_BASE_ALIGN(dtype) \ + ALIGN(sizeof(struct dtype), __alignof__(struct dtype)) + #ifdef IP_SET_EMIT_CREATE static int IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set, @@ -1319,12 +1322,12 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set, #endif set->variant = &IPSET_TOKEN(HTYPE, 4_variant); set->dsize = ip_set_elem_len(set, tb, - sizeof(struct IPSET_TOKEN(HTYPE, 4_elem))); + IP_SET_BASE_ALIGN(IPSET_TOKEN(HTYPE, 4_elem))); #ifndef IP_SET_PROTO_UNDEF } else { set->variant = &IPSET_TOKEN(HTYPE, 6_variant); set->dsize = ip_set_elem_len(set, tb, - sizeof(struct IPSET_TOKEN(HTYPE, 6_elem))); + IP_SET_BASE_ALIGN(IPSET_TOKEN(HTYPE, 6_elem))); } #endif if (tb[IPSET_ATTR_TIMEOUT]) {