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


Groups > linux.kernel > #1317734

Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2)

From Miroslav Benes <mbenes@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2)
Date 2016-01-26 12:00 +0100
Message-ID <qV9vP-2Vi-9@gated-at.bofh.it> (permalink)
References <qUSOm-7cE-23@gated-at.bofh.it> <qUSOq-7cE-83@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[ added Petr to CC list ]

On Mon, 25 Jan 2016, Torsten Duwe wrote:

>   * create the appropriate files+functions
>     arch/powerpc/include/asm/livepatch.h
>         klp_check_compiler_support,
>         klp_arch_set_pc
>     arch/powerpc/kernel/livepatch.c with a stub for
>         klp_write_module_reloc
>     This is architecture-independent work in progress.
>   * introduce a fixup in arch/powerpc/kernel/entry_64.S
>     for local calls that are becoming global due to live patching.
>     And of course do the main KLP thing: return to a maybe different
>     address, possibly altered by the live patching ftrace op.
> 
> Signed-off-by: Torsten Duwe <duwe@suse.de>

Hi,

I have a few questions...

We still need Petr's patch from [1] to make livepatch work, right? Could 
you, please, add it to this patch set to make it self-sufficient?

Second, what is the situation with mcount prologue between gcc < 6 and 
gcc-6? Are there only 12 bytes in gcc-6 prologue? If yes, we need to 
change Petr's patch to make it more general and to be able to cope with 
different prologues. This is unfortunate. Either way, please mention it 
somewhere in a changelog.

I haven't reviewed the patch properly yet, but there is a comment below.

[1] http://lkml.kernel.org/g/20151203160004.GE8047@pathway.suse.cz

> +/**
> + * klp_write_module_reloc() - write a relocation in a module
> + * @mod:       module in which the section to be modified is found
> + * @type:      ELF relocation type (see asm/elf.h)
> + * @loc:       address that the relocation should be written to
> + * @value:     relocation value (sym address + addend)
> + *
> + * This function writes a relocation to the specified location for
> + * a particular module.
> + */
> +int klp_write_module_reloc(struct module *mod, unsigned long type,
> +			    unsigned long loc, unsigned long value)
> +{
> +	/* This requires infrastructure changes; we need the loadinfos. */
> +	pr_err("lpc_write_module_reloc not yet supported\n");

This is a nit, but there is no lpc_write_module_reloc. It should be 
klp_write_module_reloc.

Thanks,
Miroslav

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-01-25 18:10 +0100
  [PATCH v6 5/9] ppc64 ftrace_with_regs: spare early boot and low level Torsten Duwe <duwe@lst.de> - 2016-01-25 18:10 +0100
  [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2) Torsten Duwe <duwe@lst.de> - 2016-01-25 18:10 +0100
    Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le  (ABIv2) Miroslav Benes <mbenes@suse.cz> - 2016-01-26 12:00 +0100
      Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2) Petr Mladek <pmladek@suse.com> - 2016-01-26 13:50 +0100
        Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le  (ABIv2) Torsten Duwe <duwe@lst.de> - 2016-01-26 15:00 +0100
      Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le  (ABIv2) Torsten Duwe <duwe@lst.de> - 2016-01-26 15:10 +0100
        Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le  (ABIv2) Miroslav Benes <mbenes@suse.cz> - 2016-01-26 15:20 +0100
          Re: Implement kernel live patching for ppc64le (ABIv2) Jessica Yu <jeyu@redhat.com> - 2016-01-27 03:00 +0100
  [PATCH v6 2/9] ppc64le FTRACE_WITH_REGS implementation Torsten Duwe <duwe@lst.de> - 2016-01-25 18:10 +0100
  [PATCH v6 7/9] ppc64 ftrace: disable profiling for some files Torsten Duwe <duwe@lst.de> - 2016-01-25 18:20 +0100
  Re: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Balbir Singh <bsingharora@gmail.com> - 2016-01-27 12:00 +0100
    Re: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-01-27 13:20 +0100

csiph-web