We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d99e3d commit cb7b6d2Copy full SHA for cb7b6d2
lld/ELF/Writer.cpp
@@ -3196,7 +3196,13 @@ class CompartmentReportWriter {
3196
imports.push_back(json::Object{
3197
{"kind", "MMIO"},
3198
{"start", entry.start},
3199
- {"length", entry.length & 0xfffffff},
+ /*
3200
+ * Length and permissions are bit-stuffed into the same 32-bit
3201
+ * word, with the top 8 bits reserved for permission flags and
3202
+ * the bottom 24 for length. See CHERIoT-RTOS's
3203
+ * sdk/core/loader/types.h ReservedPermissionsMask
3204
+ */
3205
+ {"length", entry.length & 0x00ffffff},
3206
{"permits_load", (entry.length & ImportPermitsLoad) != 0},
3207
{"permits_store", (entry.length & ImportPermitsStore) != 0},
3208
{"permits_load_store_capabilities",
0 commit comments