Commit Graph

816 Commits

Author SHA1 Message Date
Jeremy Soller c860322cfc Merge branch 'master' of https://gitlab.redox-os.org/redox-os/kernel 2020-02-07 20:06:39 -07:00
Jeremy Soller 7658193271 Remove some warnings 2020-02-07 20:06:33 -07:00
Jeremy Soller 8eaa809b29 Merge branch 'master' into 'master'
Update README's debugging instructions

See merge request redox-os/kernel!113
2020-01-26 01:12:22 +00:00
Joshua Abraham 4a4d8601d1 Update README's debugging instructions 2020-01-25 20:03:57 -05:00
Jeremy Soller 64f962e02b Merge branch 'master' into 'master'
Fix deadlock in sys: scheme

See merge request redox-os/kernel!112
2020-01-25 23:07:24 +00: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
Jeremy Soller 752138de1d Merge branch 'nanosleep' into 'master'
implement remainder for nanosleep

See merge request redox-os/kernel!110
2019-10-08 19:01:15 +00: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
Jeremy Soller a57ea6a72b Merge branch 'ptrace-end' into 'master'
Final few ptrace changes

See merge request redox-os/kernel!109
2019-08-21 21:00:13 +00: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 6160de495f Make multi_core require acpi 2019-08-12 19:33:50 -06:00
Jeremy Soller 3694395dfb Fix compilation of acpi feature 2019-08-12 19:33:03 -06:00
Jeremy Soller 8c6e1d0541 Update syscall 2019-07-31 18:30:57 -06:00
Jeremy Soller d28b578681 Merge branch 'ptrace-6' into 'master'
Ptrace overhaul & bitflags

See merge request redox-os/kernel!107
2019-07-31 20:29:54 +00: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
Jeremy Soller e570f35279 Update syscall 2019-07-23 20:04:43 -06:00
Jeremy Soller 3533cb3757 Merge branch 'ptrace-5' into 'master'
Drive ptrace into a wall, prepare for overhaul

See merge request redox-os/kernel!106
2019-07-24 02:04:06 +00: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
Jeremy Soller 4b2c15f0b9 Remove scheme by ID 2019-07-18 20:57:51 -06:00
Jeremy Soller 5af7f71a99 Fix warning 2019-07-18 20:57:41 -06:00
Jeremy Soller 5a42b6dd76 Add notify_signal method to WaitCondition to simulate being woken by a signal 2019-07-18 19:48:54 -06:00