Commit Graph

462 Commits

Author SHA1 Message Date
4lDO2 772003138d Add a backwards-compatible interface for more IRQs. 2020-03-28 13:37:03 +01:00
4lDO2 c154effd1c Get a working local apic timer. 2020-03-28 13:37:03 +01:00
4lDO2 c11d6d9e46 Update the x86 crate. 2020-03-28 13:37:03 +01:00
4lDO2 65e8abb449 Allow multiple processes to share IRQs.
I haven't been able to receive xhc interrupt anyway.
2020-03-28 13:37:03 +01:00
Skallwar ae14eda866 Run rustfmt 2020-03-06 21:05:26 +01:00
Skallwar b82f596ef6 Fix unnecessary syntax 2020-03-06 21:02:20 +01:00
Skallwar 7671e92216 Fix borrow of packed field 2020-03-06 21:01:18 +01:00
Jeremy Soller b616fdb067 Keep track of ticks each context uses 2020-02-18 21:16:53 -07:00
Jeremy Soller d4d14c78c3 Ensure page table locking at runtime 2020-02-12 20:34:49 -07:00
Jeremy Soller b892603501 Require mutable context to perform page table modifications 2020-02-10 17:58:44 -07:00
Jeremy Soller 7721a0a4c6 Fix assignment of cpu_id 2020-02-09 11:05:02 -07:00
Jeremy Soller d42c1ba14e Remove unused feature 2020-02-09 09:50:48 -07:00
Jeremy Soller 388ab2c87d option -> opt 2020-02-09 09:50:40 -07:00
Jeremy Soller aec92c1617 Make PIT_TICKS thread_local 2020-02-09 09:49:49 -07:00
Jeremy Soller 7658193271 Remove some warnings 2020-02-07 20:06:33 -07:00
Joshua Abraham 6a48ae3d8b Fix deadlock in sys: scheme
This patch fixes a deadlock in the sys: scheme that is triggered
when the iostat resource() is called in the same scope where the RwLock
protecting the scheme's handles is write-locked.
2020-01-25 17:39:51 -05:00
Jeremy Soller 57a6359333 Do not add newline to sys:exe 2019-12-22 18:23:36 -07:00
Jeremy Soller 72ea559da4 Do not log mprotects 2019-12-06 19:59:18 -07:00
Jeremy Soller e13107b441 Remove warning 2019-11-13 19:41:34 -07:00
Jeremy Soller f7f4013cf0 Do not use COM3 or COM4 2019-11-13 19:39:45 -07:00
Jeremy Soller 90b113f047 Add lpss_debug 2019-11-13 19:33:21 -07:00
Jeremy Soller 331590e129 Support COM3 and COM4 2019-11-01 20:35:02 -06:00
Jeremy Soller c27a6c149b Support SerialPort<Mmio<u32>> 2019-11-01 20:34:03 -06:00
Timothy DeHerrera f75e1c4802 implement remaninder for nanosleep 2019-10-08 11:54:02 -06:00
Jeremy Soller af93866c41 Add more clippy lints 2019-10-06 11:15:01 -06:00
Jeremy Soller 63e2a835e0 Fix clippy.sh script and fix a number of clippy warnings 2019-10-06 11:04:06 -06:00
jD91mZM2 ab1a12ad4a Remove deadlock-prone mutex in proc.rs
I believe this could cause a deadlock if a blocking I/O operation was
interrupted by a signal or otherwise, and decided to exit and close
all files. It's unlikely to happen, but it can happen nontheless. This
removes the mutex, but it's difficult to keep the code tidy. Hopefully
this is good enough.
2019-08-15 16:07:38 +02:00
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 070f1fa913 Delete ptrace-related TODO 2019-08-15 12:26:29 +02:00
jD91mZM2 2544feb33f Disallow changing CS which contains CPL 2019-08-15 12:26:29 +02:00
Jeremy Soller 3694395dfb Fix compilation of acpi feature 2019-08-12 19:33:03 -06:00
jD91mZM2 40449d32b5 Allow catching int3 2019-07-31 16:43:49 +02:00
jD91mZM2 ad5f3814fa Add way to ignore signals 2019-07-30 15:54:25 +02:00
jD91mZM2 62cd298202 Merge ProtFlags with MapFlags 2019-07-30 11:45:54 +02:00
jD91mZM2 a7b2bd22c1 More cleanup... 2019-07-27 15:39:09 +02:00
jD91mZM2 538ca49ee2 Suggestion: Switch to bitflags 2019-07-26 12:23:21 +02:00
jD91mZM2 0e2b0d0fd4 Fix a few details 2019-07-26 10:29:31 +02:00
jD91mZM2 3ac1416dba First step for ptrace overhaul 2019-07-24 21:42:33 +02:00
Jeremy Soller e95cb74d0b Resolve cross-scheme links 2019-07-23 21:06:16 -06:00
jD91mZM2 1137692809 WIP(ptrace): Allow setting RIP 2019-07-23 19:55:11 +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 7426e48105 WIP(ptrace): Extract repeated arch-specific code to ptrace module 2019-07-21 13:28:31 +02:00
jD91mZM2 4c2d8599d8 Add missing debug definitions
See [strace-redox#ea42589d](https://gitlab.redox-os.org/redox-os/strace-redox/commit/ea42589d36923e9c018a4d802a5cd0c3449d0e6c)
2019-07-21 10:06:28 +02:00
jD91mZM2 6a3825d408 WIP(ptrace): Only use non-signal stack when using a default handler
This is a curious problem and it's really hard to solve it in a way
that doesn't feel hacky. On one hand, of course you want to be able to
modify and intercept what happens when you use a signal, right? On the
other hand, changes made to the context (especially singlestepping)
while a signal is handled (such as `SIGSTOP`) are not preserved since
the stack is restored after the signal handler was invoked.

I think what we have in this change makes sense anyway, as we don't
really want users modifying registers and other data in the default
signal behavior that occurs **in kernel mode**. Also trying to use
`PTRACE_SINGLESTEP` will set the singlestep flag only if in a
user-mode signal handler, else it will set it on the instruction after
the signal handling, which I guess makes sense since it can't affect
the kernel-mode code that runs the default handler.

I don't know. Help. Pls.
2019-07-20 22:45:33 +02:00
jD91mZM2 8695ecd82b Fix sigaction Undefind Behavior
Rust does not allow a `fn`-pointer to be null. This fixes that, while
luckily doing it in a way that leaves system calls
backwards-compatible :)
2019-07-20 22:41:54 +02:00
jD91mZM2 be867ae5f1 WIP(ptrace): Add ptrace event system for catching child forks 2019-07-20 09:45:07 +02:00
jD91mZM2 3d44242407 WIP(ptrace): Finally add stronger security checks 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 532ffe25cf Unmounting support 2019-07-18 21:00:36 -06:00
Jeremy Soller 113af69434 Remove scheme if closed 2019-07-18 20:58:06 -06:00