[solved] Sign extension on x86-64 (paging)
Posted: Fri May 18, 2007 5:51 am
I tried to find documentation about the sign extensions of virtual addresses in long mode in the AMD and Intel documentation, but none of them write about it. Also wikipedia doesn't really talk about this...
From reading the Bochs source code my understanding is that the Sign extension is only checked for being canonical, but not used in the page translation process.
Does anyone know if the sign extension has any influence on privilege checks (so that virtual addresses in the negative address space always require cpl 0)?
Does a pointer 0xFFFF800000000008 equal the pointer 0x0000000000000008 in both cpl 0 and cpl 3? Or would code running in cpl 3 always page fault trying to use negative pointer because the system assumes cpl 0 for them?
I hope somebody can shed some light on this for me![Smile :)](./images/smilies/icon_smile.gif)
From reading the Bochs source code my understanding is that the Sign extension is only checked for being canonical, but not used in the page translation process.
Does anyone know if the sign extension has any influence on privilege checks (so that virtual addresses in the negative address space always require cpl 0)?
Does a pointer 0xFFFF800000000008 equal the pointer 0x0000000000000008 in both cpl 0 and cpl 3? Or would code running in cpl 3 always page fault trying to use negative pointer because the system assumes cpl 0 for them?
I hope somebody can shed some light on this for me
![Smile :)](./images/smilies/icon_smile.gif)