[Bug 1166406] New: Consider moving /boot/vmlinux-*.xz to a different package
http://bugzilla.suse.com/show_bug.cgi?id=1166406 Bug ID: 1166406 Summary: Consider moving /boot/vmlinux-*.xz to a different package Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-maintainers@forge.provo.novell.com Reporter: fvogt@suse.com QA Contact: qa-bugs@suse.de CC: jeos-internal@suse.de Found By: --- Blocker: --- Currently the kernel is installed twice into /boot (at least on x86_64 and arm64), once as self-decompressing vmlinuz and then the raw compressed kernel as vmlinux.xz The latter isn't needed for booting and only used for debugging or by using special tools (AFAIK, please correct me if I'm wrong), so not useful on most systems. Especially with kernel-default-base, this ~10MiB file is almost 30% of the whole package in size, so dropping/moving that would have a noticeable impact on size reduction. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
Ludwig Nussel
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c1
Takashi Iwai
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c2
--- Comment #2 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c3
Takashi Iwai
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c4
--- Comment #4 from Jeff Mahoney
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c5
--- Comment #5 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c6
--- Comment #6 from Jeff Mahoney
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c7
--- Comment #7 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c8
--- Comment #8 from Jeff Mahoney
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c9
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c10
--- Comment #10 from Tony Jones
It's needed for pretty much anything that needs a symbol table (and also the -debuginfo package).
for perf, /proc/kallsyms is generally used (subject to kptr_restrict. debuginfo vmlinux is used for annotation i'd need to look closer at what exactly systemtap can do, without vmlinux, without the debug version the answer is usually very little (some trace point stuff). I think it's best to move slowly here. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c11
--- Comment #11 from Tony Jones
If there are tools that can work with the vmlinux only then those will break.
Correct. Hence my previous comment about moving slowly here. It may well be that most of these have been converted over to the various /proc interfaces (when full debuginfo isn't needed) but we should check. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c12
--- Comment #12 from Tony Jones
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c13
Jiri Slaby
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c14
--- Comment #14 from Jiri Slaby
The point here is if also -debuginfo package is needed it can be moved there
I am strongly against moving it to -debuginfo. I don't want to download gigabytes just because of few MBs. I often live w/o debuginfo when debugging, symbols are far enough.
or some other -debugwhatever.
But this is OK by me. Maybe simply -vmlinux. pesign-obs-integration might need a change when the location or rpm name changes too. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c15
--- Comment #15 from Tony Jones
When I added support for xz compression of vmlinux in bug 1155921, I investigated and only kdump and crash read it.
Per comment 12, this is clearly not true. I don't thinking moving it to debuginfo is a good idea. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c16
--- Comment #16 from Jiri Slaby
(In reply to Jiri Slaby from comment #13)
When I added support for xz compression of vmlinux in bug 1155921, I investigated and only kdump and crash read it.
Per comment 12, this is clearly not true.
Right, I broke it by bug 1155921 then. I will fix it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c17
Jiri Slaby
# stap do_fork.stp semantic error: while resolving probe point: identifier 'kernel' at /home/tonyj/stap/do_fork.stp:1:7 source: probe kernel.function("_do_fork"){ ^
semantic error: missing x86_64 kernel/module debuginfo [man warning::debuginfo] under '/lib/modules/4.12.14-197.34-default/build'
Hmm, I don't see this: # ll /boot/vmlinux* -rw-r--r-- 1 root root 10030200 Mar 9 14:20 /boot/vmlinux-5.5.7-1-default.xz # strace -fo bubak -e trace=%file stap -v b.stap Pass 1: parsed user script and 476 library scripts using 97296virt/88352res/6588shr/81884data kb, in 280usr/90sys/559real ms. Pass 2: analyzed script: 1 probe, 0 functions, 0 embeds, 0 globals using 119936virt/112752res/8172shr/104524data kb, in 1110usr/100sys/1225real ms. Pass 3: translated to C into "/tmp/stapcPCpg1/stap_81ae959f3a822f58c54b6ac1ed4df3ae_916_src.c" using 119936virt/113000res/8420shr/104524data kb, in 990usr/60sys/1066real ms. Pass 4: compiled C into "stap_81ae959f3a822f58c54b6ac1ed4df3ae_916.ko" in 16370usr/8760sys/37761real ms. Pass 5: starting run. do fork: no dwarf do fork: no dwarf ^Cdo fork: no dwarf Pass 5: run completed in 20usr/200sys/50435real ms. # grep '"/boot' bubak 24675 openat(AT_FDCWD, "/boot/System.map-5.5.7-1-default", O_RDONLY) = 3 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default.debug", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/.debug/vmlinux-5.5.7-1-default.debug", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/.debug/vmlinux-5.5.7-1-default", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default.debug", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/build/vmlinux-5.5.7-1-default.debug", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/build/vmlinux-5.5.7-1-default", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default.debug", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 lstat("/boot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 24675 lstat("/boot/vmlinux-5.5.7-1-default", 0x7ffc1e6778e0) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default.gz", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default.bz2", O_RDONLY) = -1 ENOENT (No such file or directory) 24675 openat(AT_FDCWD, "/boot/vmlinux-5.5.7-1-default.xz", O_RDONLY) = 3 So it can and does open .xz. Tony, do you have some old version of systemtap? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c18
--- Comment #18 from Jiri Slaby
So it can and does open .xz. Tony, do you have some old version of systemtap?
Stap seems to use libelf to handle that and this was added there by
commit 6ecdead8c0fbba51e8b2561e4d54dd7be3f69204
Author: Roland McGrath
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c19
--- Comment #19 from Tony Jones
(In reply to Jiri Slaby from comment #17)
So it can and does open .xz. Tony, do you have some old version of systemtap?
Stap seems to use libelf to handle that and this was added there by commit 6ecdead8c0fbba51e8b2561e4d54dd7be3f69204 Author: Roland McGrath
Date: Fri Feb 11 12:29:45 2011 -0800 libdwfl: Search for Linux kernel binaries with compression file name suffixes.
So xz should not be a problem. That said, I don't understand what your issue is. Something seems to be broken on your system.
I don't have an issue. The vmlinux I was using wasn't xz compressed and so systemtap wasn't decompressing it. Maybe it can decompress xz. My point was that you said only "kdump and crash read it [vmlinux]" which isn't true, systemtap also does. That is all. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c20
Jiri Slaby
I don't have an issue. The vmlinux I was using wasn't xz compressed and so systemtap wasn't decompressing it. Maybe it can decompress xz.
My point was that you said only "kdump and crash read it [vmlinux]" which isn't true, systemtap also does. That is all.
Aaah. It also looks (from the source code) that libdw (elfutils) can read also vmlinuz if there is no vmlinux. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c21
--- Comment #21 from Tony Jones
(In reply to Tony Jones from comment #19)
I don't have an issue. The vmlinux I was using wasn't xz compressed and so systemtap wasn't decompressing it. Maybe it can decompress xz.
My point was that you said only "kdump and crash read it [vmlinux]" which isn't true, systemtap also does. That is all.
Aaah. It also looks (from the source code) that libdw (elfutils) can read also vmlinuz if there is no vmlinux.
This wasn't working for me when I tried it, so I had to manually decompress the installed vmlinux. Possible I'm using too old an elfutils, or issue was elsewhere. Regardless, not relevant to this bug. I'll verify it works off-line. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c22
--- Comment #22 from Tony Jones
This wasn't working for me when I tried it, so I had to manually decompress the installed vmlinux. Possible I'm using too old an elfutils, or issue was elsewhere. Regardless, not relevant to this bug. I'll verify it works off-line.
Sorry, I misread what you wrote. Ignore above. I knew elfutils decompression of vmlinux.* was possible for Systemtap but I was not aware that vmlinuz could be handled by Systemtap. I will look at it some more. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c23
--- Comment #23 from Tony Jones
Aaah. It also looks (from the source code) that libdw (elfutils) can read also vmlinuz if there is no vmlinux.
Our vmlinuz is stripped of all ELF symbol data. # eu-readelf -s /boot/vmlinux-5.5.7-1-default.xz | wc -l 122468 # eu-readelf -s /boot/vmlinuz | wc -l 0 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c24
--- Comment #24 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c25
--- Comment #25 from Tony Jones
This is not the way to tell. You must first unpack it. You could 'prove' any rpm package is stripped of all symbols by running readelf on the rpm.
My understanding (as was Jiri's from looking at the code) is that libdw handles the unpacking. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c26
--- Comment #26 from Tony Jones
(In reply to Michal Suchanek from comment #24)
This is not the way to tell. You must first unpack it. You could 'prove' any rpm package is stripped of all symbols by running readelf on the rpm.
My understanding (as was Jiri's from looking at the code) is that libdw handles the unpacking.
Regardless, if I manually unpack the vmlinux from the vmlinuz using scripts/extract-vmlinux, the result contains no symbols. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c27
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c28
Ludwig Nussel
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c29
--- Comment #29 from Takashi Iwai
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c30
--- Comment #30 from Tony Jones
I guess what you want is to install that package if both kernel-default as well as kernel-default-debuginfo are installed.
Maybe I'm misunderstanding. How is that different from just adding vmlinux to the debuginfo package? Also, as already shown, systemtap can make use of the symbol information in vmlinux without debuginfo. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1166406
http://bugzilla.suse.com/show_bug.cgi?id=1166406#c31
--- Comment #31 from Michal Suchanek
https://bugzilla.suse.com/show_bug.cgi?id=1166406
https://bugzilla.suse.com/show_bug.cgi?id=1166406#c32
Miroslav Beneš
https://bugzilla.suse.com/show_bug.cgi?id=1166406
Libor Pechacek
https://bugzilla.suse.com/show_bug.cgi?id=1166406
https://bugzilla.suse.com/show_bug.cgi?id=1166406#c33
--- Comment #33 from Fabian Vogt
https://bugzilla.suse.com/show_bug.cgi?id=1166406
https://bugzilla.suse.com/show_bug.cgi?id=1166406#c40
Jiri Slaby
https://bugzilla.suse.com/show_bug.cgi?id=1166406
https://bugzilla.suse.com/show_bug.cgi?id=1166406#c41
Fabian Vogt
So what's the status of this please? Is it still desired, can we proceed? Or is this wontfix?
Yep, still desired. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1166406
https://bugzilla.suse.com/show_bug.cgi?id=1166406#c42
--- Comment #42 from Michal Suchanek
https://bugzilla.suse.com/show_bug.cgi?id=1166406
Libor Pechacek
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com