On Sunday, February 24, 2013, Abu Rasheda wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am trying to dump some kernel data structure (walk e.g. task or file data structure on x86_64 arch). Sometime accessing through a pointer, pointer may not be NULL, but pointing to invalid address due to garbage value.<div>
<br></div><div>What I am looking for is range of address which are valid for kernel data structure. Is it correct to say following address are valid ?</div><div><br></div><div>- Bit 0 - 47 are considered</div><div>- Between FFFF8000'00000000 through FFFFFFFF'FFFFFFFF</div>
</div></blockquote><div><br></div><div>Will this cover all situations</div><div><br></div><div><span></span> <font><span style="line-height:normal;background-color:rgba(255,255,255,0)">if (long_ptr > 0x1000)</span></font></div>
<font><span style="line-height:normal;background-color:rgba(255,255,255,0)"> {<br> tmp_long_ptr = ((long_ptr & 0x800000000000) ? (long_ptr | 0xffff800000000000) : (long_ptr & 0xFFFFFFFFFFFF));<br>printf("tmp_long_ptr :0x%llx\n", (long long int) tmp_long_ptr);<br>
if ((long_ptr == tmp_long_ptr) & (long_ptr >= 0x30000000))<br> printf("valid 64 addr\n");<br> }</span></font>