From 6d0e87a290d235f1b0d5d13dad2ae0e588ee8e6c166691b165eda4a787b4952d Mon Sep 17 00:00:00 2001 From: nick wang Date: Wed, 11 Sep 2019 03:00:50 +0000 Subject: [PATCH] Accepting request 729994 from network:ha-clustering:Unstable Update to 9.10.0 with netlink patches for kernel 5.2 OBS-URL: https://build.opensuse.org/request/show/729994 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=81 --- drbd-utils-9.10.0.tar.gz | 3 ++ drbd-utils-9.9.0.tar.gz | 3 -- drbd-utils.changes | 18 +++++++ drbd-utils.spec | 7 ++- ...LA_F_NESTED-flag-to-nested-attribute.patch | 47 +++++++++++++++++++ netlink-prepare-for-kernel-v5.2.patch | 27 +++++++++++ 6 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 drbd-utils-9.10.0.tar.gz delete mode 100644 drbd-utils-9.9.0.tar.gz create mode 100644 netlink-Add-NLA_F_NESTED-flag-to-nested-attribute.patch create mode 100644 netlink-prepare-for-kernel-v5.2.patch diff --git a/drbd-utils-9.10.0.tar.gz b/drbd-utils-9.10.0.tar.gz new file mode 100644 index 0000000..ef974b0 --- /dev/null +++ b/drbd-utils-9.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d576ff180d6cd5d94319c616bbaee578e477607b67c8162b6363ca717668f0a6 +size 1190905 diff --git a/drbd-utils-9.9.0.tar.gz b/drbd-utils-9.9.0.tar.gz deleted file mode 100644 index 6483128..0000000 --- a/drbd-utils-9.9.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:21de71634f9aeb48f7951dfb6b4aca139c9b72ad58e285d3868b244cdaa5ad3f -size 1187214 diff --git a/drbd-utils.changes b/drbd-utils.changes index b4cc0f9..aad1a90 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Sep 6 08:57:04 UTC 2019 - nwang@suse.com + +- Support Kernel 5.2, bsc#1149945 and bsc#1144702 +- Add patch netlink-prepare-for-kernel-v5.2.patch + Add patch netlink-Add-NLA_F_NESTED-flag-to-nested-attribute.patch + +------------------------------------------------------------------- +Mon Sep 6 01:54:27 UTC 2019 - nwang@suse.com + +- Update to 9.10.0 + * drbdmon: limit desplay lenght, minor fixes + * drbdsetup,v9: avoid underflow when resync regresses + * drbdmeta,v9: allow huge (~1PB volumes) + * drbdsetup,v9: add allow-remote-read flag(9.0.19) + * docker: switch to UBI images + * doc: update JA doc + ------------------------------------------------------------------- Thu Sep 5 07:42:21 UTC 2019 - ohering@suse.de diff --git a/drbd-utils.spec b/drbd-utils.spec index 00ae445..e5880f3 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -22,7 +22,7 @@ %bcond_without prebuiltman Name: drbd-utils -Version: 9.9.0 +Version: 9.10.0 Release: 0 Summary: Distributed Replicated Block Device License: GPL-2.0+ @@ -37,6 +37,9 @@ Patch3: fence-after-pacemaker-down.patch # PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142) Patch4: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch Patch5: move_fencing_from_disk_to_net_in_example.patch +# Bach port patch for kernel v5.2 +Patch6: netlink-prepare-for-kernel-v5.2.patch +Patch7: netlink-Add-NLA_F_NESTED-flag-to-nested-attribute.patch Provides: drbd-bash-completion = %{version} Provides: drbd-pacemaker = %{version} @@ -87,6 +90,8 @@ raid 1. It is a building block for setting up clusters. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build export WANT_DRBD_REPRODUCIBLE_BUILD=1 diff --git a/netlink-Add-NLA_F_NESTED-flag-to-nested-attribute.patch b/netlink-Add-NLA_F_NESTED-flag-to-nested-attribute.patch new file mode 100644 index 0000000..b8415b3 --- /dev/null +++ b/netlink-Add-NLA_F_NESTED-flag-to-nested-attribute.patch @@ -0,0 +1,47 @@ +From 859151b228d3b3aacefb09d06d515a2589c22e35 Mon Sep 17 00:00:00 2001 +From: He Zhe +Date: Fri, 12 Jul 2019 15:07:27 +0800 +Subject: [PATCH 2/2] netlink: Add NLA_F_NESTED flag to nested attribute + +The mainline kernel v5.2 commit b424e432e770 +("netlink: add validation of NLA_F_NESTED flag") imposes strict validation +against nested attribute as follow. + +" +Add new validation flag NL_VALIDATE_NESTED which adds three consistency +checks of NLA_F_NESTED_FLAG: + + - the flag is set on attributes with NLA_NESTED{,_ARRAY} policy + - the flag is not set on attributes with other policies except NLA_UNSPEC + - the flag is set on attribute passed to nla_parse_nested() +" + +Sending messages with nested attribute without NLA_F_NESTED would cause failed +validation. For example, + +$ drbdsetup new-resource r0 +Invalid argument + +This patch adds NLA_F_NESTED flag to all nested attributes. + +Signed-off-by: He Zhe +--- + user/shared/libgenl.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/user/shared/libgenl.h b/user/shared/libgenl.h +index 4e9888ca..d900a945 100644 +--- a/user/shared/libgenl.h ++++ b/user/shared/libgenl.h +@@ -863,7 +863,7 @@ static inline struct nlattr *nla_nest_start(struct msg_buff *msg, int attrtype) + { + struct nlattr *start = (struct nlattr *)msg->tail; + +- if (nla_put(msg, attrtype, 0, NULL) < 0) ++ if (nla_put(msg, attrtype | NLA_F_NESTED, 0, NULL) < 0) + return NULL; + + return start; +-- +2.12.3 + diff --git a/netlink-prepare-for-kernel-v5.2.patch b/netlink-prepare-for-kernel-v5.2.patch new file mode 100644 index 0000000..7e23a68 --- /dev/null +++ b/netlink-prepare-for-kernel-v5.2.patch @@ -0,0 +1,27 @@ +From 92ade5989027ee7ea5fbde38ad67cd234822afcf Mon Sep 17 00:00:00 2001 +From: Roland Kammerer +Date: Fri, 12 Jul 2019 13:36:50 +0200 +Subject: [PATCH 1/2] netlink: prepare for kernel v5.2 + +--- + user/shared/libgenl.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/user/shared/libgenl.h b/user/shared/libgenl.h +index f649bc7d..4e9888ca 100644 +--- a/user/shared/libgenl.h ++++ b/user/shared/libgenl.h +@@ -31,6 +31,10 @@ + #define SOL_NETLINK 270 + #endif + ++#ifndef NLA_F_NESTED ++#define NLA_F_NESTED 0 ++#endif ++ + #define DEBUG_LEVEL 1 + + #define dbg(lvl, fmt, arg...) \ +-- +2.16.4 +