|
Zephyr Project API
3.1.0
A Scalable Open Source RTOS
|
Functions | |
| K_THREAD_STACK_DEFINE (child_stack,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) | |
| K_THREAD_STACK_DEFINE (extra_stack,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) | |
| K_SEM_DEFINE (kobject_sem,(0),(10)) | |
| K_SEM_DEFINE (kobject_public_sem,(0),(10)) | |
| K_MUTEX_DEFINE (kobject_mutex) | |
| static void | kobject_access_grant_user_part (void *p1, void *p2, void *p3) |
| void | test_kobject_access_grant (void) |
| Test access to a invalid semaphore who's address is NULL. More... | |
| void | test_kobject_access_grant_error (void) |
| Test grant access of given NULL kobject. More... | |
| void | test_kobject_access_grant_error_user (void) |
| Test grant access of given NULL thread in usermode. More... | |
| void | test_kobject_access_grant_error_user_null (void) |
| Test grant access of given NULL kobject in usermode. More... | |
| void | test_kobject_access_all_grant_error (void) |
| Test grant access to all the kobject for thread. More... | |
| static void | syscall_invalid_kobject_user_part (void *p1, void *p2, void *p3) |
| void | test_syscall_invalid_kobject (void) |
| Test syscall can take a different type of kobject. More... | |
| static void | thread_without_kobject_permission_user_part (void *p1, void *p2, void *p3) |
| void | test_thread_without_kobject_permission (void) |
| Test user thread can access a k_object without grant. More... | |
| static void | kobject_revoke_access_user_part (void *p1, void *p2, void *p3) |
| void | test_kobject_revoke_access (void) |
| Test access revoke. More... | |
| static void | kobject_grant_access_child_entry (void *p1, void *p2, void *p3) |
| static void | kobject_grant_access_extra_entry (void *p1, void *p2, void *p3) |
| void | test_kobject_grant_access_kobj (void) |
| Test access revoke. More... | |
| static void | grant_access_kobj_invalid_child (void *p1, void *p2, void *p3) |
| void | test_kobject_grant_access_kobj_invalid (void) |
| Test access grant between threads. More... | |
| static void | release_from_user_child (void *p1, void *p2, void *p3) |
| void | test_kobject_release_from_user (void) |
| Test revoke permission of a k_object from userspace. More... | |
| void | test_kobject_invalid (void) |
| Test release and access grant an invalid kobject. More... | |
| static void | access_all_grant_child_give (void *p1, void *p2, void *p3) |
| static void | access_all_grant_child_take (void *p1, void *p2, void *p3) |
| void | test_kobject_access_all_grant (void) |
| Test supervisor thread grants kernel objects all access public status. More... | |
| static void | residual_permissions_child_success (void *p1, void *p2, void *p3) |
| static void | residual_permissions_child_fail (void *p1, void *p2, void *p3) |
| void | test_thread_has_residual_permissions (void) |
| Test access permission of a terminated thread. More... | |
| void | test_kobject_access_grant_to_invalid_thread (void) |
| Test grant access to a valid kobject but invalid thread id. More... | |
| void | test_kobject_access_invalid_kobject (void) |
| Object validation checks. More... | |
| void | test_access_kobject_without_init_access (void) |
| Object validation checks without init access. More... | |
| static void | without_init_with_access_child (void *p1, void *p2, void *p3) |
| void | test_access_kobject_without_init_with_access (void) |
| Test syscall on a kobject which is not initialized and has access. More... | |
| static void | reinitialize_thread_kobj_extra (void *p1, void *p2, void *p3) |
| static void | reinitialize_thread_kobj_child (void *p1, void *p2, void *p3) |
| void | test_kobject_reinitialize_thread_kobj (void) |
| Test to reinitialize the k_thread object. More... | |
| static void | new_thread_from_user_extra (void *p1, void *p2, void *p3) |
| static void | new_thread_from_user_child (void *p1, void *p2, void *p3) |
| void | test_create_new_thread_from_user (void) |
| Test thread create from a user thread and check permissions. More... | |
| static void | new_thrd_from_user_with_in_use_stack (void *p1, void *p2, void *p3) |
| static void | new_user_thrd_child_with_in_use_stack (void *p1, void *p2, void *p3) |
| void | test_new_user_thread_with_in_use_stack_obj (void) |
| Test create new user thread from a user thread with in-use stack obj. More... | |
| static void | from_user_no_access_stack_extra_entry (void *p1, void *p2, void *p3) |
| static void | from_user_no_access_stack_child_entry (void *p1, void *p2, void *p3) |
| void | test_create_new_thread_from_user_no_access_stack (void) |
| Test creates new thread from usermode without stack access. More... | |
| static void | from_user_invalid_stacksize_extra (void *p1, void *p2, void *p3) |
| static void | from_user_invalid_stacksize_child (void *p1, void *p2, void *p3) |
| void | test_create_new_thread_from_user_invalid_stacksize (void) |
| Test to validate user thread spawning with stack overflow. More... | |
| static void | user_huge_stacksize_extra (void *p1, void *p2, void *p3) |
| static void | user_huge_stacksize_child (void *p1, void *p2, void *p3) |
| void | test_create_new_thread_from_user_huge_stacksize (void) |
| Test to check stack overflow from user thread. More... | |
| static void | supervisor_from_user_extra (void *p1, void *p2, void *p3) |
| static void | supervisor_from_user_child (void *p1, void *p2, void *p3) |
| void | test_create_new_supervisor_thread_from_user (void) |
| Test to create a new supervisor thread from user. More... | |
| static void | essential_thread_from_user_extra (void *p1, void *p2, void *p3) |
| static void | essential_thread_from_user_child (void *p1, void *p2, void *p3) |
| void | test_create_new_essential_thread_from_user (void) |
| Create a new essential thread from user. More... | |
| static void | higher_prio_from_user_extra (void *p1, void *p2, void *p3) |
| static void | higher_prio_from_user_child (void *p1, void *p2, void *p3) |
| void | test_create_new_higher_prio_thread_from_user (void) |
| Thread creation with priority is higher than current thread. More... | |
| static void | invalid_prio_from_user_extra (void *p1, void *p2, void *p3) |
| static void | invalid_prio_from_user_child (void *p1, void *p2, void *p3) |
| void | test_create_new_invalid_prio_thread_from_user (void) |
| Create a new thread whose priority is invalid. More... | |
| static void | thread_stack_init_objects (void *p1, void *p2, void *p3) |
| void | test_mark_thread_exit_uninitialized (void) |
| Test when thread exits, kernel marks stack objects uninitialized. More... | |
| static void | tThread_object_free_error (void *p1, void *p2, void *p3) |
| void | test_kobject_free_error (void) |
| Test free an invalid kernel object. More... | |
| void | test_kobject_init_error (void) |
| Test alloc an invalid kernel object. More... | |
| void | test_kobj_create_out_of_memory (void) |
| Test kernel object until out of memory. More... | |
| void | test_thread_alloc_out_of_idx (void) |
| void | test_alloc_kobjects (void) |
| Test kernel object allocation. More... | |
| static void | entry_error_perm (void *p1, void *p2, void *p3) |
| void | test_kobject_perm_error (void) |
| Test grant access failed in user mode. More... | |
| const char * | otype_to_str (enum k_objects otype) |
| void | test_all_kobjects_str (void) |
| Test get all kernel object list. More... | |
Variables | |
| struct k_thread | child_thread |
| struct k_thread | extra_thread |
| struct k_sem * | random_sem_type |
| struct k_sem | kobject_sem_not_hash_table |
| struct k_sem | kobject_sem_no_init_no_access |
| struct k_sem | kobject_sem_no_init_access |
| struct k_mem_slab | ms |
| struct k_msgq | mq |
| struct k_mutex | mutex |
| struct k_pipe | p |
| struct k_queue | q |
| struct k_poll_signal | ps |
| struct k_sem | sem |
| struct k_stack | s |
| struct k_thread | t |
| struct k_timer | timer |
| struct z_thread_stack_element | zs |
| struct k_futex | f |
| struct k_condvar | c |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| K_MUTEX_DEFINE | ( | kobject_mutex | ) |
| K_SEM_DEFINE | ( | kobject_public_sem | , |
| (0) | , | ||
| (10) | |||
| ) |
| K_SEM_DEFINE | ( | kobject_sem | , |
| (0) | , | ||
| (10) | |||
| ) |
| K_THREAD_STACK_DEFINE | ( | child_stack | , |
| (512+CONFIG_TEST_EXTRA_STACK_SIZE) | |||
| ) |
| K_THREAD_STACK_DEFINE | ( | extra_stack | , |
| (512+CONFIG_TEST_EXTRA_STACK_SIZE) | |||
| ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| const char * otype_to_str | ( | enum k_objects | otype | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void test_access_kobject_without_init_access | ( | void | ) |
Object validation checks without init access.
Test syscall on a kobject which is not initialized and has no access
| void test_access_kobject_without_init_with_access | ( | void | ) |
Test syscall on a kobject which is not initialized and has access.
| void test_all_kobjects_str | ( | void | ) |
Test get all kernel object list.
Get all of the kernel object in kobject list.
| void test_alloc_kobjects | ( | void | ) |
Test kernel object allocation.
Allocate all kinds of kernel object and do permission operation functions.
| void test_create_new_essential_thread_from_user | ( | void | ) |
Create a new essential thread from user.
| void test_create_new_higher_prio_thread_from_user | ( | void | ) |
Thread creation with priority is higher than current thread.
_handler_k_thread_create validation.
| void test_create_new_invalid_prio_thread_from_user | ( | void | ) |
Create a new thread whose priority is invalid.
_handler_k_thread_create validation.
| void test_create_new_supervisor_thread_from_user | ( | void | ) |
Test to create a new supervisor thread from user.
The system kernel must prevent user threads from creating supervisor threads.
| void test_create_new_thread_from_user | ( | void | ) |
Test thread create from a user thread and check permissions.
| void test_create_new_thread_from_user_huge_stacksize | ( | void | ) |
Test to check stack overflow from user thread.
Create a new thread from user and use a stack bigger than allowed size. This is_handler_k_thread_create validation.
| void test_create_new_thread_from_user_invalid_stacksize | ( | void | ) |
Test to validate user thread spawning with stack overflow.
Create a new thread from user and use a huge stack size which overflows. This is _handler_k_thread_create validation.
| void test_create_new_thread_from_user_no_access_stack | ( | void | ) |
Test creates new thread from usermode without stack access.
Create a new thread from user and the user doesn't have access to the stack region of new thread. _handler_k_thread_create validation.
| void test_kobj_create_out_of_memory | ( | void | ) |
Test kernel object until out of memory.
Create a dynamic kernel object repeatedly until run out of all heap memory, an expected out of memory error generated.
| void test_kobject_access_all_grant | ( | void | ) |
Test supervisor thread grants kernel objects all access public status.
System makes kernel object kobject_public_sem public to all threads Test the access to that kernel object by creating two new user threads.
| void test_kobject_access_all_grant_error | ( | void | ) |
Test grant access to all the kobject for thread.
Call function with a NULL parameter, an expected fault happened.
| void test_kobject_access_grant | ( | void | ) |
Test access to a invalid semaphore who's address is NULL.
| void test_kobject_access_grant_error | ( | void | ) |
Test grant access of given NULL kobject.
Call function with a NULL parameter in supervisor mode, nothing happened.
| void test_kobject_access_grant_error_user | ( | void | ) |
Test grant access of given NULL thread in usermode.
Call function with NULL parameter, an expected fault happened.
| void test_kobject_access_grant_error_user_null | ( | void | ) |
Test grant access of given NULL kobject in usermode.
Call function with a NULL parameter, an expected fault happened.
| void test_kobject_access_grant_to_invalid_thread | ( | void | ) |
Test grant access to a valid kobject but invalid thread id.
| void test_kobject_access_invalid_kobject | ( | void | ) |
Object validation checks.
Test syscall on a kobject which is not present in the hash table.
| void test_kobject_free_error | ( | void | ) |
Test free an invalid kernel object.
Spawn a thread free a NULL, an expected fault happened.
| void test_kobject_grant_access_kobj | ( | void | ) |
Test access revoke.
| void test_kobject_grant_access_kobj_invalid | ( | void | ) |
Test access grant between threads.
Test access grant to thread B from thread A which doesn't have required permissions.
| void test_kobject_init_error | ( | void | ) |
Test alloc an invalid kernel object.
Allocate invalid kernel objects, then no allocation will be returned.
| void test_kobject_invalid | ( | void | ) |
Test release and access grant an invalid kobject.
Validate release and access grant an invalid kernel object.
| void test_kobject_perm_error | ( | void | ) |
Test grant access failed in user mode.
Before grant access of static kobject to user thread, any grant access to this thread, will trigger an expected thread permission error.
| void test_kobject_reinitialize_thread_kobj | ( | void | ) |
Test to reinitialize the k_thread object.
| void test_kobject_release_from_user | ( | void | ) |
Test revoke permission of a k_object from userspace.
| void test_kobject_revoke_access | ( | void | ) |
Test access revoke.
| void test_mark_thread_exit_uninitialized | ( | void | ) |
Test when thread exits, kernel marks stack objects uninitialized.
When thread exits, the kernel upon thread exit, should mark the exiting thread and thread stack object as uninitialized
| void test_new_user_thread_with_in_use_stack_obj | ( | void | ) |
Test create new user thread from a user thread with in-use stack obj.
The kernel must prevent new user threads to use initialized (in-use) stack objects. In that case extra_thread is going to be create with in-use stack object child_stack. That will generate error, showing that kernel memory protection is working correctly.
| void test_syscall_invalid_kobject | ( | void | ) |
Test syscall can take a different type of kobject.
Test syscall can take a different type of kobject and syscall will generate fatal error if check fails.
| void test_thread_alloc_out_of_idx | ( | void | ) |
| void test_thread_has_residual_permissions | ( | void | ) |
Test access permission of a terminated thread.
If a deleted thread with some permissions is recreated with the same tid, check if it still has the permissions.
| void test_thread_without_kobject_permission | ( | void | ) |
Test user thread can access a k_object without grant.
The kernel will fail system call on kernel object that tracks thread permissions, on thread that don't have permission granted on the object.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| struct k_condvar c |
| struct k_thread child_thread |
| struct k_thread extra_thread |
| struct k_futex f |
| struct k_sem kobject_sem_no_init_access |
| struct k_sem kobject_sem_no_init_no_access |
| struct k_sem kobject_sem_not_hash_table |
| struct k_msgq mq |
| struct k_mem_slab ms |
| struct k_mutex mutex |
| struct k_pipe p |
| struct k_poll_signal ps |
| struct k_queue q |
| struct k_sem* random_sem_type |
| struct k_stack s |
| struct k_sem sem |
| struct k_thread t |
| struct k_timer timer |
| struct z_thread_stack_element zs |