IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Linux kernel supports the direct loading of compressed modules
(via finit_module system call) since version 5.15. However
decompression options are less flexible (and are set at
the compile time). In particular kernel can read lzma archives
only with a dictionary size exactly 1 MiB, and crc32 checksum.
kmod started to make use of direct module loading since version
31. However kmod does not fall back to decompressing in the userspace
if the kernel compressed modules, which causes serious troubles
(boot failures, some devices not working, etc).
To avoid the problem teach process-debuginfo.in to re-compress
kernel modules correctly (crc32 checksum, 1 MiB dictionary)
so the kernel can load them directly.
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fbf5892df21a8ccfcb2fda0fd65bc3169c89ed28
Reviewed-by: Vitaly Chikunov <vt@altlinux.org>
crash is unable to handle vmlinux split into vmlinux.debug because it
cannot find `.symtab`[1]. This is not expected to be fixed soon.
Really, there is not point to split it because both halves are in
the same -debuginfo package and this is only complicates things.
This also undoes approach taken in 894f4140c ("process-debuginfo: Add
.gnu_debuglink symlink for vmlinux").
Link: https://github.com/crash-utility/crash/issues/160
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
`eu-strip --strip-all` started to strip .symtab for un-def kernel
triggering different code path in crash(8) thus making it follow
value of `.gnu_debuglink` section and miss vmlinux.debug.
Also, this seems to be more portable overall - we can find vmlinux by
prepending `/usr/lib/debug` or by appending `.debug`.
With educated guess we assume eu-strip will put "BASENAME.debug" in
`.gnu_debuglink`.
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
`.BTF' section is needed to load kernel modules if
`CONFIG_DEBUG_INFO_BTF_MODULES' is enabled. This requirement is
introduced in Linux commit c446fdacb10d ("bpf: fix
register_btf_kfunc_id_set for !CONFIG_DEBUG_INFO_BTF").
`--keep-section=.BTF' is added also for vmlinux processing, because
commit seems to affect vmlinux (in case of `CONFIG_DEBUG_INFO_BTF').
Encountered error message:
# modprobe nf_nat; dmesg | tail -1
modprobe: ERROR: could not insert 'nf_nat': Unknown symbol in module, or unknown parameter (see dmesg)
[16781.315808] missing module BTF, cannot register kfuncs
Reported-by: Andrew A. Vasilyev <andy@altlinux.org>
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Create empty directories under `/usr/src/debug` tree for source paths
containing `..` (for example `../../src` in elfutils). This should fix
debuginfo sources for autotools builds in subdir.
Fixes: https://bugzilla.altlinux.org/39175
Consider another directory level when searching for vmlinux, for kernel
builds in sub-directory using `make O=output_dir'. Also, improve warning
message making it more understandable.
Reason: ae1ecef8 ("process-debuginfo: Do not call eu-elfcompress if it doesn't exist")
Fixes: 8682814b ("debuginfo: Try to uncompress if debugedit failed to extract sources list")
If debugedit failed to extract sources list, uncompress and try again.
Then compress back.
ps. Interesting relevant reading:
https://blogs.oracle.com/solaris/elf_section_compression-v2
Spelling suggestions by Dmitry V. Levin <ldv@altlinux.org>.
Actually, `.debug_line` section is checked (implicitly by debugedit)
which should go together with all `.debug_*` sections. This
simplification will make check faster.
Note: Only non-stripped binaries are checked.
Spelling fixes, usage of `Warning' function, and redirect to stderr is
suggested by Dmitry V. Levin <ldv@altlinux.org>.
E2K arch have old elfutils-0.159 which doesn't have eu-elfcompress.
Error:
/usr/lib/rpm/process-debuginfo: line 68: eu-elfcompress: command not found
Reported-by: Andrey Savchenko <bircoph@altlinux.org>
Allow `crash` (gdb-7.6 based) to work out of the box.
Otherwise it will fail with the error:
Dwarf Error: wrong version in compilation unit header (is 0, should be 2, 3, or 4)
Alas, it will not be able to load debuginfo for the ko modules, but, advanced
user can `eu-elfcompress -t none` them manually.
We can't keep modules uncompressed due to `cpio archive too big - 4136M'
RPM build error.