Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-9698

osd-ldiskfs: unknown symbol error on patched kernel

Details

    • Bug
    • Resolution: Won't Fix
    • Minor
    • None
    • None
    • None
    • Centos6 - patched kernel
    • 3
    • 9223372036854775807

    Description

      Running llmount.sh from master with a patched kernel fails with:

      $> llmount.sh
      [...]
      insmod: error inserting '/home/user/lustre-release/lustre/tests/../osd-ldiskfs/osd_ldiskfs.ko': -1 Unknown symbol in module
      

      Output of dmesg:

      $> dmesg | tail -1
      osd_diskfs Unknown symbol kallsyms_lookup_name (err 0)
      

      The problem appears after commit 0f0a43b

      Attachments

        Issue Links

          Activity

            [LU-9698] osd-ldiskfs: unknown symbol error on patched kernel
            pjones Peter Jones made changes -
            Reporter Original: Quentin Bouget [ bougetq ] New: CEA [ cealustre ]
            pjones Peter Jones made changes -
            Resolution New: Won't Fix [ 2 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            pjones Peter Jones added a comment -

            I agree James

            pjones Peter Jones added a comment - I agree James
            pjones Peter Jones made changes -
            Link Original: This issue is related to JFC-10 [ JFC-10 ]
            pjones Peter Jones made changes -
            Link Original: This issue is related to JFC-19 [ JFC-19 ]
            simmonsja James A Simmons added a comment - - edited

            Now that https://review.whamcloud.com/28029 which Bob had RHEL6.9 kernel include a patch to export kallsyms when build RHEL kernel. This is fine since RHEL6 kernels will never be patchless like RHEL7 kernels. We should be able to close this since this is the case?

            simmonsja James A Simmons added a comment - - edited Now that https://review.whamcloud.com/28029 which Bob had RHEL6.9 kernel include a patch to export kallsyms when build RHEL kernel. This is fine since RHEL6 kernels will never be patchless like RHEL7 kernels. We should be able to close this since this is the case?
            pjones Peter Jones made changes -
            Link New: This issue is related to JFC-19 [ JFC-19 ]
            mdiep Minh Diep made changes -
            Link New: This issue is related to JFC-10 [ JFC-10 ]
            adilger Andreas Dilger added a comment - - edited

            It looks like RHEL6 has EXPORT_SYMBOL_GPL(kallsyms_on_each_symbol) that could be used for doing the symbol lookup, like:

            #ifndef HAVE_KALLSYMS_LOOKUP_NAME
            int kallsyms_strcmp(void *name, const char *symbol_name, struct module *, unsigned long symbol_address)
            {
                    return strcmp(name, symbol_name) == 0 ? symbol_address : 0;
            }
            
            /* Note that kallsyms_strcmp() cannot return the full symbol address, only the low 32 bits.
             * We can handle this by extracting the high word from some other kernel function */
            unsigned long ll_kallsyms_lookup_name(const char *name)
            {
                    unsigned int low_addr = kallsyms_on_each_symbol(kallsyms_strcmp, name);
            
                    return low_addr ? kallsyms_on_each_symbol & 0xffffffff00000000ULL | low_addr : 0;
            }
            #else
            #define ll_kallsyms_lookup_name(name) kallsyms_lookup_name(name)
            #endif
            
            adilger Andreas Dilger added a comment - - edited It looks like RHEL6 has EXPORT_SYMBOL_GPL(kallsyms_on_each_symbol) that could be used for doing the symbol lookup, like: #ifndef HAVE_KALLSYMS_LOOKUP_NAME int kallsyms_strcmp(void *name, const char *symbol_name, struct module *, unsigned long symbol_address) { return strcmp(name, symbol_name) == 0 ? symbol_address : 0; } /* Note that kallsyms_strcmp() cannot return the full symbol address, only the low 32 bits. * We can handle this by extracting the high word from some other kernel function */ unsigned long ll_kallsyms_lookup_name( const char *name) { unsigned int low_addr = kallsyms_on_each_symbol(kallsyms_strcmp, name); return low_addr ? kallsyms_on_each_symbol & 0xffffffff00000000ULL | low_addr : 0; } # else #define ll_kallsyms_lookup_name(name) kallsyms_lookup_name(name) #endif

            Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/27874
            Subject: LU-9698 osd-ldiskfs: See if kallsyms_lookup_name is exported
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 38e08695753f0511c2cab5109a2411ef43495ad1

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/27874 Subject: LU-9698 osd-ldiskfs: See if kallsyms_lookup_name is exported Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 38e08695753f0511c2cab5109a2411ef43495ad1

            People

              green Oleg Drokin
              cealustre CEA
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: