On 12.04.2024 12:59, Andrew Cooper wrote:
> On 12/04/2024 9:07 am, Roger Pau Monne wrote:
>> @@ -310,6 +313,20 @@ int livepatch_elf_resolve_symbols(struct livepatch_elf 
>> *elf)
>>                      break;
>>                  }
>>              }
>> +            /*
>> +             * Ensure not an init symbol.  Only applicable to Xen symbols, 
>> as
>> +             * livepatch payloads don't have init sections or equivalent.
>> +             */
>> +            else if ( st_value >= (uintptr_t)&__init_begin &&
>> +                      st_value <= (uintptr_t)&__init_end )
> 
> I think you want just < here.  A label at __init_end is the start of the
> next section.

May be, but not "is". It could be a reference to __init_end itself, for
example. Similarly st_value == __init_begin could be a reference to
the section end of the earlier section. I'm afraid the checks here are
always going to be fuzzy, and hence the description needs to discuss
the policy used as to what is permitted and what is not.

Jan

Reply via email to