File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,17 @@ with programmer impact:
9090 2 . Instructions are therefore used that will preserve the tag on a
9191 capability dynamically by virtue of using arithetic instructions normally
9292 used only for pointer types.
93- However, this means that CHERI C/C++ are not able to provide dynamic
94- integer-pointer type-confusion prevention, as the types are inherently
95- ambiguous.
93+ However, this means that CHERI C/C++ are not able to provide certain
94+ types of dynamic integer-pointer type-confusion prevention, as the types
95+ are inherently ambiguous.
96+
97+ For example, while with non-` intptr_t ` integer types, the tag will always
98+ be cleared when its arithmetic operations are applied to a pointer, this
99+ is not true when ` intptr_t ` is used for integers.
100+ If ` intptr_t ` is used extensively for integer types (e.g., as the atom
101+ type in a language runtime), then the opportunity for dynamic confusion
102+ is restored: arithmetic operations intended only to operate on integer
103+ values will also operate on pointers preserving the tag.
96104
97105It is worth further noting that the C types ` long ` and ` unsigned long ` have
98106historically been used for these purposes, although that has been discouraged
You can’t perform that action at this time.
0 commit comments