On Sat, Mar 25, 2023 at 3:23 AM Akemi Yagi via rocky <rocky@lists.resf.org> wrote:
On Fri, Mar 24, 2023 at 8:49 PM 박영준 via rocky <rocky@lists.resf.org> wrote:
I debug the rocky 8.7 kernel. (4.18.0-425.3.1.el8.x86_64 and 4.18.0-425.13.1.el8.x86_64)
for our company module issue.

And I have a question .
why pv_mmu_ops notify_page_enc_status_changed field is moved to reserved1 field on (4.18.0-425.13.1.el8.x86_64)?
I think pv_mmu_ops structure reserved filed may exist for compatibility.
By moving field to reserved, size reduced.
(I think notify_page_enc_status_changed location dummy field needed or must not change the location)

Is there any reson I don't know ?
 
Rocky kernels are rebuilt from the source code of RHEL kernels without modifications (except debranding).  Therefore you need to ask Red Hat. However here is what I guess has happened.

In the GA kernel of RHEL 8.7 (4.18.0-425.3.1.el8), there was a kABI breakage. This caused failure of kmod packages built against this kernel. Turns out the breakage was in pv_mmu_ops structure and it was fixed in kernel-4.18.0-425.10.1.el8_7 [1]. That likely lead to what you have encountered.


Here's some additional info. I was curious to see how the kABI breakage was fixed. Below is a diff in the source code between kernel-425.3.1 and 425.13.1.

Akemi

=====================================================
$ diff -uNpr paravirt_types.h.425.3.1 paravirt_types.h.425.13.1
--- paravirt_types.h.425.3.1    2022-09-30 07:54:26.000000000 -0700
+++ paravirt_types.h.425.13.1   2023-02-02 08:42:46.000000000 -0800
@@ -205,8 +205,6 @@ struct pv_irq_ops {
 struct pv_mmu_ops {
        unsigned long (*read_cr2)(void);
 
-       void (*notify_page_enc_status_changed)(unsigned long pfn, int npages, bool enc);
-
        void (*write_cr2)(unsigned long);
 
        unsigned long (*read_cr3)(void);
@@ -306,7 +304,8 @@ struct pv_mmu_ops {
        void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
                           phys_addr_t phys, pgprot_t flags);
 
-       RH_KABI_RESERVE(1)
+       RH_KABI_USE(1, void (*notify_page_enc_status_changed)(unsigned long pfn,
+                                                       int npages, bool enc))
        RH_KABI_RESERVE(2)
        RH_KABI_RESERVE(3)
        RH_KABI_RESERVE(4)