Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
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
1 change: 1 addition & 0 deletions changelog/updates/2025-04-25-kernel-6.12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Linux ([6.12](https://lore.kernel.org/all/CAHk-=wgtGkHshfvaAe_O2ntnFBH3EprNk1juieLmjcF2HBwBgQ@mail.gmail.com/) (includes [6.12](https://kernelnewbies.org/Linux_6.12)))
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V FCOPY UIO daemon
ConditionPathExists=/sys/bus/vmbus/devices/eb765408-105f-49b6-b4aa-c123b64d17d4/uio

[Service]
ExecStart=/usr/bin/hv_fcopy_uio_daemon --no-daemon

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@ if [[ "${PV}" == 9999 ]]; then
fi

src_compile() {
# Build hv_vss_daemon, hv_kvp_daemon, hv_fcopy_daemon
# Build hv_vss_daemon, hv_kvp_daemon, hv_fcopy_daemon
kmake tools/hv
}

src_install() {
dobin "${S}/build/tools/hv/hv_fcopy_daemon"
dobin "${S}/build/tools/hv/hv_kvp_daemon"
dobin "${S}/build/tools/hv/hv_vss_daemon"

systemd_dounit "${FILESDIR}/hv_fcopy_daemon.service"
systemd_dounit "${FILESDIR}/hv_kvp_daemon.service"
systemd_dounit "${FILESDIR}/hv_vss_daemon.service"

systemd_enable_service "multi-user.target" "hv_fcopy_daemon.service"
systemd_enable_service "multi-user.target" "hv_kvp_daemon.service"
systemd_enable_service "multi-user.target" "hv_vss_daemon.service"
local -a HV_DAEMONS=(hv_vss_daemon hv_kvp_daemon hv_fcopy_daemon hv_fcopy_uio_daemon)
local HV_DAEMON
for HV_DAEMON in "$HV_DAEMONS[@]"
do
if [ -f "${S}/build/tools/hv/${HV_DAEMON}" ]; then
dobin "${S}/build/tools/hv/${HV_DAEMON}"
systemd_dounit "${FILESDIR}/${HV_DAEMON}.service"
systemd_enable_service "multi-user.target" "${HV_DAEMON}.service"
fi
done
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ CONFIG_ACPI_IPMI=m
CONFIG_ACPI_PCI_SLOT=y
CONFIG_ACPI_PROCESSOR_AGGREGATOR=y
CONFIG_AMD_IOMMU=y
CONFIG_AMD_IOMMU_V2=m
CONFIG_AQTION=m
CONFIG_ARCH_MEMORY_PROBE=y
CONFIG_AUTOFS_FS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ CONFIG_CRYPTO_SHA1_ARM64_CE=y
CONFIG_CRYPTO_SHA2_ARM64_CE=y
# CONFIG_DEBUG_PREEMPT is not set
CONFIG_DM_DEBUG=y
CONFIG_FB_ARMCLCD=y
CONFIG_GPIO_PL061=y
CONFIG_GPIO_XGENE=y
CONFIG_GPIO_XGENE_SB=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ CONFIG_DNS_RESOLVER=y
CONFIG_DRM=m
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_DST_CACHE=y
# CONFIG_DRM_FBDEV_EMULATION is not set
CONFIG_DUMMY=m
CONFIG_DYNAMIC_DEBUG=y
CONFIG_E100=m
Expand Down Expand Up @@ -496,6 +497,7 @@ CONFIG_MMC_BLOCK_MINORS=16
CONFIG_MMC_SDHCI=m
CONFIG_MMC_SDHCI_PCI=m
CONFIG_MODULES=y
CONFIG_MODULE_COMPRESS=y
CONFIG_MODULE_COMPRESS_XZ=y
CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_KEY="${MODULE_SIGNING_KEY_DIR}/certs/modules.pem"
Expand Down Expand Up @@ -600,7 +602,6 @@ CONFIG_NET_ACT_CTINFO=m
CONFIG_NET_ACT_GACT=m
CONFIG_NET_ACT_GATE=m
CONFIG_NET_ACT_IFE=m
CONFIG_NET_ACT_IPT=m
CONFIG_NET_ACT_MIRRED=m
CONFIG_NET_ACT_MPLS=m
CONFIG_NET_ACT_NAT=m
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DIST linux-6.6.tar.xz 140064536 BLAKE2B 5f02fd8696d42f7ec8c5fbadec8e7270bdcfcb1f9844a6c4db3e1fd461c93ce1ccda650ca72dceb4890ebcbbf768ba8fba0bce91efc49fbd2c307b04e95665f2 SHA512 458b2c34d46206f9b4ccbac54cc57aeca1eaecaf831bc441e59701bac6eadffc17f6ce24af6eadd0454964e843186539ac0d63295ad2cc32d112b60360c39a35
DIST patch-6.6.89.xz 4243548 BLAKE2B a4cf3341e453548a9369ed19fbe07deca183bd5786790161e68bb28340925b351d9046bd8db6fe85836ddff5b82facc85c4fc4fab0e73d2e5837c35672b982f7 SHA512 0642eb456df63bd4f3ab501ca93792e80e6807eef5e8b4dae8bd8a75c3e58397104828c8320994244ab03a62b7f46fa3c476ca8ac42ed7d8f6c8290b5ec6c560
DIST linux-6.12.tar.xz 147906904 BLAKE2B b2ec2fc69218cacabbbe49f78384a5d259ca581b717617c12b000b16f4a4c59ee348ea886b37147f5f70fb9a7a01c1e2c8f19021078f6b23f5bc62d1c48d5e5e SHA512 a37b1823df7b4f72542f689b65882634740ba0401a42fdcf6601d9efd2e132e5a7650e70450ba76f6cd1f13ca31180f2ccee9d54fe4df89bc0000ade4380a548
DIST patch-6.12.20.xz 1432116 BLAKE2B cc42fce6584baa82dcf513e62433a61b8d90562648f64d7795e58ec3de0c5449b3685e05a0cb0f9c46b08faa7edf6d6b7edd3520fbc1fabbbb5b8fba2d528299 SHA512 a1568d4233d900f95fa4394147acdc37498582b050fd6a111506f680636b50b6725bf99d76f4f3613d5af5e50d3e46929d718dae3a59f2174ff53477bef83825
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ IUSE=""
# local patches overlap with the upstream patch.
UNIPATCH_LIST="
${PATCH_DIR}/z0001-kbuild-derive-relative-path-for-srctree-from-CURDIR.patch \
${PATCH_DIR}/z0002-revert-pahole-flags.patch \
${PATCH_DIR}/z0002-pahole-support-reproducible-builds.patch \
${PATCH_DIR}/z0003-Revert-x86-boot-Remove-the-bugger-off-message.patch \
${PATCH_DIR}/z0004-efi-Add-an-EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch \
${PATCH_DIR}/z0005-efi-Lock-down-the-kernel-if-booted-in-secure-boot-mo.patch \
${PATCH_DIR}/z0006-mtd-phram-slram-Disable-when-the-kernel-is-locked-do.patch \
${PATCH_DIR}/z0007-arm64-add-kernel-config-option-to-lock-down-when-in-.patch \
${PATCH_DIR}/z0004-efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch \
${PATCH_DIR}/z0005-efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch \
${PATCH_DIR}/z0006-mtd-disable-slram-and-phram-when-locked-down.patch \
${PATCH_DIR}/z0007-arm64-add-kernel-config-option-to-lock-down-when.patch \
${PATCH_DIR}/z0008-tools-hv-fix-cross-compilation-for-ARM64.patch \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 9faff3734e6456e7927c0914829a4764ec9f1b44 Mon Sep 17 00:00:00 2001
From: Adrian Vladu <avladu@cloudbasesolutions.com>
Date: Tue, 17 Sep 2024 13:44:14 +0000
Subject: [PATCH] pahole: support reproducible builds

---
scripts/Makefile.btf | 3 +++
1 file changed, 3 insertions(+)

diff --git a/scripts/Makefile.btf b/scripts/Makefile.btf
index 2d6e5ed9081e..b2f88b0fcf37 100644
--- a/scripts/Makefile.btf
+++ b/scripts/Makefile.btf
@@ -23,6 +23,9 @@ else
# Switch to using --btf_features for v1.26 and later.
pahole-flags-$(call test-ge, $(pahole-ver), 126) = -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func

+# Support reproducible builds.
+pahole-flags-$(call test-ge, $(pahole-ver), 127) = -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,reproducible_build
+
endif

pahole-flags-$(CONFIG_PAHOLE_HAS_LANG_EXCLUDE) += --lang_exclude=rust
--
2.34.1

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
From 1e2ffbec195c89d887bc088691ebb19c9173ecad Mon Sep 17 00:00:00 2001
From: David Howells <dhowells@redhat.com>
Date: Mon, 18 Feb 2019 12:45:03 +0000
Subject: [PATCH 1/4] efi: Add an EFI_SECURE_BOOT flag to indicate secure boot
mode
Subject: [28/30] efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode
Origin: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit?id=a5d70c55c603233c192b375f72116a395909da28

UEFI machines can be booted in Secure Boot mode. Add an EFI_SECURE_BOOT
flag that can be passed to efi_enabled() to find out whether secure boot is
Expand All @@ -26,15 +25,13 @@ cc: linux-efi@vger.kernel.org
arch/x86/kernel/setup.c | 14 +----------
drivers/firmware/efi/Makefile | 1 +
drivers/firmware/efi/secureboot.c | 39 +++++++++++++++++++++++++++++++
include/linux/efi.h | 17 ++++++++------
4 files changed, 51 insertions(+), 20 deletions(-)
include/linux/efi.h | 16 ++++++++-----
4 files changed, 51 insertions(+), 19 deletions(-)
create mode 100644 drivers/firmware/efi/secureboot.c

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index eb129277dcdd..7c4a6697e39d 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1190,19 +1190,7 @@ void __init setup_arch(char **cmdline_p)
@@ -1193,19 +1193,7 @@ void __init setup_arch(char **cmdline_p)
/* Allocate bigger log buffer */
setup_log_buf(1);

Expand All @@ -55,21 +52,16 @@ index eb129277dcdd..7c4a6697e39d 100644

reserve_initrd();

diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index e489fefd23da..f2dfae764fb5 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -25,6 +25,7 @@ subdir-$(CONFIG_EFI_STUB) += libstub
@@ -25,6 +25,7 @@ obj-$(CONFIG_EFI_FAKE_MEMMAP) += fake_m
obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o
obj-$(CONFIG_EFI_TEST) += test/
obj-$(CONFIG_EFI_DEV_PATH_PARSER) += dev-path-parser.o
+obj-$(CONFIG_EFI) += secureboot.o
obj-$(CONFIG_APPLE_PROPERTIES) += apple-properties.o
obj-$(CONFIG_EFI_RCI2_TABLE) += rci2-table.o
obj-$(CONFIG_EFI_EMBEDDED_FIRMWARE) += embedded-firmware.o
diff --git a/drivers/firmware/efi/secureboot.c b/drivers/firmware/efi/secureboot.c
new file mode 100644
index 000000000000..b6620669e32b
--- /dev/null
+++ b/drivers/firmware/efi/secureboot.c
@@ -0,0 +1,39 @@
Expand Down Expand Up @@ -112,11 +104,9 @@ index 000000000000..b6620669e32b
+ }
+ }
+}
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 80b21d1c6eaf..d267ddba8369 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -871,6 +871,14 @@ extern int __init efi_setup_pcdp_console(char *);
@@ -871,6 +871,14 @@ extern int __init efi_setup_pcdp_console
#define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */
#define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */
#define EFI_PRESERVE_BS_REGIONS 12 /* Are EFI boot-services memory segments available? */
Expand All @@ -131,23 +121,23 @@ index 80b21d1c6eaf..d267ddba8369 100644

