royzah opened a new pull request, #20403:
URL: https://github.com/apache/nuttx/pull/20403

   ## Why
   
   A user task picks the syscall number. ARM checked it, and the nesting depth, 
with `DEBUGASSERT` only, so a release build indexed past `g_stublookup`. arm64 
and risc-v tested `> SYS_maxsyscall`, letting `SYS_maxsyscall` itself through.
   
   ## How
   
   ARM: return `-ENOSYS` for a number out of range or a full nest. arm64, 
risc-v: `>=`.
   
   ## Tested
   
   i.MX93, kernel build, a user task calling `sys_call0(SYS_maxsyscall)`:
   
   | | result |
   | --- | --- |
   | before | kernel panic, jump to 0 |
   | after | `-ENOSYS` |
   
   ```
   dump_assert_info: Assertion failed panic: at file: common/arm64_fatal.c:678 
task(CPU1): tests process: tests 0xc0000d48
   up_dump_register: ELR:       0x0
   ```
   
   ARM and risc-v: built in CI.
   
   `tools/checkpatch.sh` clean.
   


-- 
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]

Reply via email to