Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932181Ab2BAPT6 (ORCPT ); Wed, 1 Feb 2012 10:19:58 -0500 Received: from seven.medozas.de ([188.40.89.202]:35593 "EHLO seven.medozas.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932122Ab2BAPT4 (ORCPT ); Wed, 1 Feb 2012 10:19:56 -0500 Date: Wed, 1 Feb 2012 16:19:55 +0100 (CET) From: Jan Engelhardt To: richard -rw- weinberger cc: Netfilter Developer Mailing List , Linux Networking Developer Mailing List , Linux Kernel Mailing List , eric.dumazet@gmail.com, Pablo Neira Ayuso Subject: Re: [PATCH 1/6] Netfilter: Merge ipt_LOG and ip6_LOG into xt_LOG In-Reply-To: Message-ID: References: <1327269381-20748-1-git-send-email-richard@nod.at> <1327269381-20748-2-git-send-email-richard@nod.at> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1318 Lines: 41 On Wednesday 2012-02-01 16:08, richard -rw- weinberger wrote: >> I don't see that extra pointer (outside xt_log_info_v1) that you talk about. >> +struct xt_log_info_v1 { >> +       unsigned char level; >> +       unsigned char logflags; >> +       char prefix[30]; >> + >> +       char ring_name[30]; >> +       unsigned long ring_size; >> +       struct xt_LOG_ring_ctx *rctx; >> +}; > >See: >include/linux/netfilter/xt_LOG.h (user space part). > >+struct xt_log_info_v1 { >+ unsigned char level; >+ unsigned char logflags; >+ char prefix[30]; >+ >+ char ring_name[30]; >+ unsigned long ring_siVs.ze; >+}; > >Here is no context pointer. Aw don't do that. That is not maintainer-friendly (since headers are more or less regularly updated by copying from kernel sources). Keep the structs the same on each side. That's why we have .userspacesize in the first place. See libxt_quota.c on how it's done. .size = XT_ALIGN(sizeof(struct xt_log_info_v1)), .userspacesize = offsetof(struct xt_log_info_v1, firstkernelmember), -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/