Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 May 2024 08:15:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 279122] /boot/kernel/kernel: "not stripped"
Message-ID:  <bug-279122-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279122

            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: bugs@FreeBSD.org
          Reporter: egypcio@FreeBSD.org

I'm running stripped 'kernel' for quite a few years without ANY sort of iss=
ue.
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=20
  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-f9716eee8=
ab4:
Fri Nov 10 05:57:23 UTC 2023=20=20=20=20
root@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]=3Dde04db27d4d136c96cba9e384c8bc9e7b337a2c5, not stripped
/tmp/base/kernel:    ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=3Dde04db27d4d136c96cba9e384c8bc9e7b337a2c5, 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/ker=
nel

*** 14.1-STABLE

root@:~ # uname -abiUK
FreeBSD  14.1-STABLE FreeBSD 14.1-STABLE stable/14-n267634-7b65987885da GEN=
ERIC
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]=3D03870066df47c918b5678f89b12252aae1c3e94f, not stripped
/tmp/base/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /red/herring,
BuildID[sha1]=3D03870066df47c918b5678f89b12252aae1c3e94f, 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/ker=
nel
7 25200 -r--r--r--  1 root wheel   25M May 18 07:49 /tmp/base/kernel

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279122-227>