Re: [PATCH v2 2/8] powerpc/module: Only try to generate the ftrace_caller() stub once

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

 



On Mon, Feb 29, 2016 at 08:26:23PM +1100, Michael Ellerman wrote:
[...]
> diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
> index 2c01665eb410..dd095496d225 100644
> --- a/arch/powerpc/kernel/module_32.c
> +++ b/arch/powerpc/kernel/module_32.c
> @@ -294,11 +294,19 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
>  			return -ENOEXEC;
>  		}
>  	}
> +
> +	return 0;
> +}
> +
>  #ifdef CONFIG_DYNAMIC_FTRACE
> -	module->arch.tramp =
> -		do_plt_call(module->core_layout.base,
> -			    (unsigned long)ftrace_caller,
> -			    sechdrs, module);
> -#endif
> +int module_finalize_ftrace(struct module *module, const Elf_Shdr *sechdrs)
> +{
> +	module->arch.tramp = do_plt_call(module->core_layout.base,
> +					 (unsigned long)ftrace_caller,
> +					 sechdrs, module);
> +	if (!mod->arch.tramp)

That should probably read (!module->arch.tramp).

> +		return -ENOENT;
> +
>  	return 0;
>  }
> +#endif
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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