Skip to content

Commit 7d4ba0c

Browse files
author
Flavio Ceolin
committed
xtensa: userspace: Warning about impl security
Add a Kconfig option (and build warning) alerting about the problem of the kernel spilling register in behave of the userspace. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
1 parent c3ead7e commit 7d4ba0c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

arch/xtensa/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/arch/xtensa/arch.h)
44
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-xtensa-le)
55
add_subdirectory(core)
6+
7+
if (CONFIG_XTENSA_INSECURE_USERSPACE)
8+
message(WARNING "
9+
This userspace implementation uses the window ABI this means that the kernel
10+
will spill registers in behave of the userpsace. Use it carefully.")
11+
endif()

arch/xtensa/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ config XTENSA_SYSCALL_USE_HELPER
180180
This is a workaround for toolchains where they have
181181
issue modeling register usage.
182182

183+
config XTENSA_INSECURE_USERSPACE
184+
bool
185+
default y if USERSPACE
186+
depends on XTENSA_MMU
187+
183188
endif # CPU_HAS_MMU
184189

185190
endmenu

0 commit comments

Comments
 (0)