mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 20:05:54 +00:00
loader,nit_fb,wm: work-around for NOVA's cap revokes
This commit is contained in:
parent
d198f07890
commit
2936cbebfd
@ -163,6 +163,8 @@ struct Wm::Decorator_nitpicker_session : Genode::Rpc_object<Nitpicker::Session>,
|
||||
|
||||
Nitpicker::Connection _nitpicker_session { "decorator" };
|
||||
|
||||
Genode::Signal_context_capability _mode_sigh;
|
||||
|
||||
typedef Nitpicker::Session::Command_buffer Command_buffer;
|
||||
|
||||
Attached_ram_dataspace _command_ds { &_ram, sizeof(Command_buffer) };
|
||||
@ -442,6 +444,11 @@ struct Wm::Decorator_nitpicker_session : Genode::Rpc_object<Nitpicker::Session>,
|
||||
|
||||
void mode_sigh(Genode::Signal_context_capability sigh) override
|
||||
{
|
||||
/*
|
||||
* Remember signal-context capability to keep NOVA from revoking
|
||||
* transitive delegations of the capability.
|
||||
*/
|
||||
_mode_sigh = sigh;
|
||||
_nitpicker_session.mode_sigh(sigh);
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,8 @@ class Input::Session_component : public Rpc_object<Session>
|
||||
Motion_delta &_motion_delta;
|
||||
Event * const _ev_buf;
|
||||
|
||||
Genode::Signal_context_capability _sigh;
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
@ -99,6 +101,12 @@ class Input::Session_component : public Rpc_object<Session>
|
||||
|
||||
void sigh(Signal_context_capability sigh) override
|
||||
{
|
||||
/*
|
||||
* Maintain local copy of signal-context capability to keep
|
||||
* NOVA from flushing transitive delegations of the capability.
|
||||
*/
|
||||
_sigh = sigh;
|
||||
|
||||
_real_input.sigh(sigh);
|
||||
}
|
||||
};
|
||||
|
@ -113,6 +113,8 @@ struct Framebuffer::Session_component : Genode::Rpc_object<Framebuffer::Session>
|
||||
|
||||
Genode::Signal_context_capability _mode_sigh;
|
||||
|
||||
Genode::Signal_context_capability _sync_sigh;
|
||||
|
||||
View_updater &_view_updater;
|
||||
|
||||
Framebuffer::Mode::Format _format = _nitpicker.mode().format();
|
||||
@ -204,6 +206,14 @@ struct Framebuffer::Session_component : Genode::Rpc_object<Framebuffer::Session>
|
||||
|
||||
void sync_sigh(Genode::Signal_context_capability sigh) override
|
||||
{
|
||||
/*
|
||||
* Keep a component-local copy of the signal capability. Otherwise,
|
||||
* NOVA would revoke the capability from further recipients (in this
|
||||
* case the nitpicker instance we are using) once we revoke the
|
||||
* capability locally.
|
||||
*/
|
||||
_sync_sigh = sigh;
|
||||
|
||||
_nit_fb.sync_sigh(sigh);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user