# MPU, Whether to modify xIsPrivileged() with FREERTOS\_SYSTEM\_CALL？？？

**URL:** <https://forums.freertos.org/t/mpu-whether-to-modify-xisprivileged-with-freertos-system-call/22071>\
**Category:** Kernel\
**Created:** [December 14, 2024, 7:34am UTC](https://forums.freertos.org/t/mpu-whether-to-modify-xisprivileged-with-freertos-system-call/22071 "2024-12-14T07:34:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zouxiangqian](https://avatars.discourse-cdn.com/v4/letter/z/3d9bf3/32.png) [@zouxiangqian](https://forums.freertos.org/u/zouxiangqian)\
**Post date:** [December 14, 2024, 7:34am UTC](https://forums.freertos.org/t/mpu-whether-to-modify-xisprivileged-with-freertos-system-call/22071/1 "2024-12-14T07:34:57Z")

</div>

I have a problem in FreeRTOS Kernel V10.5.1。I encountered an error when calling the function vTaskDelay in a non-privileged task. Then I added the FREERTOS\_SYSTEM\_CALL modifier to the xIsPrivileged function. I think that there will be an error because xIsPrivileged is default in the privileged area, I don’t know if my understanding is correct or if I misunderstood something. I look forward to your reply

---

<div class="post-metadata">

**Author:** ![karahulx](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/karahulx/32/4893_2.png) [@karahulx](https://forums.freertos.org/u/karahulx)\
**Post date:** [December 16, 2024, 3:42am UTC](https://forums.freertos.org/t/mpu-whether-to-modify-xisprivileged-with-freertos-system-call/22071/2 "2024-12-16T03:42:37Z")

</div>

Hi @zouxiangqian  
Welcome to the FreeRTOS Community Forums !  
When calling `vTaskDelay` from a non-privileged task, the MPU wrapper `MPU_vTaskDelay` being a `FREERTOS_SYSTEM_CALL` temporarily grants the unprivileged task which calls the kernel API the privilege necessary to execute kernel code. See [here](https://www.freertos.org/Security/02-Kernel-threat-model) for more info about system calls.

So, the error you encounter would not be resolved by making another system call through `xIsPrivileged`. You can make the function as `freertos_system_calls`, the error may occur in case there is overlap between the RAM regions during building the project.

Can you tell us what error you encountered during `vTaskDelay`  
Also the latest MPU version for FreeRTOS Kernel is[v11.1.0](https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/V11.1.0) with enhanced security features. If porting is possible, you can give this a try .

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [December 16, 2024, 6:26am UTC](https://forums.freertos.org/t/mpu-whether-to-modify-xisprivileged-with-freertos-system-call/22071/3 "2024-12-16T06:26:02Z")

</div>

> [@zouxiangqian](#):
>
> I encountered an error when calling the function vTaskDelay in a non-privileged task.

Please describe the error that you encountered.
