>>> On 19.09.16 at 15:33, <julien.gr...@arm.com> wrote: > Hi, > > On 19/09/2016 11:27, Jan Beulich wrote: >>>>> On 16.09.16 at 18:38, <konrad.w...@oracle.com> wrote: >>> --- a/xen/arch/arm/livepatch.c >>> +++ b/xen/arch/arm/livepatch.c >>> @@ -117,6 +117,20 @@ bool arch_livepatch_symbol_ok(const struct >>> livepatch_elf > *elf, >>> return true; >>> } >>> >>> +bool arch_livepatch_symbol_deny(const struct livepatch_elf *elf, >>> + const struct livepatch_elf_sym *sym) >>> +{ >>> +#ifdef CONFIG_ARM_32 >>> + /* >>> + * Xen does not use Thumb instructions - and we should not see any of >>> + * them. If we do, abort. >>> + */ >>> + if ( sym->name && *sym->name == '$' && sym->name[1] == 't' ) > > Please use sym->name[0] for readability. Also, you may want to check the > length of the symbol before checking the second character.
Why would the length check be needed? If the first character is $, then looking at the second one is always valid (and it being nul will be properly dealt with by the expression above). Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel