[LU-9698] osd-ldiskfs: unknown symbol error on patched kernel Created: 21/Jun/17 Updated: 05/Aug/20 Resolved: 18/Sep/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | CEA | Assignee: | Oleg Drokin |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Centos6 - patched kernel |
||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 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 |
| Comments |
| Comment by Peter Jones [ 21/Jun/17 ] |
|
Oleg Could you please advise? Thanks Peter |
| Comment by Oleg Drokin [ 21/Jun/17 ] |
|
That's really strange. |
| Comment by Quentin Bouget [ 22/Jun/17 ] |
$> cat /boot/config-2.6.32.573.18.1.el6_lustre | grep KALLSYM CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_EXTRA_PASS=y It builds alright on my machine, it's just the insmod part that doesn't work. I don't know if LLNL builder tries to run llmount.sh, it if does, it is indeed strange... |
| Comment by Oleg Drokin [ 22/Jun/17 ] |
|
Hm, so I just looked and it appears that kallsyms_lookup_name is just not exported on rhel6 at all. |
| Comment by Quentin Bouget [ 23/Jun/17 ] |
|
> esp since on master we don't really support rhel6 anymore I'll switch to rhel7 then =] |
| Comment by Gerrit Updater [ 28/Jun/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/27874 |
| Comment by Andreas Dilger [ 28/Jun/17 ] |
|
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 |
| Comment by James A Simmons [ 29/Jul/17 ] |
|
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? |
| Comment by Peter Jones [ 18/Sep/17 ] |
|
I agree James |