From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Pablo Neira Ayuso <pablo@netfilter•org>,
NetFilter <netfilter-devel@vger•kernel.org>
Cc: Linux-Next Mailing List <linux-next@vger•kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Willem de Bruijn <willemb@google•com>
Subject: linux-next: build failure after merge of the netfilter tree
Date: Wed, 17 May 2017 13:45:36 +1000 [thread overview]
Message-ID: <20170517134536.3ce21d47@canb.auug.org.au> (raw)
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
next reply other threads:[~2017-05-17 3:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 3:45 Stephen Rothwell [this message]
2017-05-17 5:02 ` linux-next: build failure after merge of the netfilter tree Willem de Bruijn
2017-05-17 15:29 ` Willem de Bruijn
2017-05-17 23:10 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2018-04-16 23:28 Stephen Rothwell
2018-04-17 0:51 ` Cong Wang
2018-04-17 9:00 ` Pablo Neira Ayuso
2019-04-15 7:57 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170517134536.3ce21d47@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=netfilter-devel@vger$(echo .)kernel.org \
--cc=pablo@netfilter$(echo .)org \
--cc=willemb@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox