[ovs-git] [openvswitch/ovs] ea58ab: acinclude: Enable Linux kernel 5.5
gvrose8192
noreply at github.com
Fri Mar 6 22:41:26 UTC 2020
Branch: refs/heads/master
Home: https://github.com/openvswitch/ovs
Commit: ea58abe51557ea7004db4267fcf36f588e6f17c3
https://github.com/openvswitch/ovs/commit/ea58abe51557ea7004db4267fcf36f588e6f17c3
Author: Greg Rose <gvrose8192 at gmail.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M acinclude.m4
Log Message:
-----------
acinclude: Enable Linux kernel 5.5
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: f77d85b109f049a45c73fd2bbafe4d4220ca7c78
https://github.com/openvswitch/ovs/commit/f77d85b109f049a45c73fd2bbafe4d4220ca7c78
Author: Greg Rose <gvrose8192 at gmail.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M acinclude.m4
M datapath/linux/compat/include/net/inet_frag.h
Log Message:
-----------
compat: Fix up changes to inet frags in 5.1+
Since Linux kernel release 5.1 the fragments field of the inet_frag_queue
structure is removed and now only the rb_fragments structure with an
rb_node pointer is used for both ipv4 and ipv6. In addition, the
atomic_sub and atomic_add functions are replaced with their
equivalent long counterparts.
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: 2ef0f1c23cfaf26294288c45102ec79bb8f3071c
https://github.com/openvswitch/ovs/commit/2ef0f1c23cfaf26294288c45102ec79bb8f3071c
Author: Johannes Berg <johannes.berg at intel.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M acinclude.m4
M datapath/conntrack.c
M datapath/datapath.c
M datapath/meter.c
Log Message:
-----------
compat: Move genl_ops policy to genl_family
Upstream commit:
commit 3b0f31f2b8c9fb348e4530b88f6b64f9621f83d6
Author: Johannes Berg <johannes.berg at intel.com>
Date: Thu Mar 21 22:51:02 2019 +0100
genetlink: make policy common to family
Since maxattr is common, the policy can't really differ sanely,
so make it common as well.
The only user that did in fact manage to make a non-common policy
is taskstats, which has to be really careful about it (since it's
still using a common maxattr!). This is no longer supported, but
we can fake it using pre_doit.
This reduces the size of e.g. nl80211.o (which has lots of commands):
text data bss dec hex filename
398745 14323 2240 415308 6564c net/wireless/nl80211.o (before)
397913 14331 2240 414484 65314 net/wireless/nl80211.o (after)
--------------------------------
-832 +8 0 -824
Which is obviously just 8 bytes for each command, and an added 8
bytes for the new policy pointer. I'm not sure why the ops list is
counted as .text though.
Most of the code transformations were done using the following spatch:
@ops@
identifier OPS;
expression POLICY;
@@
struct genl_ops OPS[] = {
...,
{
- .policy = POLICY,
},
...
};
@@
identifier ops.OPS;
expression ops.POLICY;
identifier fam;
expression M;
@@
struct genl_family fam = {
.ops = OPS,
.maxattr = M,
+ .policy = POLICY,
...
};
This also gets rid of devlink_nl_cmd_region_read_dumpit() accessing
the cb->data as ops, which we want to change in a later genl patch.
Signed-off-by: Johannes Berg <johannes.berg at intel.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Since commit 3b0f31f2b8c9f ("genetlink: make policy common to family")
the policy field of the genl_ops structure has been moved into the
genl_family structure. Add necessary compat layer infrastructure
to still support older kernels.
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: 384868caafc3b188319a3a9b9b3ede4ef910273d
https://github.com/openvswitch/ovs/commit/384868caafc3b188319a3a9b9b3ede4ef910273d
Author: Greg Rose <gvrose8192 at gmail.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M datapath/linux/compat/stt.c
Log Message:
-----------
compat: Remove flex_array code
Flex array support is removed since kernel 5.1. Convert to use
kvmalloc_array instead.
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: 9cfa471811be29e88ca89dc698690611cea1707a
https://github.com/openvswitch/ovs/commit/9cfa471811be29e88ca89dc698690611cea1707a
Author: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya at intel.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M datapath/datapath.c
M datapath/flow.h
M datapath/linux/compat/geneve.c
M datapath/linux/compat/gso.c
M datapath/linux/compat/include/linux/kernel.h
M datapath/linux/compat/include/net/ip_tunnels.h
M datapath/linux/compat/ip6_gre.c
M datapath/linux/compat/ip_gre.c
M datapath/linux/compat/vxlan.c
Log Message:
-----------
datapath: Use sizeof_field macro
Upstream commit:
commit c593642c8be046915ca3a4a300243a68077cd207
Author: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya at intel.com>
Date: Mon Dec 9 10:31:43 2019 -0800
treewide: Use sizeof_field() macro
Replace all the occurrences of FIELD_SIZEOF() with sizeof_field() except
at places where these are defined. Later patches will remove the unused
definition of FIELD_SIZEOF().
This patch is generated using following script:
EXCLUDE_FILES="include/linux/stddef.h|include/linux/kernel.h"
git grep -l -e "\bFIELD_SIZEOF\b" | while read file;
do
if [[ "$file" =~ $EXCLUDE_FILES ]]; then
continue
fi
sed -i -e 's/\bFIELD_SIZEOF\b/sizeof_field/g' $file;
done
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya at intel.com>
Link: https://lore.kernel.org/r/20190924105839.110713-3-pankaj.laxminarayan.bharadiya@intel.com
Co-developed-by: Kees Cook <keescook at chromium.org>
Signed-off-by: Kees Cook <keescook at chromium.org>
Acked-by: David Miller <davem at davemloft.net> # for net
Also added a compatibility layer macro for older kernels that still
use FIELD_SIZEOF
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: 0017700103d99823ceb003e81f629f05b9a5752a
https://github.com/openvswitch/ovs/commit/0017700103d99823ceb003e81f629f05b9a5752a
Author: Greg Rose <gvrose8192 at gmail.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M datapath/linux/Kbuild.in
Log Message:
-----------
datapath: Kbuild: Add kcompat.h header to front of NOSTDINC
Since this commit in the Linux upstream kernel:
'commit 9b9a3f20cbe0 ("kbuild: split final module linking out into Makefile.modfinal")'
The openvswitch kernel module fails to build against the upstream
Linux kernel. The cause of the build failure is that the include of the
KBUILD_EXTMOD variable was dropped in Makefile.modfinal when
it was split out from Makefile.modpost. Our Kbuild was setting
the ccflags-y variable to include our kcompat.h header as the
first header file. The Linux kernel maintainer has said that
it is incorrect to rely on the ccflags-y variable for the modfinal
phase of the build so that is why KBUILD_EXTMOD is not included.
We fix this by breaking a different Linux kernel make rule. We
add '-include $(builddir)/kcompat.h' to the front of the NOSTDINC
variable setting in our Kbuild makefile.
As noted already in the comment for the NOSTDINC setting:
\# These include directories have to go before -I$(KSRC)/include.
\# NOSTDINC_FLAGS just happens to be a variable that goes in the
\# right place, even though it's conceptually incorrect.
So we continue the misuse of the NOSTDINC variable to fix this
issue as well.
The assumption of the Linux kernel maintainers is that any
local, out-of-tree build include files can be added to the end
of the command line. In our case that is wrong of course, but
there is nothing we can do about it that I know of other than using
some utility like unifdef to strip out offending chunks of our
compatibility layer code before invocation of Makefile.modfinal.
That is a big change that would take a lot of work to implement.
We could ask the Linux kernel maintainers to provide some
way for out-of-tree kernel modules to include their own header
files first in a proper manner. I consider that to be a very
low probability of success but something we could ask about.
For now we cheat and take the easy way out.
Reported-by: David Ahern <dsahern at gmail.com>
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: 6db0f72df38df9e722556ed8943a70e52f4f163a
https://github.com/openvswitch/ovs/commit/6db0f72df38df9e722556ed8943a70e52f4f163a
Author: Johannes Berg <johannes.berg at intel.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M acinclude.m4
M datapath/datapath.c
M datapath/flow_netlink.c
M datapath/linux/compat/include/net/netlink.h
M datapath/meter.c
M datapath/vport-vxlan.c
Log Message:
-----------
compat: Use nla_parse deprecated functions
Upstream commit:
commit 8cb081746c031fb164089322e2336a0bf5b3070c
Author: Johannes Berg <johannes.berg at intel.com>
Date: Fri Apr 26 14:07:28 2019 +0200
netlink: make validation more configurable for future strictness
We currently have two levels of strict validation:
1) liberal (default)
- undefined (type >= max) & NLA_UNSPEC attributes accepted
- attribute length >= expected accepted
- garbage at end of message accepted
2) strict (opt-in)
- NLA_UNSPEC attributes accepted
- attribute length >= expected accepted
Split out parsing strictness into four different options:
* TRAILING - check that there's no trailing data after parsing
attributes (in message or nested)
* MAXTYPE - reject attrs > max known type
* UNSPEC - reject attributes with NLA_UNSPEC policy entries
* STRICT_ATTRS - strictly validate attribute size
The default for future things should be *everything*.
The current *_strict() is a combination of TRAILING and MAXTYPE,
and is renamed to _deprecated_strict().
The current regular parsing has none of this, and is renamed to
*_parse_deprecated().
Additionally it allows us to selectively set one of the new flags
even on old policies. Notably, the UNSPEC flag could be useful in
this case, since it can be arranged (by filling in the policy) to
not be an incompatible userspace ABI change, but would then going
forward prevent forgetting attribute entries. Similar can apply
to the POLICY flag.
We end up with the following renames:
* nla_parse -> nla_parse_deprecated
* nla_parse_strict -> nla_parse_deprecated_strict
* nlmsg_parse -> nlmsg_parse_deprecated
* nlmsg_parse_strict -> nlmsg_parse_deprecated_strict
* nla_parse_nested -> nla_parse_nested_deprecated
* nla_validate_nested -> nla_validate_nested_deprecated
Using spatch, of course:
@@
expression TB, MAX, HEAD, LEN, POL, EXT;
@@
-nla_parse(TB, MAX, HEAD, LEN, POL, EXT)
+nla_parse_deprecated(TB, MAX, HEAD, LEN, POL, EXT)
@@
expression NLH, HDRLEN, TB, MAX, POL, EXT;
@@
-nlmsg_parse(NLH, HDRLEN, TB, MAX, POL, EXT)
+nlmsg_parse_deprecated(NLH, HDRLEN, TB, MAX, POL, EXT)
@@
expression NLH, HDRLEN, TB, MAX, POL, EXT;
@@
-nlmsg_parse_strict(NLH, HDRLEN, TB, MAX, POL, EXT)
+nlmsg_parse_deprecated_strict(NLH, HDRLEN, TB, MAX, POL, EXT)
@@
expression TB, MAX, NLA, POL, EXT;
@@
-nla_parse_nested(TB, MAX, NLA, POL, EXT)
+nla_parse_nested_deprecated(TB, MAX, NLA, POL, EXT)
@@
expression START, MAX, POL, EXT;
@@
-nla_validate_nested(START, MAX, POL, EXT)
+nla_validate_nested_deprecated(START, MAX, POL, EXT)
@@
expression NLH, HDRLEN, MAX, POL, EXT;
@@
-nlmsg_validate(NLH, HDRLEN, MAX, POL, EXT)
+nlmsg_validate_deprecated(NLH, HDRLEN, MAX, POL, EXT)
For this patch, don't actually add the strict, non-renamed versions
yet so that it breaks compile if I get it wrong.
Also, while at it, make nla_validate and nla_parse go down to a
common __nla_validate_parse() function to avoid code duplication.
Ultimately, this allows us to have very strict validation for every
new caller of nla_parse()/nlmsg_parse() etc as re-introduced in the
next patch, while existing things will continue to work as is.
In effect then, this adds fully strict validation for any new command.
Signed-off-by: Johannes Berg <johannes.berg at intel.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Backport portions of this commit applicable to openvswitch and
added necessary compatibility layer changes to support older
kernels.
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: 73a6e112a5395c28b22126a205ce3f9ed17739ca
https://github.com/openvswitch/ovs/commit/73a6e112a5395c28b22126a205ce3f9ed17739ca
Author: Gustavo A. R. Silva <garsilva at embeddedor.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M datapath/conntrack.c
Log Message:
-----------
datapath: conntrack: mark expected switch fall-through
Upstream commit:
commit 279badc2a85be83e0187b8c566e3b476b76a87a2
Author: Gustavo A. R. Silva <garsilva at embeddedor.com>
Date: Thu Oct 19 12:55:03 2017 -0500
openvswitch: conntrack: mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that in this particular case I placed a "fall through" comment on
its own line, which is what GCC is expecting to find.
Signed-off-by: Gustavo A. R. Silva <garsilva at embeddedor.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Commit: 59e994426645358a271a0c9f485e9defafffd474
https://github.com/openvswitch/ovs/commit/59e994426645358a271a0c9f485e9defafffd474
Author: Greg Rose <gvrose8192 at gmail.com>
Date: 2020-03-06 (Fri, 06 Mar 2020)
Changed paths:
M .travis.yml
M Documentation/faq/releases.rst
M NEWS
Log Message:
-----------
datapath: Update kernel test list, news and FAQ
We are adding support for Linux kernels up to 5.5 so update the
Travis test list, NEWS and FAQ.
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Compare: https://github.com/openvswitch/ovs/compare/cdae6100f89d...59e994426645
More information about the git
mailing list