summaryrefslogtreecommitdiffstats
path: root/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
diff options
context:
space:
mode:
authorJeremy Cline <jcline@redhat.com>2020-04-23 16:47:21 -0400
committerJeremy Cline <jcline@redhat.com>2020-04-23 16:47:21 -0400
commitd1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236 (patch)
tree842b7a6410c2572bc8c1643196f83d2e19d80e1e /0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
parent4f478aae8055f932b9a8fdd88d93db6b9da5709e (diff)
downloadkernel-d1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236.tar.gz
kernel-d1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236.tar.xz
kernel-d1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236.zip
kernel-5.7.0-0.rc2.20200423git7adc4b399952.1
* Thu Apr 23 2020 CKI@GitLab <cki-project@redhat.com> [5.7.0-0.rc2.20200423git7adc4b399952.1] - 7adc4b399952 rebase - Match template format in kernel.spec.template ("Justin M. Forbes") - Break out the Patches into individual files for dist-git ("Justin M. Forbes") - Break the Red Hat patch into individual commits (Jeremy Cline) - Adjust module filtering so CONFIG_DRM_DP_CEC can be set (Jeremy Cline) - Add a script to generate release tags and branches (Jeremy Cline) - Set CONFIG_VDPA for fedora ("Justin M. Forbes") - Provide defaults in ark-rebase-patches.sh (Jeremy Cline) - Default ark-rebase-patches.sh to not report issues (Jeremy Cline) Resolves: rhbz# Signed-off-by: Jeremy Cline <jcline@redhat.com>
Diffstat (limited to '0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch')
-rw-r--r--0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch104
1 files changed, 104 insertions, 0 deletions
diff --git a/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch b/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
new file mode 100644
index 000000000..73b92c499
--- /dev/null
+++ b/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
@@ -0,0 +1,104 @@
+From e68e07854e5f1a75f0058a5cdb7043e74ff05987 Mon Sep 17 00:00:00 2001
+From: Jakub Racek <jracek@redhat.com>
+Date: Thu, 22 Nov 2018 12:59:45 +0100
+Subject: [PATCH] rh_kabi: introduce RH_KABI_EXCLUDE
+
+Message-id: <1542891606-8048-24-git-send-email-jracek@redhat.com>
+Patchwork-id: 233503
+O-Subject: [ARK PATCH 23/44] [kernel] rh_kabi: introduce RH_KABI_EXCLUDE
+Bugzilla: 1652256
+RH-Acked-by: Don Zickus <dzickus@redhat.com>
+RH-Acked-by: Jiri Benc <jbenc@redhat.com>
+
+From: Jiri Benc <jbenc@redhat.com>
+
+Bugzilla: 1652256
+Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19244562
+
+rhel8 commit 1c588b1bbe6ea3e9e1701ccf10e22f73f687ad02
+Author: Jiri Benc <jbenc@redhat.com>
+Date: Wed Nov 21 17:15:39 2018 +0100
+
+ [kernel] rh_kabi: introduce RH_KABI_EXCLUDE
+
+ Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1568551
+
+ Add a way to exclude certain fields of a structure that would be otherwise
+ kABI whitelisted. The new RH_KABI_EXCLUDE macro serves two purposes:
+
+ 1. Not adding the excluded fields to symbol checksums, making their later
+ changes easier.
+
+ 2. Document that the given fields are not considered to be kABI whitelisted
+ by Red Hat.
+
+ Note that:
+
+ - This needs to be done _before_ the actual structure gets whitelisted.
+
+ - It still allows later conversion of the excluded fields to whitelist
+ covered fields by simply changing RH_KABI_EXCLUDE to RH_KABI_EXTEND.
+
+ - The excluded fields can be modified at will but extra care needs to be
+ taken to not cause problems with 3rd party drivers using the fields. See
+ the comment inside the patch for details.
+
+ Signed-off-by: Jiri Benc <jbenc@redhat.com>
+ Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
+
+Upstream Status: RHEL only
+Signed-off-by: Jakub Racek <jracek@redhat.com>
+---
+ include/linux/rh_kabi.h | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/include/linux/rh_kabi.h b/include/linux/rh_kabi.h
+index e0d3353802bb..87f2bd530df7 100644
+--- a/include/linux/rh_kabi.h
++++ b/include/linux/rh_kabi.h
+@@ -80,6 +80,18 @@
+ * corrupt memory. Instead, by changing the symbol checksum, such modules
+ * won't be loaded by the kernel. This macro should only be used as a
+ * last resort when all other KABI workarounds have failed.
++ * RH_KABI_EXCLUDE
++ * Exclude the element from checksum generation. Any such element is
++ * considered not to be part of the kABI whitelist and may be changed at
++ * will. Note however that it's the responsibility of the developer
++ * changing the element to ensure 3rd party drivers using this element
++ * won't panic, for example by not allowing them to be loaded. That can
++ * be achieved by changing another, non-whitelisted symbol they use,
++ * either by nature of the change or by using RH_KABI_FORCE_CHANGE.
++ *
++ * Also note that any change to the element must preserve its size. Change
++ * of the size is not allowed and would constitute a silent kABI breakage.
++ * Beware that the RH_KABI_EXCLUDE macro does not do any size checks.
+ *
+ * NOTE
+ * Don't use ';' after these macros as it messes up the kABI checker by
+@@ -100,6 +112,7 @@
+ # define _RH_KABI_DEPRECATE_FN(_type, _orig, _args...) _type (*_orig)(_args)
+ # define _RH_KABI_REPLACE(_orig, _new) _orig
+ # define _RH_KABI_REPLACE_UNSAFE(_orig, _new) _orig
++# define _RH_KABI_EXCLUDE(_elem)
+
+ #else
+
+@@ -137,6 +150,8 @@
+ }
+ # define _RH_KABI_REPLACE_UNSAFE(_orig, _new) _new
+
++# define _RH_KABI_EXCLUDE(_elem) _elem
++
+ #endif /* __GENKSYMS__ */
+
+ /* semicolon added wrappers for the RH_KABI_REPLACE macros */
+@@ -169,4 +184,6 @@
+ */
+ # define _RH_KABI_RESERVE(n) unsigned long rh_reserved##n
+
++#define RH_KABI_EXCLUDE(_elem) _RH_KABI_EXCLUDE(_elem);
++
+ #endif /* _LINUX_RH_KABI_H */
+--
+2.26.0
+