jD91mZM2
cf0a7620df
Add ptrace exit breakpoint
...
This will let you stop at process exit and inspect it right before the
process dies.
2019-08-15 14:23:54 +02:00
jD91mZM2
62cd298202
Merge ProtFlags with MapFlags
2019-07-30 11:45:54 +02:00
jD91mZM2
538ca49ee2
Suggestion: Switch to bitflags
2019-07-26 12:23:21 +02:00
jD91mZM2
3ac1416dba
First step for ptrace overhaul
2019-07-24 21:42:33 +02:00
jD91mZM2
a7da393cf5
WIP(ptrace): Better support for signals
...
Signals now cause an event, and there's a way to continue until the
next signal. I can see this being used for detection of `int3`
although I'm not entirely sure as it may prove being too late to stop
abortion of process.
2019-07-21 19:58:32 +02:00
jD91mZM2
be867ae5f1
WIP(ptrace): Add ptrace event system for catching child forks
2019-07-20 09:45:07 +02:00
jD91mZM2
e3d8f23c71
WIP(ptrace): Add dbg! macro and fix waitpid immediately after exit
2019-07-20 09:45:01 +02:00
Jeremy Soller
788526a3b3
Bare-bones ptracing functionality
...
Since even a very basic ptrace can be nice to have, I thought I would split
the, perhaps rather big, ptrace project up in multiple PRs to make as few
changes as necessary in each. This PR contains the initial registry modifying
bits and only a very basic security measure. Letting this out to the community
should be good for spotting bugs and maybe getting some hype ;)
2019-07-02 07:38:26 -06:00
Jeremy Soller
45ea634798
Revert "Merge branch 'ptrace' into 'master'"
...
This reverts merge request !103
2019-07-02 11:56:11 +00:00
jD91mZM2
effe02bd45
Remove change I am faaairly certain I did NOT add :O
...
I'm guessing it's some issue after a rebase or something...
2019-07-01 22:50:19 +00:00
Jeremy Soller
42f977e7da
Disable debug messages
2019-06-27 16:29:28 -06:00
Jeremy Soller
144ac70b12
Allow access to other thread's TLS with pointers
2019-06-23 20:21:22 -06:00
jD91mZM2
fe705d9b63
Switch to 2018 edition
...
Most of this was generated by the absolutely extraordinary `cargo fix`
subcommand. There were still 2 errors and a few warnings to patch up,
but compared to the normal 600+ errors, I'd say the fixer did a damn
good job! I'm also amazed that I could still start the VM after this,
I half expected some kinds of runtime failure...
2019-06-21 12:12:01 +02:00
Jeremy Soller
1be77c2ab4
Store sigmask
2019-06-02 18:45:06 -06:00
Jeremy Soller
126009f83c
Keep process name when using interpreter
2019-04-15 21:00:42 -06:00
Jeremy Soller
b66fef0479
Copy TCB if it was not initialized using kernel-allocated TLS
2019-04-15 20:47:27 -06:00
Jeremy Soller
6da3ab283e
Clone grants
2019-04-15 20:47:03 -06:00
Jeremy Soller
339d68ac8d
Remove debugging messages
2019-04-14 19:12:13 -06:00
Jeremy Soller
434e799f2a
Place TCB at thread-specific location to avoid overlapping TCBs
2019-04-14 19:05:25 -06:00
Jeremy Soller
21e46b6a55
More cleanup of TLS mapping
2019-04-14 14:50:29 -06:00
Jeremy Soller
9762431a33
Cleanup TLS mapping
2019-04-13 22:00:27 -06:00
Jeremy Soller
8120131897
Add interpreter capability
2019-04-13 21:59:46 -06:00
Jeremy Soller
dc28023be1
Remove unnecessary clone
2019-04-13 21:58:34 -06:00
Noam Kleinburd
129d4e3ae5
Lock resources before checking if we need to clean them.
...
See the comments deleted by this commit for more details as to how
the race condition could effect the system.
2019-04-01 17:01:29 +03:00
Jeremy Soller
e5cf6efa64
Support specification of stack with clone system call and CLONE_STACK flag
2019-03-31 14:35:45 -06:00
Jeremy Soller
8fcbf152eb
Add mprotect
2018-12-31 21:04:21 -07:00
Jeremy Soller
b18e322c3f
WIP: itimer and sigprocmask
2018-12-28 21:53:40 -07:00
Jeremy Soller
0df93423a2
Add no_execute to heap now that mmap prot_exec is working
2018-12-28 19:57:51 -07:00
Jeremy Soller
69cbb548fb
Mark heap executable for mesa (temporary)
2018-12-11 21:03:57 -07:00
Jeremy Soller
4c38107055
Add umask
2018-11-16 19:43:37 -07:00
Jeremy Soller
5b31bf57be
Update to latest rust
2018-11-08 17:25:57 -07:00
Jeremy Soller
1b091d3c9f
Set name of process using full path of executable
2018-10-26 10:31:47 -06:00
Jeremy Soller
e867326df1
Attempt to schedule other processors more often by waking them up with a context switch when a process is created
2018-09-25 18:01:38 -06:00
jD91mZM2
1d817fa41d
Push null after argv
2018-08-13 12:14:29 +02:00
Jeremy Soller
1718d28d39
Push null pointer to indicate end of environment
2018-08-12 08:30:12 -06:00
Jeremy Soller
23f4c76ebb
Fixes for launching init
2018-08-11 11:51:58 -06:00
Jeremy Soller
30e68f917e
Remove env scheme and env field on context, fix all warnings
2018-08-11 11:34:32 -06:00
Jeremy Soller
fe90664e33
Copy variables to USER_ARG_OFFSET
2018-08-11 11:18:45 -06:00
Jeremy Soller
c7b3765d6f
Remove execve, replace with fexec
2018-08-11 11:14:32 -06:00
Jeremy Soller
b86672b81e
Support for relibc
2018-07-03 19:42:23 -06:00
Jeremy Soller
c28c147add
Update to new dependencies
2018-06-19 18:17:16 -06:00
Jeremy Soller
99a3bff2da
WIP: New event system
2018-05-20 11:08:37 -06:00
Jeremy Soller
e01d397dc1
Return ECHILD if child process does not exist before blocking on it
2018-05-14 20:34:47 -06:00
Jeremy Soller
48007b8f1e
Update to new allocation API (WIP)
2018-04-28 22:07:43 -06:00
Ian Douglas Scott
3b09c8f858
kill: support signal number 0
...
Tests process existence, but does not send a signal. Matches POSIX
behavior.
2018-03-18 21:52:48 -07:00
Jeremy Soller
761fe30bf3
Add linked list allocator with automatic resizing
...
Fix memory leaks in exec
Remove warnings
2018-01-29 21:29:24 -07:00
Jeremy Soller
f3205e6e34
Fix #81 by limiting arguments to 4095
...
Fix #79 by limiting mappable sections to the 2GB mark
2018-01-21 20:46:53 -07:00
Jeremy Soller
a6550341bb
Add trampolines for PTI support
2018-01-08 22:31:50 -07:00
Jeremy Soller
670d7b00d3
Add PML4 constants
2018-01-08 20:32:27 -07:00
Jeremy Soller
083c444a68
Implement waitpid on PGID
2018-01-05 20:31:15 -07:00