I found the quote below online. Is it possible to disable a general protection exception when a pointer isn't in canonical address form? I was thinking for my app it would be so nice if I can use the high 4bits of a pointer to hold extra data (for example if a node is red or black in a red-black tree)
Although implementations might not use all 64 bits of the virtual address, they check bits 63 through the most-significant implemented bit to see if those bits are all zeros or all ones. An address that complies with this property is said to be in canonical address form. If a virtual-memory reference is not in canonical form, the implementation causes a general-protection exception or stack fault