Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- ...ow-for-storing-caps-in-shared-memory.patch | 30 +++++++++++++++ .../linux/files/0003-defconfig-modify.patch | 38 +++++++++++++++++++ recipes-kernel/linux/linux-morello_%.bbappend | 6 +++ 3 files changed, 74 insertions(+) create mode 100644 recipes-kernel/linux/cheri-patches/0001-mman-allow-for-storing-caps-in-shared-memory.patch create mode 100644 recipes-kernel/linux/files/0003-defconfig-modify.patch create mode 100644 recipes-kernel/linux/linux-morello_%.bbappend
diff --git a/recipes-kernel/linux/cheri-patches/0001-mman-allow-for-storing-caps-in-shared-memory.patch b/recipes-kernel/linux/cheri-patches/0001-mman-allow-for-storing-caps-in-shared-memory.patch new file mode 100644 index 0000000..9a2d208 --- /dev/null +++ b/recipes-kernel/linux/cheri-patches/0001-mman-allow-for-storing-caps-in-shared-memory.patch @@ -0,0 +1,30 @@ +From c3c49bd74d4d0b8b30c25841ba1ccca3fd3fe6b5 Mon Sep 17 00:00:00 2001 +From: Pawel Zalewski pzalewski@thegoodpenguin.co.uk +Date: Thu, 20 Apr 2023 15:32:50 +0100 +Subject: [PATCH] mman: allow for storing caps in shared memory + +This is a temporary hack to keep the work with postgresql +going. It does require for sharing pointers in this way. + +Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk +--- + arch/arm64/include/asm/mman.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm64/include/asm/mman.h b/arch/arm64/include/asm/mman.h +index 39b1023ac9bc..ccea9fa3d3df 100644 +--- a/arch/arm64/include/asm/mman.h ++++ b/arch/arm64/include/asm/mman.h +@@ -44,7 +44,8 @@ static inline unsigned long arch_calc_vm_flag_bits(unsigned long flags) + * tags. Might need to explicitly allow or explicitly disallow certain + * filesystems. + */ +- if (system_supports_morello() && ((flags & MAP_TYPE) == 0x02 /* MAP_PRIVATE */)) ++ if (system_supports_morello() && ((flags & MAP_TYPE) == 0x02 ++ || (flags & MAP_TYPE) == 0x01 )) /* MAP_PRIVATE | MAP_SHARED */ + ret |= VM_READ_CAPS | VM_WRITE_CAPS; + + return ret; +-- +2.34.1 + diff --git a/recipes-kernel/linux/files/0003-defconfig-modify.patch b/recipes-kernel/linux/files/0003-defconfig-modify.patch new file mode 100644 index 0000000..7b81a05 --- /dev/null +++ b/recipes-kernel/linux/files/0003-defconfig-modify.patch @@ -0,0 +1,38 @@ +From 2c53215daa9c483f823a9313243347394f8c40ae Mon Sep 17 00:00:00 2001 +From: Pawel Zalewski pzalewski@thegoodpenguin.co.uk +Date: Mon, 24 Apr 2023 10:11:21 +0100 +Subject: [PATCH] defconfig: modify + +Add more debug. + +Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk +--- + arch/arm64/configs/morello_transitional_pcuabi_defconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm64/configs/morello_transitional_pcuabi_defconfig b/arch/arm64/configs/morello_transitional_pcuabi_defconfig +index 515e50ce58aa..d19bbe4d1790 100644 +--- a/arch/arm64/configs/morello_transitional_pcuabi_defconfig ++++ b/arch/arm64/configs/morello_transitional_pcuabi_defconfig +@@ -165,3 +165,18 @@ CONFIG_DEBUG_FS=y + # CONFIG_FTRACE is not set + CONFIG_CORESIGHT=y + CONFIG_MEMTEST=y ++ ++CONFIG_FTRACE=y ++CONFIG_BOOTTIME_TRACING=y ++CONFIG_FUNCTION_TRACER=y ++CONFIG_STACK_TRACER=y ++CONFIG_IRQSOFF_TRACER=y ++CONFIG_PREEMPT_TRACER=y ++CONFIG_SCHED_TRACER=y ++CONFIG_HWLAT_TRACER=y ++CONFIG_OSNOISE_TRACER=y ++CONFIG_TIMERLAT_TRACER=y ++CONFIG_ENABLE_DEFAULT_TRACERS=y ++CONFIG_FTRACE_SYSCALLS=y ++CONFIG_TRACER_SNAPSHOT=y ++CONFIG_DYNAMIC_DEBUG=y +-- +2.34.1 + diff --git a/recipes-kernel/linux/linux-morello_%.bbappend b/recipes-kernel/linux/linux-morello_%.bbappend new file mode 100644 index 0000000..9c0d986 --- /dev/null +++ b/recipes-kernel/linux/linux-morello_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}:${THISDIR}/cheri-patches:" + +SRC_URI += "\ + file://0001-mman-allow-for-storing-caps-in-shared-memory.patch \ + file://files/0003-defconfig-modify.patch \ + "