#ifdef CONFIG_EFI
/*
@@ -895,6 +903,7 @@ static inline bool efi_rt_services_supported(unsigned int mask)
@@ -895,6 +903,7 @@ static inline bool efi_rt_services_suppo
return (efi.runtime_supported_mask & mask) == mask;
}
extern void efi_find_mirror(void);
+extern void __init efi_set_secure_boot(enum efi_secureboot_mode mode);
#else
static inline bool efi_enabled(int feature)
{
@@ -914,6 +923,7 @@ static inline bool efi_rt_services_supported(unsigned int mask)
@@ -914,6 +923,7 @@ static inline bool efi_rt_services_suppo
}

static inline void efi_find_mirror(void) {}
+static inline void efi_set_secure_boot(enum efi_secureboot_mode mode) {}
#endif

extern int efi_status_to_err(efi_status_t status);
@@ -1133,13 +1143,6 @@ static inline bool efi_runtime_disabled(void) { return true; }
@@ -1133,13 +1143,6 @@ static inline bool efi_runtime_disabled(
extern void efi_call_virt_check_flags(unsigned long flags, const void *caller);
extern unsigned long efi_call_virt_save_flags(void);

Expand All @@ -161,6 +151,3 @@ index 80b21d1c6eaf..d267ddba8369 100644
static inline
enum efi_secureboot_mode efi_get_secureboot_mode(efi_get_variable_t *get_var)
{
--
2.39.2

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
From fa96a2ef86466da0a43756ee39ce3b1cb555a55a Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 10 Sep 2019 11:54:28 +0100
Subject: [PATCH 2/4] efi: Lock down the kernel if booted in secure boot mode
Subject: efi: Lock down the kernel if booted in secure boot mode

Based on an earlier patch by David Howells, who wrote the following
description:
Expand All @@ -18,18 +17,16 @@ help text for LOCK_DOWN_IN_EFI_SECURE_BOOT was adjusted to mention that
lockdown is triggered in integrity mode (https://bugs.debian.org/1025417)]
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
---
arch/x86/kernel/setup.c | 4 ++--
drivers/firmware/efi/secureboot.c | 5 +++++
include/linux/security.h | 6 ++++++
security/lockdown/Kconfig | 15 +++++++++++++++
security/lockdown/lockdown.c | 2 +-
5 files changed, 29 insertions(+), 3 deletions(-)
arch/x86/kernel/setup.c | 4 ++--
drivers/firmware/efi/secureboot.c | 3 +++
include/linux/security.h | 6 ++++++
security/lockdown/Kconfig | 15 +++++++++++++++
security/lockdown/lockdown.c | 2 +-
5 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 7c4a6697e39d..04e73973098e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1028,6 +1028,8 @@ void __init setup_arch(char **cmdline_p)
@@ -904,6 +904,8 @@ void __init setup_arch(char **cmdline_p)
if (efi_enabled(EFI_BOOT))
efi_init();

Expand All @@ -38,7 +35,7 @@ index 7c4a6697e39d..04e73973098e 100644
reserve_ibft_region();
x86_init.resources.dmi_setup();

@@ -1190,8 +1192,6 @@ void __init setup_arch(char **cmdline_p)
@@ -1070,8 +1072,6 @@ void __init setup_arch(char **cmdline_p)
/* Allocate bigger log buffer */
setup_log_buf(1);

