forked from rcore-os/zCore
Thread exception channel shouldn't get the process
This commit is contained in:
parent
e9cdd14e79
commit
d133237224
|
@ -166,7 +166,7 @@ pub enum ExceptionType {
|
|||
}
|
||||
|
||||
#[repr(u32)]
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Copy, Clone,PartialEq)]
|
||||
pub enum ExceptionChannelType {
|
||||
None = 0,
|
||||
Debugger = 1,
|
||||
|
|
|
@ -73,6 +73,9 @@ impl Syscall<'_> {
|
|||
let proc = self.thread.proc();
|
||||
let exception =
|
||||
proc.get_object_with_rights::<ExceptionObject>(exception, Rights::default())?;
|
||||
if exception.get_exception().get_current_channel_type() == ExceptionChannelType::Thread {
|
||||
return Err(ZxError::ACCESS_DENIED)
|
||||
}
|
||||
let (object, right) = exception.get_exception().get_process_and_rights();
|
||||
let handle = proc.add_handle(Handle::new(object, right));
|
||||
out.write(handle)?;
|
||||
|
|
Loading…
Reference in New Issue