app_server: Set B_CLONEABLE_AREA where applicable.

This is all that is needed to boot a minimum image with userland
area cloning protections enabled (media_server is not included
in such builds.)
This commit is contained in:
Augustin Cavalier 2019-08-10 16:11:00 -04:00
parent 8a0c9d52c6
commit 23121bac3b
4 changed files with 4 additions and 4 deletions

View File

@ -274,7 +274,7 @@ ClientMemoryAllocator::_AllocateChunk(size_t size, bool& newArea)
fApplication->ClientTeam(), fApplication->SignatureLeaf()); fApplication->ClientTeam(), fApplication->SignatureLeaf());
#endif #endif
area_id area = create_area(name, (void**)&address, B_ANY_ADDRESS, size, area_id area = create_area(name, (void**)&address, B_ANY_ADDRESS, size,
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
if (area < B_OK) { if (area < B_OK) {
free(block); free(block);
free(chunk); free(chunk);

View File

@ -498,7 +498,7 @@ Desktop::Init()
char name[B_OS_NAME_LENGTH]; char name[B_OS_NAME_LENGTH];
snprintf(name, sizeof(name), "d:%d:shared read only", fUserID); snprintf(name, sizeof(name), "d:%d:shared read only", fUserID);
fSharedReadOnlyArea = create_area(name, (void **)&fServerReadOnlyMemory, fSharedReadOnlyArea = create_area(name, (void **)&fServerReadOnlyMemory,
B_ANY_ADDRESS, areaSize, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); B_ANY_ADDRESS, areaSize, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
if (fSharedReadOnlyArea < B_OK) if (fSharedReadOnlyArea < B_OK)
return fSharedReadOnlyArea; return fSharedReadOnlyArea;

View File

@ -31,7 +31,7 @@ DirectWindowInfo::DirectWindowInfo()
{ {
fBufferArea = create_area("direct area", (void**)&fBufferInfo, fBufferArea = create_area("direct area", (void**)&fBufferInfo,
B_ANY_ADDRESS, DIRECT_BUFFER_INFO_AREA_SIZE, B_ANY_ADDRESS, DIRECT_BUFFER_INFO_AREA_SIZE,
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA); B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
memset(fBufferInfo, 0, DIRECT_BUFFER_INFO_AREA_SIZE); memset(fBufferInfo, 0, DIRECT_BUFFER_INFO_AREA_SIZE);
fBufferInfo->buffer_state = B_DIRECT_STOP; fBufferInfo->buffer_state = B_DIRECT_STOP;

View File

@ -58,7 +58,7 @@ InputServerStream::InputServerStream(BMessenger& messenger)
message.AddInt32("remote team", BPrivate::current_team()); message.AddInt32("remote team", BPrivate::current_team());
fCursorArea = create_area("shared cursor", (void **)&fCursorBuffer, B_ANY_ADDRESS, fCursorArea = create_area("shared cursor", (void **)&fCursorBuffer, B_ANY_ADDRESS,
B_PAGE_SIZE, B_LAZY_LOCK, B_READ_AREA | B_WRITE_AREA); B_PAGE_SIZE, B_LAZY_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
if (fCursorArea >= B_OK) if (fCursorArea >= B_OK)
message.AddInt32("cursor area", fCursorArea); message.AddInt32("cursor area", fCursorArea);