Jinoh Kang (@iamahuman) commented about server/mapping.c:
return page_mask + 1;
}
+struct mapping *create_session_mapping( struct object *root, const struct unicode_str *name,
unsigned int attr, const struct security_descriptor *sd )
+{
- static const unsigned int access = FILE_READ_DATA | FILE_WRITE_DATA;
- mem_size_t size;
- size = max(offsetof(session_shm_t, objects[512]), 0x10000);
- size = (size + page_mask) & ~((mem_size_t)page_mask);
(nit) this is unnecessary since `create_mapping` already rounds up the size in `/* Anonymous mapping (no associated file) */` case.
```suggestion:-0+0 ```
Note that `create_user_data_mapping` already relies on the round-up behavior: it passes `sizeof(KSHARED_USER_DATA)` directly to `create_mapping`.