| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 51c409b ("Cache the offset of crc") unintentinally changed the
comparison "if (elf->class & KMOD_ELF_32)" to
"if (elf->class == KMOD_ELF_32)".
This has been reported by Serge Voilokov <serge0x76@gmail.com>:
On Raspberry PI elf->class equals KMOD_ELF_32|KMOD_ELF_LSB so
valid condition should be (elf->class & KMOD_ELF_32) instead of
(elf->class == KMOD_ELF_32).
This fixes "modprobe --dump-modversions" failing on 32b systems.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
When we are told to remove the "__versions" section we were mangling
that section instead of tweaking the SHF_ALLOC flag in its header.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When told to force load a module, we were removing only the value of
vermagic instead of the complete entry.
Philippe De Swert (philippe.deswert@jollamobile.com) sent a patch that
was additionally mangling also the last two chars of the key
("vermagic="). Instead of creating an invalid entry in .modinfo section
like this, this patch removes the complete entry, key + value, by
zeroing the entire string.
Much thanks to Philippe who found the issue and pointed to the fix.
|
|
|
|
|
|
|
|
| |
I hate this kind of READV and WRITEV macros that Gustavo seems to love.
clang-analyzer hates them as well.
I'm not motivated enough to refactor this, but I want a clean clang
report, so just shut it up.
|
| |
|
|
|
|
|
| |
This function is used to find a certain section in ELF file. It will be
used to get the modname from an ELF file.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Uses kmod_elf_get_dependency_symbols() that looks into ".symtab" for
UNDEF symbols and matches the name from ".strtab" to "__versions" to
get crc.
Likely the public API should unify the symbol information getters and
list release, they are almost the same.
|
|
|
|
| |
will be used to share this structure with get_dependency_symbols()
|
|
|
|
|
|
|
|
| |
Similar to module-init-tools load_symbols(), it will try .symtab and
.strtab for symbols starting with __crc_, if they are found their crc
is read from ELF's Elf_Sym::st_value.
If not found, then it will fallback to __ksymtab_strings.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Commit "b20dc17 Remove unneeded reference to last string" reverted the
fix in "47a0ef6 elf: do not output empty strings." and empty strings are
appearing again in kmod-modinfo.
With this commit we do a bit different and instead of keeping the
reference to last string we skip the '\0' inside the loop.
|
|
|
|
|
|
| |
This way we don't need to check every time in loop. Indeed compiler
could already optimize out that checks, but this ways is cleaner and
shorter.
|
| |
|
|
|
|
|
| |
Copy the entire string only once and then scan it, setting up the
pointers of the vector.
|
| |
|
|
|
|
| |
See CODING-STYLE for reference
|
| |
|
| |
|
|
|
|
|
| |
Mimics module-init-tools's dump_modversions() that calls skip_dot()
to skip leading dots. This is required for PPC64.
|
| |
|
| |
|
|
|
|
| |
there is only a single file header, multiple sections.
|
|
Needs testing, but should work.
|