Re: [OS-BUILD PATCHv3 0/0] scriptlets: clean up declared installation dependencies, stop calling kernel-install in chroot or container
From: Zbigniew Jędrzejewski-Szmek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1617#note_846918364 I forgot to add: if the third commit is too much, I'm fine with dropping it. This can always be revived later if some concrete use cases pops up. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv3 0/0] scriptlets: clean up declared installation dependencies, stop calling kernel-install in chroot or container
From: Zbigniew Jędrzejewski-Szmek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1617#note_846917518 I don't have any immediate use case in mind. This is more a matter of general principle: dependencies should only be declared if the package genuinely needs the dependency to function. People tend to use packages in unusual and innovative ways and we shouldn't have dependencies for things which would *usually* be used. Less dependencies == more flexibility. Some contrived cases: a qemu image where the kernel is used externally (`qemu -kernel -initrd …`), and then you only need the modules in the guest, so you don't want kernel-install. Such cases would *usually* involve systemd in the image, but maybe if you're building an single-executable appliance, you don't have systemd there. So maybe you're building a container with a qemu and single application isolated in a VM, and you want the kernel for the qemu in the container, but no systemd and no boot loader. Or maybe you're trying to convert Fedora to runit or back to sysvinit, so you want to drop dependencies on systemd as much as possible ;) As I said, I don't have a good use case, but I think the general principle is reasonable. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv3 1/2] redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE
From: Jiri Benc on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619#note_846679718 This leaves the semicolon here in the GENKSYMS pass. I don't think we want that; the kABI checksum would be generated from: ``` union { unsigned long xyz[_size]; ; } ``` The fix is redefining __RH_KABI_CHECK_SIZE to include the semicolon (and call it without the semicolon everywhere). ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv3 2/2] redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option
From: Sabrina Dubroca redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option When the kABI macros were copied from the RHEL kernel to ARK, the RH_KABI_SIZE_ALIGN_CHECKS config option was dropped. Without it, the size checks included in some of the kABI macros can't be enabled. Add the KABI_SIZE_ALIGN_CHECKS config option, enable it on regular ARK configs, and disable it for debug and kgcov kernels. Signed-off-by: Sabrina Dubroca diff --git a/Kconfig.redhat b/Kconfig.redhat index blahblah..blahblah 100644 --- a/Kconfig.redhat +++ b/Kconfig.redhat @@ -14,4 +14,13 @@ config RHEL_DIFFERENCES Unless you want a restricted kernel, say N here. +config RH_KABI_SIZE_ALIGN_CHECKS + bool "Enables more stringent kabi checks in the macros" + depends on RHEL_DIFFERENCES + default y + help + This option enables more stringent kabi checks. Those must + be disabled in case of a debug build, because debug builds + allow to change struct sizes. + endmenu diff --git a/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set diff --git a/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y diff --git a/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set diff --git a/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv3 1/2] redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE
From: Sabrina Dubroca redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE This macro is similar to RH_KABI_EXTEND_WITH_SIZE, but with a different intention. While RH_KABI_EXTEND_WITH_SIZE is meant to add new elements that may grow in the future to kABI-protected structures, RH_KABI_EXCLUDE_WITH_SIZE should be used to hide existing elements from kABI checksum computation, while allowing them to be extended in the future without silently breaking binary compatibility of any field that follows it. The implementation differs from RH_KABI_EXTEND_WITH_SIZE so that _size is included in the kABI checksum. That way, we can't accidentally grow the reserved space, as that would change the offsets of all the following fields. The size check guarantees that binary compatibility is preserved. Until now, __RH_KABI_CHECK_SIZE was only used in the !__GENKSYMS__ versions of macros, so it wasn't defined in the __GENKSYMS__ case. We need to define it to nothing so that _new is ignored by checksum computation. Signed-off-by: Sabrina Dubroca 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 @@ -306,6 +306,23 @@ * 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. * + * RH_KABI_EXCLUDE_WITH_SIZE + * Like RH_KABI_EXCLUDE, this macro excludes the element from + * checksum generation. The same warnings as for RH_KABI_EXCLUDE + * apply: use RH_KABI_FORCE_CHANGE. + * + * This macro is intended to be used for elements embedded inside + * kABI-protected structures (struct, array). In contrast with + * RH_KABI_EXCLUDE, this macro reserves extra space, so that the + * embedded element can grow without changing the offsets of the + * fields that follow. The provided 'size' is the total space to be + * added in longs (i.e. it's 8 * 'size' bytes), including the size + * of the added element. It is automatically checked that the new + * element does not overflow the reserved space, now nor in the + * future. The size is also included in the checksum via the + * reserved space, to ensure that we don't accidentally change it, + * which would change the offsets of the fields that follow. + * * RH_KABI_BROKEN_INSERT * RH_KABI_BROKEN_REMOVE * Insert a field to the middle of a struct / delete a field from a struct. @@ -377,6 +394,8 @@ # define _RH_KABI_REPLACE(_orig, _new) _orig # define _RH_KABI_EXCLUDE(_elem) +# define __RH_KABI_CHECK_SIZE(_item, _size) + #else # define RH_KABI_ALIGN_WARNING ". Disable CONFIG_RH_KABI_SIZE_ALIGN_CHECKS if debugging." @@ -477,6 +496,13 @@ #define RH_KABI_EXCLUDE(_elem) _RH_KABI_EXCLUDE(_elem); +#define RH_KABI_EXCLUDE_WITH_SIZE(_new, _size) \ + union { \ + RH_KABI_EXCLUDE(_new) \ + unsigned long RH_KABI_UNIQUE_ID[_size]; \ + __RH_KABI_CHECK_SIZE(_new, 8 * (_size));\ + }; + #define RH_KABI_EXTEND_WITH_SIZE(_new, _size) \ RH_KABI_EXTEND(union { \ _new; \ -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv3 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Sabrina Dubroca on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 This MR introduces a new kABI macro, RH_KABI_EXCLUDE_WITH_SIZE. The implementation is identical to RH_KABI_EXTEND_WITH_SIZE, but the meaning is more in line with RH_KABI_EXCLUDE. The size check and reserved space allows us to exclude an element embedded inside a kABI-protected structure while reserving space for it to grow in the future. The size checks that are part of multiple kABI macros are currently not enabled because the config option to turn them on is missing. Those size checks only make sense on regular builds, so they're disabled on debug kernels. Signed-off-by: Sabrina Dubroca --- include/linux/rh_kabi.h| 26 ++ redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS| 1 + redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + Kconfig.redhat | 9 +++ 6 files changed, 39 insertions(+), 0 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Sabrina Dubroca on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619#note_846657442 In v3 I modified RH_KABI_EXCLUDE_WITH_SIZE to only exclude the new element from the checksum, but include the reserved size, so that we can't accidentally grow it without breaking the checksum. I also rebased and addressed Don's and Justin's comments. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Sabrina Dubroca on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619#note_846653940 Ok, addressed in v4 (I missed the 'depends on' in v3). Thanks. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Sabrina Dubroca on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619#note_846653350 Ok, addressed in v4 (I forgot the 'depends on' in v3). ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619#note_846563779 @sdubroca - I agree with @jmflinuxtx . Let's keep Red Hat configs centralized in Kconfig.redhat. Adding a 'depends on RHEL_DIFFERENCES' is to help Fedora keep it disabled. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv3 0/0] scriptlets: clean up declared installation dependencies, stop calling kernel-install in chroot or container
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1617#note_846539664 @keszybz - thanks for the contribution. I feel like I am missing something obvious. If I follow your assumption, that someone will install a kernel in a virt env or container that may not have systemd and/or access to /boot, then your changes make sense and I can see how it prevents the grub error messages you are seeing. However, I am stuck on the assumption part. Is there any value in installing a kernel in those environments? The package puts everything under /lib/modules easily enough, you just loose the /boot and grub setup. Is that useful? It might be, but currently I am thinking all these changes do is prevent error messages when the developer does something not useful. And I could be ok with that, I think. I am probably missing something obvious. Thoughts? ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619#note_846439422 It seems the Kconfig entry for this really belongs in Kconfig.redhat perhaps even better if it had a dep on RHEL_DIFFERENCES as well. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCH] redhat: configs: Disable team driver
From: Hangbin Liu redhat: configs: Disable team driver Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1945477 Upstream Status: RHEL-only This drivers have been deprecated with RHEL9, so with RHEL10 it is time to remove it. Disable the NET_TEAM on ARK. No need to set the modes as they depend on team driver. Keep the config enabled in Fedora as Fedora user may still need this driver. Signed-off-by: Hangbin Liu diff --git a/redhat/configs/ark/generic/CONFIG_NET_TEAM b/redhat/configs/ark/generic/CONFIG_NET_TEAM new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/generic/CONFIG_NET_TEAM @@ -0,0 +1,2 @@ +# This CONFIG has been disabled in RHEL by RHEL Engineering. Please contact Red Hat Support for further assistance. +# CONFIG_NET_TEAM is not set diff --git a/redhat/configs/common/generic/CONFIG_NET_TEAM b/redhat/configs/fedora/generic/CONFIG_NET_TEAM rename from redhat/configs/common/generic/CONFIG_NET_TEAM rename to redhat/configs/fedora/generic/CONFIG_NET_TEAM index blahblah..blahblah 100644 --- a/redhat/configs/common/generic/CONFIG_NET_TEAM +++ b/redhat/configs/fedora/generic/CONFIG_NET_TEAM diff --git a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_ACTIVEBACKUP b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_ACTIVEBACKUP rename from redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_ACTIVEBACKUP rename to redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_ACTIVEBACKUP index blahblah..blahblah 100644 --- a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_ACTIVEBACKUP +++ b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_ACTIVEBACKUP diff --git a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_BROADCAST b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_BROADCAST rename from redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_BROADCAST rename to redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_BROADCAST index blahblah..blahblah 100644 --- a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_BROADCAST +++ b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_BROADCAST diff --git a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_LOADBALANCE b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_LOADBALANCE rename from redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_LOADBALANCE rename to redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_LOADBALANCE index blahblah..blahblah 100644 --- a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_LOADBALANCE +++ b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_LOADBALANCE diff --git a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_RANDOM b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_RANDOM rename from redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_RANDOM rename to redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_RANDOM index blahblah..blahblah 100644 --- a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_RANDOM +++ b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_RANDOM diff --git a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_ROUNDROBIN b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_ROUNDROBIN rename from redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_ROUNDROBIN rename to redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_ROUNDROBIN index blahblah..blahblah 100644 --- a/redhat/configs/common/generic/CONFIG_NET_TEAM_MODE_ROUNDROBIN +++ b/redhat/configs/fedora/generic/CONFIG_NET_TEAM_MODE_ROUNDROBIN -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1620 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv2 1/2] redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE
From: Sabrina Dubroca redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE This macro is identical to RH_KABI_EXTEND_WITH_SIZE, but with a different intention. While RH_KABI_EXTEND_WITH_SIZE is meant to add new elements that may grow in the future to kABI-protected structures, RH_KABI_EXCLUDE_WITH_SIZE should be used to hide existing elements from kABI checksum computation, while allowing them to be extended in the future without silently breaking binary compatibility of any field that follows it. The size check guarantees that binary compatibility is preserved. Signed-off-by: Sabrina Dubroca 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 @@ -306,6 +306,21 @@ * 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. * + * RH_KABI_EXCLUDE_WITH_SIZE + * Like RH_KABI_EXCLUDE, this macro excludes the element from + * checksum generation. The same warnings as for RH_KABI_EXCLUDE + * apply: use RH_KABI_FORCE_CHANGE. + * + * This macro is intended to be used for elements embedded inside + * kABI-protected structures (struct, array). In contrast with + * RH_KABI_EXCLUDE, this macro reserves extra space, so that the + * embedded element can grow without changing the offsets of the + * fields that follow. The provided 'size' is the total space to be + * added in longs (i.e. it's 8 * 'size' bytes), including the size + * of the added element. It is automatically checked that the new + * element does not overflow the reserved space, now nor in the + * future. + * * RH_KABI_BROKEN_INSERT * RH_KABI_BROKEN_REMOVE * Insert a field to the middle of a struct / delete a field from a struct. @@ -477,6 +492,13 @@ #define RH_KABI_EXCLUDE(_elem) _RH_KABI_EXCLUDE(_elem); +#define RH_KABI_EXCLUDE_WITH_SIZE(_new, _size) \ + RH_KABI_EXCLUDE(union { \ + _new; \ + unsigned long RH_KABI_UNIQUE_ID[_size]; \ + __RH_KABI_CHECK_SIZE(_new, 8 * (_size));\ + }) + #define RH_KABI_EXTEND_WITH_SIZE(_new, _size) \ RH_KABI_EXTEND(union { \ _new; \ -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv2 2/2] redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option
From: Sabrina Dubroca redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option When the kABI macros were copied from the RHEL kernel to ARK, the RH_KABI_SIZE_ALIGN_CHECKS config option was dropped. Without it, the size checks included in some of the kABI macros can't be enabled. Add the KABI_SIZE_ALIGN_CHECKS config option, enable it on regular ARK configs, and disable it for debug and kgcov kernels. Signed-off-by: Sabrina Dubroca diff --git a/Kconfig b/Kconfig index blahblah..blahblah 100644 --- a/Kconfig +++ b/Kconfig @@ -32,3 +32,11 @@ source "lib/Kconfig.debug" source "Documentation/Kconfig" source "Kconfig.redhat" + +config RH_KABI_SIZE_ALIGN_CHECKS + bool "Enables more stringent kabi checks in the macros" + default y + help + This option enables more stringent kabi checks. Those must + be disabled in case of a debug build, because debug builds + allow to change struct sizes. diff --git a/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set diff --git a/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y diff --git a/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set diff --git a/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv2 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Sabrina Dubroca on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 This MR introduces a new kABI macro, RH_KABI_EXCLUDE_WITH_SIZE. The implementation is identical to RH_KABI_EXTEND_WITH_SIZE, but the meaning is more in line with RH_KABI_EXCLUDE. The size check and reserved space allows us to exclude an element embedded inside a kABI-protected structure while reserving space for it to grow in the future. The size checks that are part of multiple kABI macros are currently not enabled because the config option to turn them on is missing. Those size checks only make sense on regular builds, so they're disabled on debug kernels. Signed-off-by: Sabrina Dubroca --- include/linux/rh_kabi.h| 22 ++ redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS| 1 + redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + Kconfig| 8 +++ 6 files changed, 34 insertions(+), 0 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv3 0/0] scriptlets: clean up declared installation dependencies, stop calling kernel-install in chroot or container
From: Zbigniew Jędrzejewski-Szmek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1617#note_846003134 I added a third commit now. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv3 0/0] scriptlets: clean up declared installation dependencies, stop calling kernel-install in chroot or container
From: Zbigniew Jędrzejewski-Szmek on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1617 NOTE: Truncated patchset due to missing public @redhat.com email address on your GitLab profile at https://gitlab.com/-/profile. Once that is fixed, close and reopen the merge request to retrigger sending the emails. --- redhat/kernel.spec.template | 30 ++ 1 files changed, 14 insertions(+), 16 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCH 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Jiri Benc on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619#note_846001310 Sabrina, I suggest enabling CONFIG_RH_KABI_SIZE_ALIGN_CHECKS only in redhat/configs/ark and disabling them in redhat/configs/fedora. That config option is not useful for Fedora. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCH 0/2] redhat: introduce RH_KABI_EXCLUDE_WITH_SIZE and enable size checks
From: Sabrina Dubroca on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 This MR introduces a new kABI macro, RH_KABI_EXCLUDE_WITH_SIZE. The implementation is identical to RH_KABI_EXTEND_WITH_SIZE, but the meaning is more in line with RH_KABI_EXCLUDE. The size check and reserved space allows us to exclude an element embedded inside a kABI-protected structure while reserving space for it to grow in the future. The size checks that are part of multiple kABI macros are currently not enabled because the config option to turn them on is missing. Those size checks only make sense on regular builds, so they're disabled on debug kernels. Signed-off-by: Sabrina Dubroca --- include/linux/rh_kabi.h| 22 ++ redhat/configs/common/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + redhat/configs/common/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 + Kconfig| 10 5 files changed, 35 insertions(+), 0 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCH 2/2] redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option
From: Sabrina Dubroca redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option When the kABI macros were copied from the RHEL kernel to ARK, the RH_KABI_SIZE_ALIGN_CHECKS config option was dropped. Without it, the size checks included in some of the kABI macros can't be enabled. Add the KABI_SIZE_ALIGN_CHECKS config option, enable it on regular configs, and disable it for debug kernels. Signed-off-by: Sabrina Dubroca diff --git a/Kconfig b/Kconfig index blahblah..blahblah 100644 --- a/Kconfig +++ b/Kconfig @@ -32,3 +32,13 @@ source "lib/Kconfig.debug" source "Documentation/Kconfig" source "Kconfig.redhat" + +config RH_KABI_SIZE_ALIGN_CHECKS + bool "Enables more stringent kabi checks in the macros" + default y + help + This option enables more stringent kabi checks. Those must + be disabled in case of a debug build, because debug builds + allow to change struct sizes. + + diff --git a/redhat/configs/common/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/common/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set diff --git a/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y diff --git a/redhat/configs/common/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS b/redhat/configs/common/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/common/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS @@ -0,0 +1 @@ +# CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCH 1/2] redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE
From: Sabrina Dubroca redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE This macro is identical to RH_KABI_EXTEND_WITH_SIZE, but with a different intention. While RH_KABI_EXTEND_WITH_SIZE is meant to add new elements that may grow in the future to kABI-protected structures, RH_KABI_EXCLUDE_WITH_SIZE should be used to hide existing elements from kABI checksum computation, while allowing them to be extended in the future without silently breaking binary compatibility of any field that follows it. The size check guarantees that binary compatibility is preserved. Signed-off-by: Sabrina Dubroca 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 @@ -306,6 +306,21 @@ * 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. * + * RH_KABI_EXCLUDE_WITH_SIZE + * Like RH_KABI_EXCLUDE, this macro excludes the element from + * checksum generation. The same warnings as for RH_KABI_EXCLUDE + * apply: use RH_KABI_FORCE_CHANGE. + * + * This macro is intended to be used for elements embedded inside + * kABI-protected structures (struct, array). In contrast with + * RH_KABI_EXCLUDE, this macro reserves extra space, so that the + * embedded element can grow without changing the offsets of the + * fields that follow. The provided 'size' is the total space to be + * added in longs (i.e. it's 8 * 'size' bytes), including the size + * of the added element. It is automatically checked that the new + * element does not overflow the reserved space, now nor in the + * future. + * * RH_KABI_BROKEN_INSERT * RH_KABI_BROKEN_REMOVE * Insert a field to the middle of a struct / delete a field from a struct. @@ -477,6 +492,13 @@ #define RH_KABI_EXCLUDE(_elem) _RH_KABI_EXCLUDE(_elem); +#define RH_KABI_EXCLUDE_WITH_SIZE(_new, _size) \ + RH_KABI_EXCLUDE(union { \ + _new; \ + unsigned long RH_KABI_UNIQUE_ID[_size]; \ + __RH_KABI_CHECK_SIZE(_new, 8 * (_size));\ + }) + #define RH_KABI_EXTEND_WITH_SIZE(_new, _size) \ RH_KABI_EXTEND(union { \ _new; \ -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2 0/0] scriptlets: clean up declared installation dependencies, stop calling kernel-install in chroot or container
From: Zbigniew Jędrzejewski-Szmek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1617#note_845976933 I think it'd make sense to make calls to kernel-install optional: i.e. do them only if `/usr/bin/kernel-install` is present. The justification is that on "normal" systems, systemd is installed and you want to call kernel-install. But if the kernel is pulled in a container or a build root, you want to skip the call, and right now we pull in systemd just to detect whether to skip. Hmm, I wanted to do this at some later point, but if we're touching the scriptlets here anyway, let's just do it here too. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCHv2 0/0] scriptlets: clean up declared installation dependencies, stop calling kernel-install in chroot or container
From: Zbigniew Jędrzejewski-Szmek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1617#note_845971647 Thank you for the review. I added `Requires(posttrans,preun): /usr/bin/systemd-detect-virt` and adjusted the comments on the message a bit. (It was already pulled in via systemd-udev, but it's better to be explicit.) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[OS-BUILD PATCHv2 0/0] scriptlets: clean up declared installation dependencies, stop calling kernel-install in chroot or container
From: Zbigniew Jędrzejewski-Szmek on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1617 NOTE: Truncated patchset due to missing public @redhat.com email address on your GitLab profile at https://gitlab.com/-/profile. Once that is fixed, close and reopen the merge request to retrigger sending the emails. --- redhat/kernel.spec.template | 28 1 files changed, 12 insertions(+), 16 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: [OS-BUILD PATCH] redhat: configs: Disable CONFIG_MPLS for s390x/zfcpdump
From: Patrick Talbert on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1606#note_845967814 @cohuck I've added you to the project so the Approve button should be available to you now. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure