Hardened linux: Difference between revisions

From Alpine Linux
(Created page with "== Developing linux-kernel with hardened patch == Make a custom linux kernel using this guide. Once you have setup the linux kernel from there, in your current directory ($WORK_DIR/aports/main/linux-lts), gather linux hardened patches via these two CLI commands (Replace "$VERSION" with the current latest version in the releases): {{cmd|# wget https://github.com/anthraxx/linux-hardened/releases/download/v$VERSION-hardened1/linux-hardened-v$VERSION-hard...")
 
mNo edit summary
Line 3: Line 3:
Make a custom linux kernel using [[Custom_Kernel|this guide]]. Once you have setup the linux kernel from there, in your current directory ($WORK_DIR/aports/main/linux-lts), gather linux hardened patches via these two CLI commands (Replace "$VERSION" with the current latest version in the releases):
Make a custom linux kernel using [[Custom_Kernel|this guide]]. Once you have setup the linux kernel from there, in your current directory ($WORK_DIR/aports/main/linux-lts), gather linux hardened patches via these two CLI commands (Replace "$VERSION" with the current latest version in the releases):


{{cmd|# wget https://github.com/anthraxx/linux-hardened/releases/download/v$VERSION-hardened1/linux-hardened-v$VERSION-hardened1.patch 0006-linux-hardened-v6.11.10-hardened1.patch}}
{{cmd|# wget https://github.com/anthraxx/linux-hardened/releases/download/v$VERSION-hardened1/linux-hardened-v$VERSION-hardened1.patch 0006-linux-hardened-v$VERSION-hardened1.patch}}
{{cmd|# wget https://github.com/anthraxx/linux-hardened/releases/download/v$VERSION-hardened1/linux-hardened-v$VERSION-hardened1.patch.sig 0007-linux-hardened-v6.11.10-hardened1.patch.sig}}
{{cmd|# wget https://github.com/anthraxx/linux-hardened/releases/download/v$VERSION-hardened1/linux-hardened-v$VERSION-hardened1.patch.sig 0007-linux-hardened-v$VERSION-hardened1.patch.sig}}


There is some need to remove "-hardened1" in the patch file (not the sig file):
There is some need to remove "-hardened1" in the patch file (not the sig file):

Revision as of 19:40, 7 December 2024

Developing linux-kernel with hardened patch

Make a custom linux kernel using this guide. Once you have setup the linux kernel from there, in your current directory ($WORK_DIR/aports/main/linux-lts), gather linux hardened patches via these two CLI commands (Replace "$VERSION" with the current latest version in the releases):

# wget https://github.com/anthraxx/linux-hardened/releases/download/v$VERSION-hardened1/linux-hardened-v$VERSION-hardened1.patch 0006-linux-hardened-v$VERSION-hardened1.patch

# wget https://github.com/anthraxx/linux-hardened/releases/download/v$VERSION-hardened1/linux-hardened-v$VERSION-hardened1.patch.sig 0007-linux-hardened-v$VERSION-hardened1.patch.sig

There is some need to remove "-hardened1" in the patch file (not the sig file):

{{{1}}}

{{{1}}}

You MUST remove the "EXTRAVERSION" naming ("-hardened1") after it, or compiling with the package "kernel-hooks" would not do anything, as this "extraversion" is not necessary. (Kernel-hooks apk package is necessary to make a secureboot EFISTUB.

Before compiling the kernel, in the Alpine Linux kernel guide, you must do some kernel module configurations, preferably shorten the amount of kernel modules in the KCONFIG files where possible, to reduce compilation times. You may borrow [KCONFIG] from linux-hardened as a base, for configuration simplicity sake. (Use the apk package "Kconfig-Hardened-Check" for configuring KCONFIG file as securely as possible.)

After applying this, you may do abuild -r to start compiling the kernel.

External Links:

Custom Kernel:

EFIStub:

Releases page:

Some resources for help creating this page:

Linux-Hardened KCONFIG file