search for: tagged_relative

Displaying 4 results from an estimated 4 matches for "tagged_relative".

2020 Sep 18
2
[MTE] Globals Tagging - Discussion
...So if we just did a RELATIVE relocation then array_end's value would > have a tag of 2, so you couldn't do: > for (int* ptr=array; ptr != array_end; ++ptr) > Since it's always != due to the tags. > Do I have that right? Yep - you've got it right, this is why we need TAGGED_RELATIVE. For clarity, here's the memory layout where array_end is relocated using TAGGED_RELATIVE{*r_offset = &array[16], r_addend = &array[0]}: array array_end (padding) Memory Tag 0x1 0x1 0x2 0x2 Value 0 0 0 0 (0x1 << 56) | &array[16] 0 0 So the address tag of `array` and `array_end...
2020 Sep 21
2
[MTE] Globals Tagging - Discussion
...#39;s value would >>> have a tag of 2, so you couldn't do: >>> for (int* ptr=array; ptr != array_end; ++ptr) >>> Since it's always != due to the tags. >>> Do I have that right? >> >> >> Yep - you've got it right, this is why we need TAGGED_RELATIVE. For clarity, here's the memory layout where array_end is relocated using TAGGED_RELATIVE{*r_offset = &array[16], r_addend = &array[0]}: >> arrayarray_end(padding) >> Memory Tag0x10x10x20x2 >> Value0000(0x1 << 56) | &array[16]00 >> >> So the addre...
2020 Sep 17
4
[MTE] Globals Tagging - Discussion
...memory tag of the symbol into the relocated value. For example, the ABS64 relocation becomes: sym_addr = get_symbol_address() // sym_addr = 0x1008 sym_addr |= get_tag(sym_addr & 0xf) // get_tag(0x1008 & 0xf == 0x1000) *r_offset = sym_addr + r_addend; 2. Introduce a TAGGED_RELATIVE relocation - in order to solve the problem where the tag derivation shouldn't be from the relocation result, e.g. static int array[16] = {}; // array_end must have the same tag as array[]. array_end is out of // bounds w.r.t. array, and may point to a completely different global....
2020 Oct 09
3
[MTE] Globals Tagging - Discussion
...le, the ABS64 relocation becomes: > > sym_addr = get_symbol_address() // sym_addr = 0x1008 > > sym_addr |= get_tag(sym_addr & 0xf) // get_tag(0x1008 & 0xf == > 0x1000) > > *r_offset = sym_addr + r_addend; > > 2. > > > > Introduce a TAGGED_RELATIVE relocation - in order to solve the problem > > where the tag derivation shouldn't be from the relocation result, e.g. > > static int array[16] = {}; > > // array_end must have the same tag as array[]. array_end is out of > > // bounds w.r.t. array, and may po...