Skip to content

define kernel system calls #3641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zephyrbot opened this issue May 25, 2017 · 0 comments
Closed

define kernel system calls #3641

zephyrbot opened this issue May 25, 2017 · 0 comments
Assignees
Labels
area: Kernel Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented May 25, 2017

Reported by Andrew Boie:

For memory protection we need to define system calls for working with kernel objects, almost all of these APIs are in include/kernel.h.

Determine which of these APIs will be part of our system call interface (callable from user threads with privilege elevation), and which APIs will be reserved for supervisor use.

Some APIs may behave differently depending on calling context. For example, we may want to allow k_thread_create() to be called from user code, but the newly created thread would automatically be dropped down to user privileges and inherit the parent thread's policies.

As part of this, we will also need to inventory all the kernel objects associated with these system calls.

  • If there is any way that corruption of the data in these objects could hose the kernel, then we will need to enforce that these objects are always created in kernel memory and pointers passed in via API calls are validated (see Validation mechanism for user-supplied kernel object pointers #3625). struct k_thread is a good example of this.
  • If corruption of the data structure can be accounted for, checked, or otherwise ignored by the kernel, then we can simply treat them as user buffers and they can still live in user memory and we will need a lesser form of validation (see use API to validate user-supplied kernel buffers #3630)

(Imported from Jira ZEP-2203)

@zephyrbot zephyrbot added priority: medium Medium impact/importance bug area: Kernel Enhancement Changes/Updates/Additions to existing features labels Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Kernel Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants