Commit Graph

699 Commits

Author SHA1 Message Date
Bahadir Balban
118fc795d9 Added wakeup call during exit in case pager was trying to suspend us. 2009-10-30 12:45:31 +02:00
Bahadir Balban
26aa62d2ea Added different paths of exiting for pager and its children.
Created a task_dead list on pager for children to move to when
they exit.
2009-10-30 12:00:05 +02:00
Bahadir Balban
a6c61e05b9 l4_exit() works with a reasonable sched_die_sync()
Next: Killing other tasks more cleanly, and waiting on children
2009-10-29 22:44:58 +02:00
Bahadir Balban
73a27f2269 Modifications for exit/wait on test container 2009-10-27 20:22:42 +02:00
Bahadir Balban
bc91edba76 Few minor userspace polishes on caps for kernel changes 2009-10-27 18:39:09 +02:00
Bahadir Balban
5840d6d696 Capability-enabled kernel running 2_posix test OK. 2009-10-27 15:59:07 +02:00
Bahadir Balban
d1f25763ac Added a conceptual multithreaded app with no capability enforcement.
It is important to be able to create environments with not much
involvement with capability management. This is to increase usability
of the system and provide the option of having simpler api with
less security-oriented applications.
2009-10-26 14:08:41 +02:00
Bahadir Balban
5ecef40312 Added a conceptual prototype of a capability sharing example. 2009-10-26 13:34:34 +02:00
Bahadir Balban
88e3706474 Capability checking added as compiling code.
Capability checking for thread_control, exregs, mutex, cap_control,
ipc, and map system calls.

The visualised model is implemented in code that compiles, but
actual functionality hasn't been tested.

Need to add:
- Dynamic assignment of initial resources matching with what's
defined in the configuration.
- A paged-thread-group, since that would be a logical group of
seperation from a capability point-of-view.
- Resource ids for various tasks. E.g.
  - Memory capabilities don't have target resources.
  - Thread capability assumes current container for THREAD_CREATE.
  - Mutex syscall assumes current thread (this one may not need
    any changing)
  - cap_control syscall assumes current thread. It may happen to
    be that another thread's capability list is manipulated.

Last but not least:
- A simple and easy-to-use userspace library for dynamic expansion
  of resource domains as new resources are created such as threads.
2009-10-25 23:57:17 +02:00
Bahadir Balban
83ce4280b0 Some capability checking progress 2009-10-24 18:44:47 +03:00
Bahadir Balban
4a24e02151 Reorganized test container sources 2009-10-23 16:41:30 +03:00
Bahadir Balban
6093214981 Added sharing of pager capabilities with children or siblings
Pagers can now share their own private capabilities with their
paged children, or their siblings with whom they have a common pager
ancestor.

Added flags CAP_SHARE_CHILD and CAP_SHARE_SIBLINGS for that.
2009-10-23 13:50:32 +03:00
Bahadir Balban
f4c9ea50bc Added an example test container configuration 2009-10-23 12:32:53 +03:00
Bahadir Balban
8cabfa3e37 Capability sharing test added.
Pagers by default do not share their capabilities with their children.

By using one of CAP_SHARE_SPACE, CAP_SHARE_GROUP or CAP_SHARE_CONTAINER
a pager may now share its capabilities with a collection of threads.
2009-10-23 12:30:30 +03:00
Bora Sahin
4bdbe42850 Linker script is removed from the bare container template.
This is unnecessary because it is autogenerated.
(cherry picked from commit 36e3982b5c769090df00964651f4127ed7c34bd8)
2009-10-23 03:03:57 +03:00
Bora Sahin
2a47e425c4 Test container type is added.
Test container is planned to test codezero microkernel extensively.
With these changes, everything is there to develop a full-featured test suite.
It also exemplifies how a new container type can be added to the system.
(cherry picked from commit f21fa53df421bfc8eeeaa096c89b98beed436c60)
2009-10-23 03:03:14 +03:00
Bahadir Balban
89d49ef495 Lots of fixes, notion of pager hierarchy, fixed tgroup capability checking
Notion of pager hierarchy introduced using the existing but unused
pagerid field.

Thread creation now has two more flags TC_AS_PAGER and TC_SHARE_PAGER.
The former sets creator as pager, the latter sets creator's pager as pager.

Thread group capability sharing now correctly carries shared capabilities
to the thread group leader's tgr_cap_list list, and this list is checked
during capability checking.
2009-10-23 02:36:12 +03:00
Bahadir Balban
df776b568f Tests working up to neverending suspend - Will be fixed. 2009-10-22 22:50:50 +03:00
Bahadir Balban
948dd4fa71 Added quick saving of configuration with -s 2009-10-22 16:14:37 +03:00
Bahadir Balban
4f2954af8a Fixed a minor config issue + updated example cml files. 2009-10-22 15:46:58 +03:00
Bahadir Balban
0f9ea9674c Progress on capabilities
Capabilities will be shared among collection of threads. A pager
will have a right to share its own capabilities with its space,
its thread group and its container.

Currently sharing is possible with only all of the caps. Next,
it will be support for cap splitting, granting, and partial sharing
and granting.
2009-10-22 14:04:25 +03:00
Bahadir Balban
c6bdd65e48 Minor mods on linux patches 2009-10-21 21:27:41 +03:00
Bahadir Balban
4f5ab576b8 Merge branch 'master' into devel 2009-10-21 20:38:18 +03:00
Bahadir Balban
cc2d740900 Neater thread creation flags. 2009-10-21 16:58:10 +03:00
Amit Mahajan
8d38c8ede6 Corrected the PC value for non linux containers. 2009-10-21 17:02:03 +05:30
Amit Mahajan
89a937fc9c Generating LMA for final.elf dynamically 2009-10-21 16:47:56 +05:30
Amit Mahajan
8bb1069553 Adding mechanism to have differnt run and load address for pagers 2009-10-21 16:45:06 +05:30
Amit Mahajan
be9b629836 Corrected the way to find config.h's path 2009-10-21 16:42:32 +05:30
Amit Mahajan
93c7a909b1 CPUID and ARCHID taking at runtime from config.h 2009-10-21 16:42:32 +05:30
Amit Mahajan
4bbf9adb86 Passing PHYS_OFFSET as load address of linux elf 2009-10-21 16:42:31 +05:30
Amit Mahajan
084ac1da22 Taking CPUID and ARCHID for linux from build system 2009-10-21 16:42:31 +05:30
Amit Mahajan
e264544c00 Taking Linux's Rootfs address from user 2009-10-21 16:42:31 +05:30
Amit Mahajan
86c3a7c176 Added LinuxUpdateParam class for passing parameters to linux 2009-10-21 16:41:28 +05:30
Amit Mahajan
61a0d5b60f Added support for ATAGS for linux kernel 2009-10-21 16:38:57 +05:30
Amit Mahajan
2625d5e871 Encapsulating Linux Image binary in elf 2009-10-21 16:38:57 +05:30
Bahadir Balban
2caf0478d8 Remove missing parse_options reference 2009-10-21 13:25:25 +03:00
Bahadir Balban
d2fee25924 Simplified/Cleaned up pager initialization in the kernel 2009-10-20 22:20:37 +03:00
Bahadir Balban
224b531de5 min/max definitions converted to inline functions instead of macros 2009-10-20 21:38:15 +03:00
Bahadir Balban
61e41b5fed Removed memory access permissions from configuration for simplicity
Access permission bits are required eventually but currently are
not a critical concern and yet they complicate configuration. For
sake of simplicity they are removed to be added later on when
absolutely needed.
2009-10-20 21:16:04 +03:00
Bahadir Balban
dba6dd0647 Removed parse_options.py which has now moved to configure.py 2009-10-20 20:33:53 +03:00
Bahadir Balban
d94054e2b4 Updated example posix cml files 2009-10-20 20:10:35 +03:00
Bahadir Balban
00bfe36dc9 Added example cml2 configuration with 2 posix containers 2009-10-20 20:06:28 +03:00
Bahadir Balban
f3edb21fb5 Further enhancements to configuration simplification 2009-10-20 20:05:42 +03:00
Bahadir Balban
b85d4202ce Significant cleanup to how configuration files are generated.
Default autogenerated version works. Need to sort out config options
2009-10-20 19:35:02 +03:00
Bahadir Balban
a6ed056ea7 Added example cml2 configuration with 2 posix containers 2009-10-20 13:15:54 +03:00
Bahadir Balban
9c06bea41a Changed name of kernel_container to kernel_resources 2009-10-20 13:14:49 +03:00
Bahadir Balban
b78859503e Fixed anomaly on memory initialization on mm0.
By this commit, two copies of posix containers can be run!
2009-10-19 22:22:23 +03:00
Bahadir Balban
3660ba9528 Some more minor fixes. 2009-10-19 20:21:23 +03:00
Bahadir Balban
655e135300 Removed zombie test and any verbose printks 2009-10-19 19:45:04 +03:00
Bahadir Balban
62c4249d95 Renamed many thread_* line of calls.
Renamed so that task_* gets a ktcb directly, and thread_* line of
calls make the search for the ktcb.
2009-10-19 19:24:40 +03:00