Re: valid address space ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 24, 2013 at 11:23 PM, <Valdis.Kletnieks@xxxxxx> wrote:
On Sun, 24 Feb 2013 21:37:48 -0800, Abu Rasheda said:

>    tmp_long_ptr = ((long_ptr & 0x800000000000) ? (long_ptr |
> 0xffff800000000000) : (long_ptr & 0xFFFFFFFFFFFF));

This will not do what you think it does when compiled for a 32-bit
system.

This code will never run on 32 bit system, but on 64 bit Intel. So does this cover all possible valid addresses where kernel data structure can reside ? here is the _expression_ again:

 if (long_ptr > 0x1000)
  {
   tmp_long_ptr = ((long_ptr & 0x800000000000) ? (long_ptr | 0xffff800000000000) : (long_ptr & 0xFFFFFFFFFFFF));
printf("tmp_long_ptr :0x%llx\n", (long long int) tmp_long_ptr);
   if ((long_ptr == tmp_long_ptr) & (long_ptr >= 0x30000000))
      printf("valid 64 addr\n");
  }
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux