[Bug 279122] /boot/kernel/kernel: "not stripped"

2024-05-30 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279122

--- Comment #2 from Vinícius Zavam  ---
(In reply to Warner Losh from comment #1)

thank you for the feedback about it, much appreciated.

now, quick question: would it make sense to have an 'opt-in' flag added into
the installer (with proper warnings related to it)?

I assume certain conditions would also make sense to offer that additional flag
- e.g.: should the 'kernel-dbg.txz' be chosen as one of the DISTFILES, simply
do not offer to strip anything.

of course: I'm considering that when I want to get something tested or
debugged/troubleshooted myself, I just spin up a machine with as many default
settings as possible (that includes the non-stripped kernel as we offer today)

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 279122] /boot/kernel/kernel: "not stripped"

2024-05-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279122

Warner Losh  changed:

   What|Removed |Added

 CC||i...@freebsd.org

--- Comment #1 from Warner Losh  ---
It breaks kernel panics: they are useless w/o symbols.
It breaks all the data we harvest from the kernel by reading it directly,
though most of those things are sysctl'd, but some reporting would be affected.
I'm glad it works for you, but I think that it's a really bad idea to do by
default.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 279122] /boot/kernel/kernel: "not stripped"

2024-05-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279122

Bug ID: 279122
   Summary: /boot/kernel/kernel: "not stripped"
   Product: Base System
   Version: 14.0-STABLE
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Many People
  Priority: ---
 Component: kern
  Assignee: b...@freebsd.org
  Reporter: egyp...@freebsd.org

I'm running stripped 'kernel' for quite a few years without ANY sort of issue.
I use them on physical and virtual machines - also, on "normal" deployments of
FreeBSD or serving mfs images (compressed, or not).

So, is there a very good reason why we (officially) do not strip the FreeBSD
kernel? - at least on STABLE or RELEASE versions.

Once I am pretty much far from being an expert on that level, I would love to
get more input about it from anyone that would be keen to explain that to me
(and others here). - shall this kind of topic be added to our Handbook (or
developers documentation) as well?

>From a FreeBSD live system, here we have some fair outputs of what is meant by
this PR:

  root@:~ # mkdir /tmp/base
  root@:~ # mount /dev/gpt/base0 /tmp/base/
  root@:~ # tar xf /usr/freebsd-dist/base.txz -C /tmp/ usr/bin/strip
  root@:~ # cp -a /boot/kernel/kernel /tmp/base/kernel 
  root@:~ # /tmp/usr/bin/strip /tmp/base/kernel

*** 14.0-RELEASE

root@:~ # uname -abiUK
FreeBSD  14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4:
Fri Nov 10 05:57:23 UTC 2023
r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
GENERIC 1400097 1400097 de04db27d4d136c96cba9e384c8bc9e7b337a2c5

root@:~ # file /boot/kernel/kernel /tmp/base/kernel
/boot/kernel/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=de04db27d4d136c96cba9e384c8bc9e7b337a2c5, not stripped
/tmp/base/kernel:ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=de04db27d4d136c96cba9e384c8bc9e7b337a2c5, stripped

root@:~ # ls -lais /boot/kernel/kernel /tmp/base/kernel
10156980 26371 -r-xr-xr-x  1 root wheel 27003712 Nov 10  2023
/boot/kernel/kernel
   6 23144 -r-xr-xr-x  1 root wheel 23643432 May 18 08:07 /tmp/base/kernel

*** 14.1-STABLE

root@:~ # uname -abiUK
FreeBSD  14.1-STABLE FreeBSD 14.1-STABLE stable/14-n267634-7b65987885da GENERIC
amd64 GENERIC 1401500 1401500 03870066df47c918b5678f89b12252aae1c3e94f

root@:~ # file /boot/kernel/kernel /tmp/base/kernel
/boot/kernel/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=03870066df47c918b5678f89b12252aae1c3e94f, not stripped
/tmp/base/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=03870066df47c918b5678f89b12252aae1c3e94f, stripped

root@:~ # ls -laish /boot/kernel/kernel /tmp/base/kernel
10163936 28434 -r--r--r--  1 root wheel   28M May  9 06:11 /boot/kernel/kernel
7 25200 -r--r--r--  1 root wheel   25M May 18 07:49 /tmp/base/kernel

-- 
You are receiving this mail because:
You are the assignee for the bug.