lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <J8ZEKS.JKAFCY4LP2XL1@wilbur.space>
Date: Thu, 26 Sep 2024 09:48:28 +0000
From: "Jonathan M. Wilbur" <jonathan@...bur.space>
To: linux-kernel@...r.kernel.org
Subject: Skip building vDSO entirely

Hello,

I am trying to build the Linux kernel with as minimal tooling as
possible. To give you an idea, I am writing binaries like "bc" that are
hard-coded to do only what their invocation in the Linux kernel build
steps require and nothing more, and I plan to do something similar for
"ld" in the form of a single-file C program that can perform the
absolutely minimal linking needed to build the kernel.

Based on my research, it looks like not a whole lot is actually needed
from the linker. I believe a minimal kernel should be able to be built
using static linking with few special flags, if any. However, the one
big barnacle in all this is that vDSO is a shared library and seems to
require a lot of shared-object functionality from ld. If vDSO could be
omitted from the build, it would cut down on the code footprint needed
to build the Linux kernel significantly. I tried setting CONFIG_VDSO to
"n" and CONFIG_HAVE_GENERIC_VDSO to "n" and neither of these resulted
in the vDSO shared object's omission from the build. I even ran an
"allnoconfig" build of the Linux kernel, and I see that the vDSO shared
object is still getting linked. Eventually, I ended up modifying the
Makefiles only to find that I got linker errors ("undefined reference").

I wanted to ask (1) if I am doing something wrong and there actually is
a way to skip vDSO (on x86 / x86-64), and (2) whether for some
technical reason, vDSO absolutely must be built, even if this feature
is not made available to userspace.

Thank you in advance,

- Jonathan M. Wilbur





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