Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions resources/hiding_ci/build_and_install_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ confirm() {
}

apply_patch_file() {
echo "Applying patch:" $(basename $1)

git apply $1
}

Expand All @@ -75,6 +77,23 @@ apply_patch_or_series() {
esac
}

apply_all_patches() {
if [ ! -d "$1" ]; then
echo "Not a directory: $1"
return
fi

echo "Applying all patches in $1"

for f in $1/*; do
if [ -d $f ]; then
apply_all_patches $f
else
apply_patch_or_series $f
fi
done
}

check_new_config() {
if [[ -e "/boot/config-$KERNEL_VERSION" ]]; then
return 0;
Expand Down Expand Up @@ -156,10 +175,7 @@ git fetch --depth 1 origin $KERNEL_COMMIT_HASH
git checkout FETCH_HEAD

# Apply our patches on top
for PATCH in $KERNEL_PATCHES_DIR/*.*; do
echo "Applying patch:" $(basename $PATCH)
apply_patch_or_series $PATCH
done
apply_all_patches $KERNEL_PATCHES_DIR

echo "Making kernel config ready for build"
# We use olddefconfig to automatically pull in the
Expand Down
8 changes: 4 additions & 4 deletions resources/hiding_ci/linux_patches/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Linux kernel patches for direct map removal

The Linux kernel patches in this directory are distributed under the `GPL-2.0`
licence (see the full licence text at [GPL-2.0](./GPL-2.0)). The patches are
required by Firecracker's "Secret Freedom" feature that removes the VM memory
from the host direct map (see
The Linux kernel patches in this directory and its subdirectories are
distributed under the `GPL-2.0` licence (see the full licence text at
[GPL-2.0](./GPL-2.0)). The patches are required by Firecracker's "Secret
Freedom" feature that removes the VM memory from the host direct map (see
[lore](https://lore.kernel.org/kvm/[email protected]/)
for more details). The patches are not yet merged upstream.