mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
noux: calculate rm::attach parameters correctly
Previous commit denies the creation of regions larger then the dataspace. Noux does it by setting the default size to the dataspace size without subtracting the offset. Fixes #591
This commit is contained in:
parent
717be91e16
commit
01d267e551
@ -189,8 +189,11 @@ namespace Noux {
|
||||
Local_addr local_addr = (addr_t)0,
|
||||
bool executable = false)
|
||||
{
|
||||
if (size == 0)
|
||||
size = Dataspace_client(ds).size();
|
||||
/*
|
||||
* Rm_session substracts offset from size if size is 0
|
||||
*/
|
||||
if (size == 0)
|
||||
size = Dataspace_client(ds).size() - offset;
|
||||
|
||||
/*
|
||||
* XXX look if we can identify the specified dataspace.
|
||||
@ -202,7 +205,7 @@ namespace Noux {
|
||||
executable);
|
||||
|
||||
/*
|
||||
* Record attachement for later replay (needed during
|
||||
* Record attachment for later replay (needed during
|
||||
* fork)
|
||||
*/
|
||||
_regions.insert(new (env()->heap())
|
||||
|
Loading…
x
Reference in New Issue
Block a user