Swatantra-66 commented on code in PR #21140: URL: https://github.com/apache/nuttx/pull/21140#discussion_r4425778108
########## arch/arm/src/armv7-r/arm_syscall.c: ########## @@ -42,6 +43,22 @@ #include "sched/sched.h" #include "signal/signal.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* From user mode, the only reserved system call that is allowed is the + * return from a signal handler that the kernel dispatched. Without full + * signal support the kernel dispatches no handler, so none is allowed. + */ + +#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ENABLE_ALL_SIGNALS) +# define USER_SIGRETURN(tcb, cmd) \ + ((cmd) == SYS_signal_handler_return && (tcb)->xcp.sigreturn != 0) Review Comment: Updated, Renumbered SYS_signal_handler_return out of the reserved block by registering signal_handler_return in syscall_lookup.h and syscall.csv for ARM, reducing ARM's CONFIG_SYS_RESERVED from 8 to 7 Simplified unprivileged syscall checks across all ARM architectures to unconditionally reject cmd < CONFIG_SYS_RESERVED with -ENOSYS without special exceptions -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