Expand All @@ -47,8 +44,6 @@ index 7c4a6697e39d..04e73973098e 100644
reserve_initrd();

acpi_table_upgrade();
diff --git a/drivers/firmware/efi/secureboot.c b/drivers/firmware/efi/secureboot.c
index b6620669e32b..8f2554291fb1 100644
--- a/drivers/firmware/efi/secureboot.c
+++ b/drivers/firmware/efi/secureboot.c
@@ -15,6 +15,7 @@
Expand All @@ -59,7 +54,7 @@ index b6620669e32b..8f2554291fb1 100644

/*
* Decide what to do when UEFI secure boot mode is enabled.
@@ -28,6 +29,10 @@ void __init efi_set_secure_boot(enum efi_secureboot_mode mode)
@@ -28,6 +29,10 @@ void __init efi_set_secure_boot(enum efi
break;
case efi_secureboot_mode_enabled:
set_bit(EFI_SECURE_BOOT, &efi.flags);
Expand All @@ -70,19 +65,17 @@ index b6620669e32b..8f2554291fb1 100644
pr_info("Secure boot enabled\n");
break;
default:
diff --git a/include/linux/security.h b/include/linux/security.h
index 4bd0f6fc553e..08258ecbb5f9 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -486,6 +486,7 @@ int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen);
@@ -522,6 +522,7 @@ int security_inode_notifysecctx(struct i
int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen);
int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen);
int security_locked_down(enum lockdown_reason what);
+int lock_kernel_down(const char *where, enum lockdown_reason level);
#else /* CONFIG_SECURITY */

