Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1331285 > unrolled thread

Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

Started byPetr Mladek <pmladek@suse.com>
First post2016-02-10 17:00 +0100
Last post2016-02-10 17:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH v4 2/6] module: preserve Elf information for  livepatch modules Petr Mladek <pmladek@suse.com> - 2016-02-10 17:00 +0100

#1331285 — Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

FromPetr Mladek <pmladek@suse.com>
Date2016-02-10 17:00 +0100
SubjectRe: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules
Message-ID<r0Flo-45R-5@gated-at.bofh.it>
On Wed 2016-02-03 20:11:07, Jessica Yu wrote:
> diff --git a/kernel/module.c b/kernel/module.c
> index 71c77ed..9c16eb2 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -2676,6 +2764,23 @@ static int copy_module_from_user(const void __user *umod, unsigned long len,
>  	return 0;
>  }
>  
> +#ifdef CONFIG_LIVEPATCH
> +static int find_livepatch_modinfo(struct module *mod, struct load_info *info)
> +{
> +	mod->klp = get_modinfo(info, "livepatch") ? true : false;
> +
> +	return 0;
> +}
> +#else /* !CONFIG_LIVEPATCH */
> +static int find_livepatch_modinfo(struct module *mod, struct load_info *info)
> +{
> +	if (get_modinfo(info, "livepatch"))

One more thing. I suggest to write a friendly message here. For example:

	pr_err("LifePatch support is not available. Rejecting the module: s\n",
	       mod->name);

It might safe some debugging a poor user or developer.

> +		return -ENOEXEC;
> +
> +	return 0;
> +}
> +#endif /* CONFIG_LIVEPATCH */
> +

Best Regards,
Petr

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web