diff mbox

[7/7] arm: Add livepatch necessary arch selects into Kconfig

Message ID 1481043967-15602-8-git-send-email-abelvesa@linux.com (mailing list archive)
State New, archived
Headers show

Commit Message

Abel Vesa Dec. 6, 2016, 5:06 p.m. UTC
This adds HAVE_LIVEPATCH, MODULES_USE_ELF_RELA and HAVE_LIVEPATCH
to arm Kconfig.

Signed-off-by: Abel Vesa <abelvesa@linux.com>
---
 arch/arm/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Steven Rostedt Dec. 7, 2016, 2:45 a.m. UTC | #1
On Tue,  6 Dec 2016 17:06:07 +0000
Abel Vesa <abelvesa@linux.com> wrote:

> This adds HAVE_LIVEPATCH, MODULES_USE_ELF_RELA and HAVE_LIVEPATCH
> to arm Kconfig.
> 
> Signed-off-by: Abel Vesa <abelvesa@linux.com>

Patch 5, 6 and 7 really ought to be one patch.

-- Steve
kernel test robot Dec. 7, 2016, 6:48 a.m. UTC | #2
Hi Abel,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.9-rc8 next-20161206]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Abel-Vesa/arm-Add-livepatch-support/20161207-074210
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All warnings (new ones prefixed by >>):

   arch/arm/kernel/entry-ftrace.S: Assembler messages:
>> arch/arm/kernel/entry-ftrace.S:259: Warning: if writeback register is in list, it must be the lowest reg in the list
>> arch/arm/kernel/entry-ftrace.S:259: Warning: writeback of base register when in register list is UNPREDICTABLE

vim +259 arch/arm/kernel/entry-ftrace.S

82112379 Russell King 2014-10-28  243  #else
82112379 Russell King 2014-10-28  244  	__mcount
82112379 Russell King 2014-10-28  245  #endif
82112379 Russell King 2014-10-28  246  UNWIND(.fnend)
82112379 Russell King 2014-10-28  247  ENDPROC(__gnu_mcount_nc)
82112379 Russell King 2014-10-28  248  
82112379 Russell King 2014-10-28  249  #ifdef CONFIG_DYNAMIC_FTRACE
82112379 Russell King 2014-10-28  250  ENTRY(ftrace_caller)
82112379 Russell King 2014-10-28  251  UNWIND(.fnstart)
82112379 Russell King 2014-10-28  252  	__ftrace_caller
82112379 Russell King 2014-10-28  253  UNWIND(.fnend)
82112379 Russell King 2014-10-28  254  ENDPROC(ftrace_caller)
22cc202f Abel Vesa    2016-12-06  255  
22cc202f Abel Vesa    2016-12-06  256  #ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
22cc202f Abel Vesa    2016-12-06  257  ENTRY(ftrace_regs_caller)
22cc202f Abel Vesa    2016-12-06  258  UNWIND(.fnstart)
22cc202f Abel Vesa    2016-12-06 @259  	__ftrace_regs_caller
22cc202f Abel Vesa    2016-12-06  260  UNWIND(.fnend)
22cc202f Abel Vesa    2016-12-06  261  ENDPROC(ftrace_regs_caller)
22cc202f Abel Vesa    2016-12-06  262  #endif
22cc202f Abel Vesa    2016-12-06  263  
82112379 Russell King 2014-10-28  264  #endif
82112379 Russell King 2014-10-28  265  
82112379 Russell King 2014-10-28  266  #ifdef CONFIG_FUNCTION_GRAPH_TRACER
82112379 Russell King 2014-10-28  267  ENTRY(ftrace_graph_caller)

:::::: The code at line 259 was first introduced by commit
:::::: 22cc202f6f168f6987ec2441a19ce1601a296a4e arm: Add ftrace with regs support

:::::: TO: Abel Vesa <abelvesa@linux.com>
:::::: CC: 0day robot <fengguang.wu@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Miroslav Benes Jan. 18, 2017, 12:40 p.m. UTC | #3
On Tue, 6 Dec 2016, Abel Vesa wrote:

> This adds HAVE_LIVEPATCH, MODULES_USE_ELF_RELA and HAVE_LIVEPATCH
> to arm Kconfig.
> 
> Signed-off-by: Abel Vesa <abelvesa@linux.com>
> ---
>  arch/arm/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 186c4c2..f4e9ace 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -50,6 +50,7 @@ config ARM
>  	select HAVE_DMA_API_DEBUG
>  	select HAVE_DMA_CONTIGUOUS if MMU
>  	select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) && !CPU_ENDIAN_BE32 && MMU
> +	select HAVE_DYNAMIC_FTRACE_WITH_REGS
>  	select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
>  	select HAVE_EXIT_THREAD
>  	select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
> @@ -67,6 +68,7 @@ config ARM
>  	select HAVE_KERNEL_XZ
>  	select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M
>  	select HAVE_KRETPROBES if (HAVE_KPROBES)
> +	select HAVE_LIVEPATCH
>  	select HAVE_MEMBLOCK
>  	select HAVE_MOD_ARCH_SPECIFIC
>  	select HAVE_NMI
> @@ -82,6 +84,7 @@ config ARM
>  	select HAVE_VIRT_CPU_ACCOUNTING_GEN
>  	select IRQ_FORCED_THREADING
>  	select MODULES_USE_ELF_REL
> +	select MODULES_USE_ELF_RELA

I wrote it before but I think you cannot have both MODULES_USE_ELF_REL and 
MODULES_USE_ELF_RELA.

Miroslav
Russell King (Oracle) Jan. 18, 2017, 1:35 p.m. UTC | #4
On Wed, Jan 18, 2017 at 01:40:23PM +0100, Miroslav Benes wrote:
> On Tue, 6 Dec 2016, Abel Vesa wrote:
> > @@ -82,6 +84,7 @@ config ARM
> >  	select HAVE_VIRT_CPU_ACCOUNTING_GEN
> >  	select IRQ_FORCED_THREADING
> >  	select MODULES_USE_ELF_REL
> > +	select MODULES_USE_ELF_RELA
> 
> I wrote it before but I think you cannot have both MODULES_USE_ELF_REL and 
> MODULES_USE_ELF_RELA.

ARM doesn't use RELA relocations, so it's pointless enabling them.
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 186c4c2..f4e9ace 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -50,6 +50,7 @@  config ARM
 	select HAVE_DMA_API_DEBUG
 	select HAVE_DMA_CONTIGUOUS if MMU
 	select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) && !CPU_ENDIAN_BE32 && MMU
+	select HAVE_DYNAMIC_FTRACE_WITH_REGS
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
 	select HAVE_EXIT_THREAD
 	select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
@@ -67,6 +68,7 @@  config ARM
 	select HAVE_KERNEL_XZ
 	select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M
 	select HAVE_KRETPROBES if (HAVE_KPROBES)
+	select HAVE_LIVEPATCH
 	select HAVE_MEMBLOCK
 	select HAVE_MOD_ARCH_SPECIFIC
 	select HAVE_NMI
@@ -82,6 +84,7 @@  config ARM
 	select HAVE_VIRT_CPU_ACCOUNTING_GEN
 	select IRQ_FORCED_THREADING
 	select MODULES_USE_ELF_REL
+	select MODULES_USE_ELF_RELA
 	select NO_BOOTMEM
 	select OF_EARLY_FLATTREE if OF
 	select OF_RESERVED_MEM if OF
@@ -1841,6 +1844,7 @@  config XEN
 	help
 	  Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.
 
+source "kernel/livepatch/Kconfig"
 endmenu
 
 menu "Boot options"