static inline int call_blocking_lsm_notifier(enum lsm_event event, void *data)
@@ -1404,6 +1405,11 @@ static inline int security_locked_down(enum lockdown_reason what)
int lsm_fill_user_ctx(struct lsm_ctx __user *uctx, u32 *uctx_len,
void *val, size_t val_len, u64 id, u64 flags);
int security_bdev_alloc(struct block_device *bdev);
@@ -1504,6 +1505,11 @@ static inline int security_locked_down(e
{
return 0;
}
Expand All @@ -91,14 +84,12 @@ index 4bd0f6fc553e..08258ecbb5f9 100644
+{
+ return -EOPNOTSUPP;
+}
#endif /* CONFIG_SECURITY */

#if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE)
diff --git a/security/lockdown/Kconfig b/security/lockdown/Kconfig
index e84ddf484010..4175b50b1e6e 100644
static inline int lsm_fill_user_ctx(struct lsm_ctx __user *uctx,
u32 *uctx_len, void *val, size_t val_len,
u64 id, u64 flags)
--- a/security/lockdown/Kconfig
+++ b/security/lockdown/Kconfig
@@ -45,3 +45,18 @@ config LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY
@@ -45,3 +45,18 @@ config LOCK_DOWN_KERNEL_FORCE_CONFIDENTI
disabled.

endchoice
Expand All @@ -117,11 +108,9 @@ index e84ddf484010..4175b50b1e6e 100644
+
+ Enabling this option results in kernel lockdown being
+ triggered in integrity mode if EFI Secure Boot is set.
diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c
index 68d19632aeb7..67cc9839952f 100644
--- a/security/lockdown/lockdown.c
+++ b/security/lockdown/lockdown.c
@@ -23,7 +23,7 @@ static const enum lockdown_reason lockdown_levels[] = {LOCKDOWN_NONE,
@@ -24,7 +24,7 @@ static const enum lockdown_reason lockdo
/*
* Put the kernel into lock-down mode.
*/
Expand All @@ -130,6 +119,3 @@ index 68d19632aeb7..67cc9839952f 100644
{
if (kernel_locked_down >= level)
return -EPERM;
--
2.39.2

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bb8912cf807feab56cf8e924d33229d800ae71a6 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 30 Aug 2019 15:54:24 +0100
Subject: [PATCH 3/4] mtd: phram,slram: Disable when the kernel is locked down
Subject: mtd: phram,slram: Disable when the kernel is locked down
Forwarded: https://lore.kernel.org/linux-security-module/20190830154720.eekfjt6c4jzvlbfz@decadent.org.uk/

These drivers allow mapping arbitrary memory ranges as MTD devices.
This should be disabled to preserve the kernel's integrity when it is
Expand All @@ -21,11 +21,9 @@ Cc: linux-mtd@lists.infradead.org
drivers/mtd/devices/slram.c | 9 ++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 208bd4d871f4..30f84a91692d 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -364,7 +364,11 @@ static int phram_param_call(const char *val, const struct kernel_param *kp)
@@ -364,7 +364,11 @@ static int phram_param_call(const char *
#endif
}

Expand All @@ -38,8 +36,6 @@ index 208bd4d871f4..30f84a91692d 100644
MODULE_PARM_DESC(phram, "Memory region to map. \"phram=<name>,<start>,<length>[,<erasesize>]\"");

#ifdef CONFIG_OF
diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
index 28131a127d06..d92a2461e2ce 100644
--- a/drivers/mtd/devices/slram.c
+++ b/drivers/mtd/devices/slram.c
@@ -43,6 +43,7 @@
Expand Down Expand Up @@ -77,6 +73,3 @@ index 28131a127d06..d92a2461e2ce 100644
while (map) {
devname = devstart = devlength = NULL;

--
2.39.2

Loading