Added new variant kernel ( KCSAN, KFENCE )

i9-ispras-fuzzing
ebasov 1 week ago
parent 933e575d2b
commit 7488378151
Signed by: ebasov
GPG Key ID: 23356EDA24E5499D

@ -29,7 +29,7 @@ CONFIG_WERROR=y
CONFIG_UAPI_HEADER_TEST=y
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_BUILD_SALT="6.1.111-lvc4"
CONFIG_BUILD_SALT="6.1.124-lvc13"
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -29,7 +29,7 @@ CONFIG_WERROR=y
CONFIG_UAPI_HEADER_TEST=y
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_BUILD_SALT="6.1.111-lvc4"
CONFIG_BUILD_SALT="6.1.124-lvc13"
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y

@ -25,9 +25,13 @@
%ifarch x86_64
%define _kasan 1
%define _kmemleak 1
%define _kcsan 1
%define _kfence 1
%else
%define _kasan 0
%define _kmemleak 0
%define _kcsan 1
%define _kfence 1
%endif
# Define the version of the Linux Kernel Archive tarball.
@ -46,7 +50,7 @@
%endif
# Set pkg_release.
%global pkg_release 6%{?buildid}.%{?lvc}%{?dist}.inferit.fuzzing
%global pkg_release 7%{?buildid}.%{?lvc}%{?dist}.inferit.fuzzing
# Architectures upon which we can sign the kernel
# for secure boot authentication.
@ -239,6 +243,8 @@ Source2: config-%{version}-x86_64
Source4: config-%{version}-aarch64
Source6: config-%{version}-x86_64-kasan
Source10: config-%{version}-x86_64-kmemleak
Source12: config-%{version}-x86_64-kcsan
Source14: config-%{version}-x86_64-kfence
Source20: mod-denylist.sh
Source21: mod-sign.sh
@ -542,6 +548,17 @@ Package contains the Linux kernel with KASAN support.
%kernel_lt_variant_package kmemleak
%description kmemleak-core
Package contains the Linux kernel with KMEMLEAK support.
%define variant_summary The Linux kernel.
%kernel_lt_variant_package kcsan
%description kcsan-core
Package contains the Linux kernel with KCSAN support.
%define variant_summary The Linux kernel.
%kernel_lt_variant_package kfence
%description kfence-core
Package contains the Linux kernel with KFENCE support.
%endif
# Disable the building of the debug package(s).
@ -604,6 +621,8 @@ cp %{SOURCE2} config-%{version}-x86_64.config
cp %{SOURCE4} config-%{version}-aarch64.config
cp %{SOURCE6} config-%{version}-x86_64-kasan.config
cp %{SOURCE10} config-%{version}-x86_64-kmemleak.config
cp %{SOURCE12} config-%{version}-x86_64-kcsan.config
cp %{SOURCE14} config-%{version}-x86_64-kfence.config
cd ..
@ -617,6 +636,8 @@ declare -a config_files=(
"configs/config-%{version}-x86_64.config"
"configs/config-%{version}-x86_64-kasan.config"
"configs/config-%{version}-x86_64-kmemleak.config"
"configs/config-%{version}-x86_64-kcsan.config"
"configs/config-%{version}-x86_64-kfence.config"
)
%endif
@ -1061,6 +1082,16 @@ BuildKernel() {
%{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE26} kmemleak
fi
if [ "$Variant" = "kcsan" ]; then
# Identify modules in the kernel-rt-kvm package
%{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE26} kcsan
fi
if [ "$Variant" = "kfence" ]; then
# Identify modules in the kernel-rt-kvm package
%{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE26} kfence
fi
cp System.map $RPM_BUILD_ROOT/
pushd $RPM_BUILD_ROOT > /dev/null
@ -1204,6 +1235,14 @@ BuildKernel %make_target %kernel_image %{_use_vdso} kasan
BuildKernel %make_target %kernel_image %{_use_vdso} kmemleak
%endif
%ifarch x86_64
BuildKernel %make_target %kernel_image %{_use_vdso} kcsan
%endif
%ifarch x86_64
BuildKernel %make_target %kernel_image %{_use_vdso} kfence
%endif
%ifarch x86_64 aarch64
BuildKernel %make_target %kernel_image %{_use_vdso}
%endif
@ -1293,6 +1332,12 @@ if [ "%{signmodules}" -eq "1" ]; then \
if [ "%{_kmemleak}" -ne "0" ]; then \
%{SOURCE21} linux-%{version}-%{release}.%{_build_arch}-kmemleak/certs/signing_key.pem.sign+kmemleak linux-%{version}-%{release}.%{_build_arch}-kmemleak/certs/signing_key.x509.sign+kmemleak $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+kmemleak/ \
fi \
if [ "%{_kcsan}" -ne "0" ]; then \
%{SOURCE21} linux-%{version}-%{release}.%{_build_arch}-kcsan/certs/signing_key.pem.sign+kcsan linux-%{version}-%{release}.%{_build_arch}-kcsan/certs/signing_key.x509.sign+kcsan $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+kcsan/ \
fi \
if [ "%{_kfence}" -ne "0" ]; then \
%{SOURCE21} linux-%{version}-%{release}.%{_build_arch}-kfence/certs/signing_key.pem.sign+kfence linux-%{version}-%{release}.%{_build_arch}-kfence/certs/signing_key.x509.sign+kfence $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+kfence/ \
fi \
fi \
if [ "%{zipmodules}" -eq "1" ]; then \
find $RPM_BUILD_ROOT/lib/modules/ -name '*.ko' -type f | xargs --no-run-if-empty -P%{zcpu} xz \
@ -1554,6 +1599,11 @@ fi\
%kernel_lt_variant_preun kmemleak
%kernel_lt_variant_post -v kmemleak
%kernel_lt_variant_preun kcsan
%kernel_lt_variant_post -v kcsan
%kernel_lt_variant_preun kfence
%kernel_lt_variant_post -v kfence
%endif
if [ -x /sbin/ldconfig ]
@ -1716,9 +1766,14 @@ fi
%ifarch x86_64
%kernel_lt_variant_files %{_use_vdso} %{with_std} kasan
%kernel_lt_variant_files %{_use_vdso} %{with_std} kmemleak
%kernel_lt_variant_files %{_use_vdso} %{with_std} kcsan
%kernel_lt_variant_files %{_use_vdso} %{with_std} kfence
%endif
%changelog
* Wed Feb 19 2025 Eduard Basov <ebasov@msvsphere-os.ru> - 6.1.124-7.lvc13.inferit.fuzzing
- Added variant kernel ( KCSAN, KFENCE )
* Fri Feb 14 2025 Eduard Basov <ebasov@msvsphere-os.ru> - 6.1.124-6.lvc13.inferit.fuzzing
- Change config file's

Loading…
Cancel
Save