From: Čestmír Kalina <ckalina(a)redhat.com>
kabi: introduce RH_KABI_ADD_MODIFIER
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=2024595
Upstream Status: RHEL only
commit e8c19640a09931c05012dd9a45c28d12dc7b2a02
Author: Jiri Benc <jbenc(a)redhat.com>
Date: Wed, 1 Apr 2020 13:04:03 -0400
This is a generalized version of RH_KABI_CONST.
This allows RH_KABI_REPLACE_UNSAFE to be removed in a later patch.
RH-Signed-off-by: Jiri Benc <jbenc(a)redhat.com>
Signed-off-by: Čestmír Kalina <ckalina(a)redhat.com>
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/include/linux/rh_kabi.h b/include/linux/rh_kabi.h
index blahblah..blahblah 100644
--- a/include/linux/rh_kabi.h
+++ b/include/linux/rh_kabi.h
@@ -43,6 +43,13 @@
* Adds a new const modifier to a function parameter preserving the old
* checksum.
*
+ * RH_KABI_ADD_MODIFIER
+ * Adds a new modifier to a function parameter or a typedef, preserving
+ * the old checksum. Useful e.g. for adding rcu annotations or changing
+ * int to unsigned. Beware that this may change the semantics; if you're
+ * sure this is safe, always explain why binary compatibility with 3rd
+ * party modules is retained.
+ *
* RH_KABI_DEPRECATE
* Mark the element as deprecated and make it unusable by modules while
* preserving kABI checksums.
@@ -173,6 +180,7 @@
#ifdef __GENKSYMS__
# define RH_KABI_CONST
+# define RH_KABI_ADD_MODIFIER(_new)
# define RH_KABI_EXTEND(_new)
# define RH_KABI_FILL_HOLE(_new)
# define RH_KABI_FORCE_CHANGE(ver) __attribute__((rh_kabi_change ## ver))
@@ -195,6 +203,7 @@
# define RH_KABI_ALIGN_WARNING ". Disable CONFIG_RH_KABI_SIZE_ALIGN_CHECKS if
debugging."
# define RH_KABI_CONST const
+# define RH_KABI_ADD_MODIFIER(_new) _new
# define RH_KABI_EXTEND(_new) _new;
# define RH_KABI_FILL_HOLE(_new) _new;
# define RH_KABI_FORCE_CHANGE(ver)
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1530