* linux-next: build failure after merge of the netfilter tree
@ 2018-04-16 23:28 Stephen Rothwell
2018-04-17 0:51 ` Cong Wang
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2018-04-16 23:28 UTC (permalink / raw)
To: Pablo Neira Ayuso, NetFilter
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Cong Wang
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]
Hi all,
After merging the netfilter tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
net/netfilter/nf_conntrack_extend.c: In function 'nf_ct_ext_
add':
net/netfilter/nf_conntrack_extend.c:74:2: error: implicit declaration of function 'kmemleak_not_leak' [-Werror=implicit-function-declaration]
kmemleak_not_leak(old);
^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Caused by commit
114aa35d06d4 ("netfilter: conntrack: silent a memory leak warning")
I have added this patch for today:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 17 Apr 2018 09:26:49 +1000
Subject: [PATCH] netfilter: conntrack: include kmemleak.h for
kmemleak_not_leak()
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
net/netfilter/nf_conntrack_extend.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
index bd71a828ebde..277bbfe26478 100644
--- a/net/netfilter/nf_conntrack_extend.c
+++ b/net/netfilter/nf_conntrack_extend.c
@@ -9,6 +9,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include <linux/kernel.h>
+#include <linux/kmemleak.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/rcupdate.h>
--
2.16.3
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: linux-next: build failure after merge of the netfilter tree
2018-04-16 23:28 linux-next: build failure after merge of the netfilter tree Stephen Rothwell
@ 2018-04-17 0:51 ` Cong Wang
2018-04-17 9:00 ` Pablo Neira Ayuso
0 siblings, 1 reply; 8+ messages in thread
From: Cong Wang @ 2018-04-17 0:51 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Pablo Neira Ayuso, NetFilter, Linux-Next Mailing List,
Linux Kernel Mailing List
On Mon, Apr 16, 2018 at 4:28 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the netfilter tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> net/netfilter/nf_conntrack_extend.c: In function 'nf_ct_ext_
> add':
> net/netfilter/nf_conntrack_extend.c:74:2: error: implicit declaration of function 'kmemleak_not_leak' [-Werror=implicit-function-declaration]
> kmemleak_not_leak(old);
> ^~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> Caused by commit
>
> 114aa35d06d4 ("netfilter: conntrack: silent a memory leak warning")
>
> I have added this patch for today:
Ouch, this is actually a correct fix.
Can you please send it formally or maybe Pablo can just take it directly?
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: linux-next: build failure after merge of the netfilter tree
2018-04-17 0:51 ` Cong Wang
@ 2018-04-17 9:00 ` Pablo Neira Ayuso
0 siblings, 0 replies; 8+ messages in thread
From: Pablo Neira Ayuso @ 2018-04-17 9:00 UTC (permalink / raw)
To: Cong Wang
Cc: Stephen Rothwell, NetFilter, Linux-Next Mailing List,
Linux Kernel Mailing List
On Mon, Apr 16, 2018 at 05:51:12PM -0700, Cong Wang wrote:
> On Mon, Apr 16, 2018 at 4:28 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > Hi all,
> >
> > After merging the netfilter tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > net/netfilter/nf_conntrack_extend.c: In function 'nf_ct_ext_
> > add':
> > net/netfilter/nf_conntrack_extend.c:74:2: error: implicit declaration of function 'kmemleak_not_leak' [-Werror=implicit-function-declaration]
> > kmemleak_not_leak(old);
> > ^~~~~~~~~~~~~~~~~
> > cc1: some warnings being treated as errors
> >
> > Caused by commit
> >
> > 114aa35d06d4 ("netfilter: conntrack: silent a memory leak warning")
> >
> > I have added this patch for today:
>
> Ouch, this is actually a correct fix.
>
> Can you please send it formally or maybe Pablo can just take it directly?
I have applied Stephen's patch, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* linux-next: build failure after merge of the netfilter tree
@ 2019-04-15 7:57 Stephen Rothwell
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2019-04-15 7:57 UTC (permalink / raw)
To: Pablo Neira Ayuso, NetFilter
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Florian Westphal
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
Hi all,
After merging the netfilter-next tree, today's linux-next build (powerpc
allyesconfig) failed like this:
ld: net/netfilter/nf_conntrack_netlink.o: in function `__crc_nf_ct_get_id':
(.rodata+0x0): multiple definition of `__crc_nf_ct_get_id'; net/netfilter/nf_conntrack_core.o:(.rodata+0x20): first defined here
Caused by commit
a5dc1fb1928a ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id")
I have reverted that commit for today.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: linux-next: build failure after merge of the netfilter tree
2017-05-17 15:29 ` Willem de Bruijn
@ 2017-05-17 23:10 ` Stephen Rothwell
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2017-05-17 23:10 UTC (permalink / raw)
To: Willem de Bruijn
Cc: Pablo Neira Ayuso, NetFilter, Linux-Next Mailing List,
Linux Kernel Mailing List
Hi Willem,
On Wed, 17 May 2017 11:29:19 -0400 Willem de Bruijn <willemdebruijn.kernel@gmail.com> wrote:
>
> Full patch out for review at http://patchwork.ozlabs.org/patch/763655/
I have used that in linux-next today instead of my cludge.
--
Cheers,
Stephen Rothwell
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: linux-next: build failure after merge of the netfilter tree
2017-05-17 5:02 ` Willem de Bruijn
@ 2017-05-17 15:29 ` Willem de Bruijn
2017-05-17 23:10 ` Stephen Rothwell
0 siblings, 1 reply; 8+ messages in thread
From: Willem de Bruijn @ 2017-05-17 15:29 UTC (permalink / raw)
To: Willem de Bruijn
Cc: Stephen Rothwell, Pablo Neira Ayuso, NetFilter,
Linux-Next Mailing List, Linux Kernel Mailing List
On Wed, May 17, 2017 at 1:02 AM, Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
> On Tue, May 16, 2017 at 11:45 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> Hi all,
>>
>> After merging the netfilter tree, today's linux-next build (i386
>> defconfig) failed like this:
>>
>> net/netfilter/x_tables.c: In function 'xt_match_to_user':
>> net/netfilter/x_tables.c:303:13: error: implicit declaration of function 'COMPAT_XT_ALIGN' [-Werror=implicit-function-declaration]
>> C_SIZE ? COMPAT_XT_ALIGN(C_SIZE) : \
>> ^
>> net/netfilter/x_tables.c:310:9: note: in expansion of macro 'XT_DATA_TO_USER'
>> XT_DATA_TO_USER(u, m, match, 0);
>> ^
>>
>> Caused by commit
>>
>> 324318f0248c ("netfilter: xtables: zero padding in data_to_user")
>>
>> In the !CONFIG_COMPAT case C_SIZE will always be zero, but the compiler
>> is still looking for the macro :-(
>
> Apologies for the breakage.
>
>> I added this cludge patch (I am sure it can be done better):
>>
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Wed, 17 May 2017 13:36:26 +1000
>> Subject: [PATCH] netfilter: xtables: fix for zero padding in data_to_user
>>
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> ---
>> net/netfilter/x_tables.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
>> index d17769599c10..2b1785993a92 100644
>> --- a/net/netfilter/x_tables.c
>> +++ b/net/netfilter/x_tables.c
>> @@ -296,12 +296,20 @@ int xt_data_to_user(void __user *dst, const void *src,
>> }
>> EXPORT_SYMBOL_GPL(xt_data_to_user);
>>
>> +#ifdef CONFIG_COMPAT
>> #define XT_DATA_TO_USER(U, K, TYPE, C_SIZE) \
>> xt_data_to_user(U->data, K->data, \
>> K->u.kernel.TYPE->usersize, \
>> C_SIZE ? : K->u.kernel.TYPE->TYPE##size, \
>> C_SIZE ? COMPAT_XT_ALIGN(C_SIZE) : \
>> XT_ALIGN(K->u.kernel.TYPE->TYPE##size))
>> +#else
>> +#define XT_DATA_TO_USER(U, K, TYPE, C_SIZE) \
>> + xt_data_to_user(U->data, K->data, \
>> + K->u.kernel.TYPE->usersize, \
>> + C_SIZE ? : K->u.kernel.TYPE->TYPE##size, \
>> + C_SIZE ? : XT_ALIGN(K->u.kernel.TYPE->TYPE##size))
>> +#endif
>>
>
> I will send a patch to the netfilter to define a separate
> COMPAT_XT_DATA_TO_USER inside the CONFIG_COMPAT region further down
> the file. This also allows simplifying XT_DATA_TO_USER by removing
> those ternary statements.
Full patch out for review at http://patchwork.ozlabs.org/patch/763655/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: linux-next: build failure after merge of the netfilter tree
2017-05-17 3:45 Stephen Rothwell
@ 2017-05-17 5:02 ` Willem de Bruijn
2017-05-17 15:29 ` Willem de Bruijn
0 siblings, 1 reply; 8+ messages in thread
From: Willem de Bruijn @ 2017-05-17 5:02 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Pablo Neira Ayuso, NetFilter, Linux-Next Mailing List,
Linux Kernel Mailing List
On Tue, May 16, 2017 at 11:45 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the netfilter tree, today's linux-next build (i386
> defconfig) failed like this:
>
> net/netfilter/x_tables.c: In function 'xt_match_to_user':
> net/netfilter/x_tables.c:303:13: error: implicit declaration of function 'COMPAT_XT_ALIGN' [-Werror=implicit-function-declaration]
> C_SIZE ? COMPAT_XT_ALIGN(C_SIZE) : \
> ^
> net/netfilter/x_tables.c:310:9: note: in expansion of macro 'XT_DATA_TO_USER'
> XT_DATA_TO_USER(u, m, match, 0);
> ^
>
> Caused by commit
>
> 324318f0248c ("netfilter: xtables: zero padding in data_to_user")
>
> In the !CONFIG_COMPAT case C_SIZE will always be zero, but the compiler
> is still looking for the macro :-(
Apologies for the breakage.
> I added this cludge patch (I am sure it can be done better):
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 17 May 2017 13:36:26 +1000
> Subject: [PATCH] netfilter: xtables: fix for zero padding in data_to_user
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> net/netfilter/x_tables.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
> index d17769599c10..2b1785993a92 100644
> --- a/net/netfilter/x_tables.c
> +++ b/net/netfilter/x_tables.c
> @@ -296,12 +296,20 @@ int xt_data_to_user(void __user *dst, const void *src,
> }
> EXPORT_SYMBOL_GPL(xt_data_to_user);
>
> +#ifdef CONFIG_COMPAT
> #define XT_DATA_TO_USER(U, K, TYPE, C_SIZE) \
> xt_data_to_user(U->data, K->data, \
> K->u.kernel.TYPE->usersize, \
> C_SIZE ? : K->u.kernel.TYPE->TYPE##size, \
> C_SIZE ? COMPAT_XT_ALIGN(C_SIZE) : \
> XT_ALIGN(K->u.kernel.TYPE->TYPE##size))
> +#else
> +#define XT_DATA_TO_USER(U, K, TYPE, C_SIZE) \
> + xt_data_to_user(U->data, K->data, \
> + K->u.kernel.TYPE->usersize, \
> + C_SIZE ? : K->u.kernel.TYPE->TYPE##size, \
> + C_SIZE ? : XT_ALIGN(K->u.kernel.TYPE->TYPE##size))
> +#endif
>
I will send a patch to the netfilter to define a separate
COMPAT_XT_DATA_TO_USER inside the CONFIG_COMPAT region further down
the file. This also allows simplifying XT_DATA_TO_USER by removing
those ternary statements.
-#define XT_DATA_TO_USER(U, K, TYPE, C_SIZE) \
+#define XT_DATA_TO_USER(U, K, TYPE) \
xt_data_to_user(U->data, K->data, \
K->u.kernel.TYPE->usersize, \
- C_SIZE ? : K->u.kernel.TYPE->TYPE##size, \
- C_SIZE ? COMPAT_XT_ALIGN(C_SIZE) : \
- XT_ALIGN(K->u.kernel.TYPE->TYPE##size))
+ K->u.kernel.TYPE->TYPE##size, \
+ XT_ALIGN(K->u.kernel.TYPE->TYPE##size))
and
+#define COMPAT_XT_DATA_TO_USER(U, K, TYPE, C_SIZE) \
+ xt_data_to_user(U->data, K->data, \
+ K->u.kernel.TYPE->usersize, \
+ C_SIZE, \
+ COMPAT_XT_ALIGN(C_SIZE))
+
^ permalink raw reply [flat|nested] 8+ messages in thread
* linux-next: build failure after merge of the netfilter tree
@ 2017-05-17 3:45 Stephen Rothwell
2017-05-17 5:02 ` Willem de Bruijn
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2017-05-17 3:45 UTC (permalink / raw)
To: Pablo Neira Ayuso, NetFilter
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Willem de Bruijn
Hi all,
After merging the netfilter tree, today's linux-next build (i386
defconfig) failed like this:
net/netfilter/x_tables.c: In function 'xt_match_to_user':
net/netfilter/x_tables.c:303:13: error: implicit declaration of function 'COMPAT_XT_ALIGN' [-Werror=implicit-function-declaration]
C_SIZE ? COMPAT_XT_ALIGN(C_SIZE) : \
^
net/netfilter/x_tables.c:310:9: note: in expansion of macro 'XT_DATA_TO_USER'
XT_DATA_TO_USER(u, m, match, 0);
^
Caused by commit
324318f0248c ("netfilter: xtables: zero padding in data_to_user")
In the !CONFIG_COMPAT case C_SIZE will always be zero, but the compiler
is still looking for the macro :-(
I added this cludge patch (I am sure it can be done better):
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 17 May 2017 13:36:26 +1000
Subject: [PATCH] netfilter: xtables: fix for zero padding in data_to_user
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
net/netfilter/x_tables.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index d17769599c10..2b1785993a92 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -296,12 +296,20 @@ int xt_data_to_user(void __user *dst, const void *src,
}
EXPORT_SYMBOL_GPL(xt_data_to_user);
+#ifdef CONFIG_COMPAT
#define XT_DATA_TO_USER(U, K, TYPE, C_SIZE) \
xt_data_to_user(U->data, K->data, \
K->u.kernel.TYPE->usersize, \
C_SIZE ? : K->u.kernel.TYPE->TYPE##size, \
C_SIZE ? COMPAT_XT_ALIGN(C_SIZE) : \
XT_ALIGN(K->u.kernel.TYPE->TYPE##size))
+#else
+#define XT_DATA_TO_USER(U, K, TYPE, C_SIZE) \
+ xt_data_to_user(U->data, K->data, \
+ K->u.kernel.TYPE->usersize, \
+ C_SIZE ? : K->u.kernel.TYPE->TYPE##size, \
+ C_SIZE ? : XT_ALIGN(K->u.kernel.TYPE->TYPE##size))
+#endif
int xt_match_to_user(const struct xt_entry_match *m,
struct xt_entry_match __user *u)
--
Cheers,
Stephen Rothwell
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-04-15 7:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 23:28 linux-next: build failure after merge of the netfilter tree Stephen Rothwell
2018-04-17 0:51 ` Cong Wang
2018-04-17 9:00 ` Pablo Neira Ayuso
-- strict thread matches above, loose matches on Subject: below --
2019-04-15 7:57 Stephen Rothwell
2017-05-17 3:45 Stephen Rothwell
2017-05-17 5:02 ` Willem de Bruijn
2017-05-17 15:29 ` Willem de Bruijn
2017-05-17 23:10 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).