Re: [PATCH v7] livepatch: Clear relocation targets on a module removal

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

 



On 1/5/23 11:53, Song Liu wrote:
> Btw: I am confused with this one:
> 
>                 case R_PPC64_REL16_HA:
>                         /* Subtract location pointer */
>                         value -= (unsigned long)location;
>                         value = ((value + 0x8000) >> 16);
>                         *((uint16_t *) location)
>                                 = (*((uint16_t *) location) & ~0xffff)
>                                 | (value & 0xffff);
>                         break;
> 
> (*((uint16_t *) location) & ~0xffff) should always be zero, no?

It looks like a lot of extra read/bit twiddling to do:

  *(uint16_t *) location = value;

or am I missing a corner case that this handles?

-- 
Joe




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux