* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-11 16:30 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-05-11 16:30 UTC (permalink / raw)
To: Christophe Leroy
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 3387 bytes --]
Hi Christophe,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
date: 3 weeks ago
config: powerpc-randconfig-r033-20210511 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:16:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23749 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-11 16:30 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-05-11 16:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3456 bytes --]
Hi Christophe,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
date: 3 weeks ago
config: powerpc-randconfig-r033-20210511 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:16:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23749 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
2021-05-11 16:30 ` kernel test robot
@ 2021-05-11 16:47 ` Christophe Leroy
-1 siblings, 0 replies; 27+ messages in thread
From: Christophe Leroy @ 2021-05-11 16:47 UTC (permalink / raw)
To: kernel test robot, Nathan Chancellor, Nick Desaulniers
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
Hi All,
Le 11/05/2021 à 18:30, kernel test robot a écrit :
> Hi Christophe,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
> date: 3 weeks ago
> config: powerpc-randconfig-r033-20210511 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
A clang issue ?
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install powerpc cross compiling tool for clang build
> # apt-get install binutils-powerpc-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> ^
> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
That's a 'static inline', shouldn't generate an 'unused function' warning.
> ^
> <scratch space>:16:1: note: expanded from here
> is_kprobe_ppc_optinsn_slot
> ^
> 1 error generated.
>
>
> vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
>
> 51c9c084399352 Anju T 2017-02-08 20
> 51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
> 51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
> 51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
> 51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
> 51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
> 51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
> 51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 33
> 51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> 51c9c084399352 Anju T 2017-02-08 35
>
> :::::: The code at line 34 was first introduced by commit
> :::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
>
> :::::: TO: Anju T <anju@linux.vnet.ibm.com>
> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-11 16:47 ` Christophe Leroy
0 siblings, 0 replies; 27+ messages in thread
From: Christophe Leroy @ 2021-05-11 16:47 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3772 bytes --]
Hi All,
Le 11/05/2021 à 18:30, kernel test robot a écrit :
> Hi Christophe,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
> date: 3 weeks ago
> config: powerpc-randconfig-r033-20210511 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
A clang issue ?
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install powerpc cross compiling tool for clang build
> # apt-get install binutils-powerpc-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> ^
> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
That's a 'static inline', shouldn't generate an 'unused function' warning.
> ^
> <scratch space>:16:1: note: expanded from here
> is_kprobe_ppc_optinsn_slot
> ^
> 1 error generated.
>
>
> vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
>
> 51c9c084399352 Anju T 2017-02-08 20
> 51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
> 51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
> 51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
> 51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
> 51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
> 51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
> 51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
> 51c9c084399352 Anju T 2017-02-08 33
> 51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> 51c9c084399352 Anju T 2017-02-08 35
>
> :::::: The code at line 34 was first introduced by commit
> :::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
>
> :::::: TO: Anju T <anju@linux.vnet.ibm.com>
> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
2021-05-11 16:47 ` Christophe Leroy
@ 2021-05-11 18:46 ` Nathan Chancellor
-1 siblings, 0 replies; 27+ messages in thread
From: Nathan Chancellor @ 2021-05-11 18:46 UTC (permalink / raw)
To: Christophe Leroy, kernel test robot, Nick Desaulniers
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
On 5/11/2021 9:47 AM, Christophe Leroy wrote:
> Hi All,
>
> Le 11/05/2021 à 18:30, kernel test robot a écrit :
>> Hi Christophe,
>>
>> First bad commit (maybe != root cause):
>>
>> tree:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable
>> OPTPROBES on PPC32
>> date: 3 weeks ago
>> config: powerpc-randconfig-r033-20210511 (attached as .config)
>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
>
> A clang issue ?
>
>
>> reproduce (this is a W=1 build):
>> wget
>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
>> -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> # install powerpc cross compiling tool for clang build
>> # apt-get install binutils-powerpc-linux-gnu
>> #
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>
>> git remote add linus
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> git fetch --no-tags linus master
>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>> # save the attached .config to linux build tree
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
>> W=1 ARCH=powerpc
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function
>>>> 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>> ^
>> include/linux/kprobes.h:306:20: note: expanded from macro
>> 'DEFINE_INSN_CACHE_OPS'
>> static inline bool is_kprobe_##__name##_slot(unsigned long
>> addr) \
>
> That's a 'static inline', shouldn't generate an 'unused function' warning.
This is a W=1 build, which means that "inline" does not silence unused
function warnings with clang because of commit 6863f5643dd7 ("kbuild:
allow Clang to find unused static inline functions for W=1 build").
Cheers,
Nathan
>> ^
>> <scratch space>:16:1: note: expanded from here
>> is_kprobe_ppc_optinsn_slot
>> ^
>> 1 error generated.
>>
>>
>> vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
>>
>> 51c9c084399352 Anju T 2017-02-08 20
>> 51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
>> 51c9c084399352 Anju T 2017-02-08 22
>> (optprobe_template_call_handler - optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
>> 51c9c084399352 Anju T 2017-02-08 24
>> (optprobe_template_call_emulate - optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
>> 51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret -
>> optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
>> 51c9c084399352 Anju T 2017-02-08 28
>> (optprobe_template_op_address - optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
>> 51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn -
>> optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
>> 51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end -
>> optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 33
>> 51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>> 51c9c084399352 Anju T 2017-02-08 35
>>
>> :::::: The code at line 34 was first introduced by commit
>> :::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes:
>> Implement Optprobes
>>
>> :::::: TO: Anju T <anju@linux.vnet.ibm.com>
>> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-11 18:46 ` Nathan Chancellor
0 siblings, 0 replies; 27+ messages in thread
From: Nathan Chancellor @ 2021-05-11 18:46 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4485 bytes --]
On 5/11/2021 9:47 AM, Christophe Leroy wrote:
> Hi All,
>
> Le 11/05/2021 à 18:30, kernel test robot a écrit :
>> Hi Christophe,
>>
>> First bad commit (maybe != root cause):
>>
>> tree:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable
>> OPTPROBES on PPC32
>> date: 3 weeks ago
>> config: powerpc-randconfig-r033-20210511 (attached as .config)
>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
>
> A clang issue ?
>
>
>> reproduce (this is a W=1 build):
>> wget
>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
>> -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> # install powerpc cross compiling tool for clang build
>> # apt-get install binutils-powerpc-linux-gnu
>> #
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>
>> git remote add linus
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> git fetch --no-tags linus master
>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>> # save the attached .config to linux build tree
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
>> W=1 ARCH=powerpc
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function
>>>> 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>> ^
>> include/linux/kprobes.h:306:20: note: expanded from macro
>> 'DEFINE_INSN_CACHE_OPS'
>> static inline bool is_kprobe_##__name##_slot(unsigned long
>> addr) \
>
> That's a 'static inline', shouldn't generate an 'unused function' warning.
This is a W=1 build, which means that "inline" does not silence unused
function warnings with clang because of commit 6863f5643dd7 ("kbuild:
allow Clang to find unused static inline functions for W=1 build").
Cheers,
Nathan
>> ^
>> <scratch space>:16:1: note: expanded from here
>> is_kprobe_ppc_optinsn_slot
>> ^
>> 1 error generated.
>>
>>
>> vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
>>
>> 51c9c084399352 Anju T 2017-02-08 20
>> 51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
>> 51c9c084399352 Anju T 2017-02-08 22
>> (optprobe_template_call_handler - optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
>> 51c9c084399352 Anju T 2017-02-08 24
>> (optprobe_template_call_emulate - optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
>> 51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret -
>> optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
>> 51c9c084399352 Anju T 2017-02-08 28
>> (optprobe_template_op_address - optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
>> 51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn -
>> optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
>> 51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end -
>> optprobe_template_entry)
>> 51c9c084399352 Anju T 2017-02-08 33
>> 51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>> 51c9c084399352 Anju T 2017-02-08 35
>>
>> :::::: The code at line 34 was first introduced by commit
>> :::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes:
>> Implement Optprobes
>>
>> :::::: TO: Anju T <anju@linux.vnet.ibm.com>
>> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
2021-05-11 18:46 ` Nathan Chancellor
@ 2021-05-12 9:36 ` Christophe Leroy
-1 siblings, 0 replies; 27+ messages in thread
From: Christophe Leroy @ 2021-05-12 9:36 UTC (permalink / raw)
To: Nathan Chancellor, kernel test robot, Nick Desaulniers
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
>> Hi All,
>>
>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
>>> Hi Christophe,
>>>
>>> First bad commit (maybe != root cause):
>>>
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
>>> date: 3 weeks ago
>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
>>
>> A clang issue ?
>>
>>
>>> reproduce (this is a W=1 build):
>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
>>> ~/bin/make.cross
>>> chmod +x ~/bin/make.cross
>>> # install powerpc cross compiling tool for clang build
>>> # apt-get install binutils-powerpc-linux-gnu
>>> #
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>
>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> git fetch --no-tags linus master
>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>> # save the attached .config to linux build tree
>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
>>>>> [-Werror,-Wunused-function]
>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>> ^
>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
>>
>> That's a 'static inline', shouldn't generate an 'unused function' warning.
> This is a W=1 build, which means that "inline" does not silence unused function warnings with clang
> because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1
> build").
Ok, I didn't know that.
>
> Cheers,
> Nathan
>
>>> ^
>>> <scratch space>:16:1: note: expanded from here
>>> is_kprobe_ppc_optinsn_slot
>>> ^
>>> 1 error generated.
>>>
>>>
>>> vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
>>>
>>> 51c9c084399352 Anju T 2017-02-08 20
>>> 51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 33
>>> 51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>> 51c9c084399352 Anju T 2017-02-08 35
>>>
>>> :::::: The code at line 34 was first introduced by commit
>>> :::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
>>>
>>> :::::: TO: Anju T <anju@linux.vnet.ibm.com>
>>> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>>>
>>> ---
>>> 0-DAY CI Kernel Test Service, Intel Corporation
>>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>>>
>>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-12 9:36 ` Christophe Leroy
0 siblings, 0 replies; 27+ messages in thread
From: Christophe Leroy @ 2021-05-12 9:36 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4777 bytes --]
Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
>> Hi All,
>>
>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
>>> Hi Christophe,
>>>
>>> First bad commit (maybe != root cause):
>>>
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
>>> date: 3 weeks ago
>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
>>
>> A clang issue ?
>>
>>
>>> reproduce (this is a W=1 build):
>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
>>> ~/bin/make.cross
>>> chmod +x ~/bin/make.cross
>>> # install powerpc cross compiling tool for clang build
>>> # apt-get install binutils-powerpc-linux-gnu
>>> #
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>
>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> git fetch --no-tags linus master
>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>> # save the attached .config to linux build tree
>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
>>>>> [-Werror,-Wunused-function]
>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>> ^
>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
>>
>> That's a 'static inline', shouldn't generate an 'unused function' warning.
> This is a W=1 build, which means that "inline" does not silence unused function warnings with clang
> because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1
> build").
Ok, I didn't know that.
>
> Cheers,
> Nathan
>
>>> ^
>>> <scratch space>:16:1: note: expanded from here
>>> is_kprobe_ppc_optinsn_slot
>>> ^
>>> 1 error generated.
>>>
>>>
>>> vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
>>>
>>> 51c9c084399352 Anju T 2017-02-08 20
>>> 51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
>>> 51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
>>> 51c9c084399352 Anju T 2017-02-08 33
>>> 51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>> 51c9c084399352 Anju T 2017-02-08 35
>>>
>>> :::::: The code at line 34 was first introduced by commit
>>> :::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
>>>
>>> :::::: TO: Anju T <anju@linux.vnet.ibm.com>
>>> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>>>
>>> ---
>>> 0-DAY CI Kernel Test Service, Intel Corporation
>>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>>>
>>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
2021-05-12 9:36 ` Christophe Leroy
@ 2021-05-12 9:52 ` Christophe Leroy
-1 siblings, 0 replies; 27+ messages in thread
From: Christophe Leroy @ 2021-05-12 9:52 UTC (permalink / raw)
To: Nathan Chancellor, kernel test robot, Nick Desaulniers,
Masahiro Yamada, Masami Hiramatsu
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
>
>
> Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
>> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
>>> Hi All,
>>>
>>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
>>>> Hi Christophe,
>>>>
>>>> First bad commit (maybe != root cause):
>>>>
>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
>>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
>
> Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
> implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
>
>
>>>> date: 3 weeks ago
>>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
>>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
>>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
>>>
>>> A clang issue ?
>>>
>>>
>>>> reproduce (this is a W=1 build):
>>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
>>>> ~/bin/make.cross
>>>> chmod +x ~/bin/make.cross
>>>> # install powerpc cross compiling tool for clang build
>>>> # apt-get install binutils-powerpc-linux-gnu
>>>> #
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>>
>>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>> git fetch --no-tags linus master
>>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>> # save the attached .config to linux build tree
>>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
>>>>
>>>> If you fix the issue, kindly add following tag as appropriate
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>
>>>> All errors (new ones prefixed by >>):
>>>>
>>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
>>>>>> [-Werror,-Wunused-function]
>>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>>> ^
>>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
>>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
>>>
>>> That's a 'static inline', shouldn't generate an 'unused function' warning.
>> This is a W=1 build, which means that "inline" does not silence unused function warnings with
>> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
>> for W=1 build").
>
> Ok, I didn't know that.
After looking at it in more details, I don't really know what should be done to avoid that.
This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
Solution could be to hide that in a .h, but is that worth it ?
It can't go in asm/kprobes.h because linux/kprobes.h includes asm/kprobes.h before defining
DEFINE_INSN_CACHE_OPS(). So it would mean a dedicated header just for hiding the problem under the
carpet.
>
>>
>> Cheers,
>> Nathan
>>
>>>> ^
>>>> <scratch space>:16:1: note: expanded from here
>>>> is_kprobe_ppc_optinsn_slot
>>>> ^
>>>> 1 error generated.
>>>>
>>>>
>>>> vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
>>>>
>>>> 51c9c084399352 Anju T 2017-02-08 20
>>>> 51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 33
>>>> 51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>>> 51c9c084399352 Anju T 2017-02-08 35
>>>>
>>>> :::::: The code at line 34 was first introduced by commit
>>>> :::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
>>>>
>>>> :::::: TO: Anju T <anju@linux.vnet.ibm.com>
>>>> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>>>>
>>>> ---
>>>> 0-DAY CI Kernel Test Service, Intel Corporation
>>>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>>>>
>>>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-12 9:52 ` Christophe Leroy
0 siblings, 0 replies; 27+ messages in thread
From: Christophe Leroy @ 2021-05-12 9:52 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5491 bytes --]
Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
>
>
> Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
>> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
>>> Hi All,
>>>
>>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
>>>> Hi Christophe,
>>>>
>>>> First bad commit (maybe != root cause):
>>>>
>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
>>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
>
> Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
> implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
>
>
>>>> date: 3 weeks ago
>>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
>>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
>>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
>>>
>>> A clang issue ?
>>>
>>>
>>>> reproduce (this is a W=1 build):
>>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
>>>> ~/bin/make.cross
>>>> chmod +x ~/bin/make.cross
>>>> # install powerpc cross compiling tool for clang build
>>>> # apt-get install binutils-powerpc-linux-gnu
>>>> #
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>>
>>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>> git fetch --no-tags linus master
>>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>> # save the attached .config to linux build tree
>>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
>>>>
>>>> If you fix the issue, kindly add following tag as appropriate
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>
>>>> All errors (new ones prefixed by >>):
>>>>
>>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
>>>>>> [-Werror,-Wunused-function]
>>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>>> ^
>>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
>>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
>>>
>>> That's a 'static inline', shouldn't generate an 'unused function' warning.
>> This is a W=1 build, which means that "inline" does not silence unused function warnings with
>> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
>> for W=1 build").
>
> Ok, I didn't know that.
After looking at it in more details, I don't really know what should be done to avoid that.
This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
Solution could be to hide that in a .h, but is that worth it ?
It can't go in asm/kprobes.h because linux/kprobes.h includes asm/kprobes.h before defining
DEFINE_INSN_CACHE_OPS(). So it would mean a dedicated header just for hiding the problem under the
carpet.
>
>>
>> Cheers,
>> Nathan
>>
>>>> ^
>>>> <scratch space>:16:1: note: expanded from here
>>>> is_kprobe_ppc_optinsn_slot
>>>> ^
>>>> 1 error generated.
>>>>
>>>>
>>>> vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
>>>>
>>>> 51c9c084399352 Anju T 2017-02-08 20
>>>> 51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
>>>> 51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
>>>> 51c9c084399352 Anju T 2017-02-08 33
>>>> 51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>>> 51c9c084399352 Anju T 2017-02-08 35
>>>>
>>>> :::::: The code at line 34 was first introduced by commit
>>>> :::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
>>>>
>>>> :::::: TO: Anju T <anju@linux.vnet.ibm.com>
>>>> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
>>>>
>>>> ---
>>>> 0-DAY CI Kernel Test Service, Intel Corporation
>>>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>>>>
>>>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
2021-05-12 9:52 ` Christophe Leroy
@ 2021-05-12 12:50 ` Masami Hiramatsu
-1 siblings, 0 replies; 27+ messages in thread
From: Masami Hiramatsu @ 2021-05-12 12:50 UTC (permalink / raw)
To: Christophe Leroy
Cc: Nathan Chancellor, kernel test robot, Nick Desaulniers,
Masahiro Yamada, kbuild-all, clang-built-linux, linux-kernel,
Michael Ellerman
On Wed, 12 May 2021 11:52:30 +0200
Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>
>
> Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
> >
> >
> > Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
> >> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
> >>> Hi All,
> >>>
> >>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
> >>>> Hi Christophe,
> >>>>
> >>>> First bad commit (maybe != root cause):
> >>>>
> >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
> >>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
> >
> > Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
> > implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
> >
> >
> >>>> date: 3 weeks ago
> >>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
> >>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
> >>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
> >>>
> >>> A clang issue ?
> >>>
> >>>
> >>>> reproduce (this is a W=1 build):
> >>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> >>>> ~/bin/make.cross
> >>>> chmod +x ~/bin/make.cross
> >>>> # install powerpc cross compiling tool for clang build
> >>>> # apt-get install binutils-powerpc-linux-gnu
> >>>> #
> >>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> >>>>
> >>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >>>> git fetch --no-tags linus master
> >>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> >>>> # save the attached .config to linux build tree
> >>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
> >>>>
> >>>> If you fix the issue, kindly add following tag as appropriate
> >>>> Reported-by: kernel test robot <lkp@intel.com>
> >>>>
> >>>> All errors (new ones prefixed by >>):
> >>>>
> >>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
> >>>>>> [-Werror,-Wunused-function]
> >>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> >>>> ^
> >>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
> >>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
> >>>
> >>> That's a 'static inline', shouldn't generate an 'unused function' warning.
> >> This is a W=1 build, which means that "inline" does not silence unused function warnings with
> >> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
> >> for W=1 build").
> >
> > Ok, I didn't know that.
>
> After looking at it in more details, I don't really know what should be done to avoid that.
Ah, thanks for reporting!
>
> This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
>
> The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
>
> Solution could be to hide that in a .h, but is that worth it ?
The best solution is to remove ppc_optinsn, but that is defined in kernel/kprobes.c
just because page allocation is different.
I think the easiest fix is to add weak alloc_optinsn_page() and override it
in arch/powerpc/kernel/optprobe.c.
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-12 12:50 ` Masami Hiramatsu
0 siblings, 0 replies; 27+ messages in thread
From: Masami Hiramatsu @ 2021-05-12 12:50 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3779 bytes --]
On Wed, 12 May 2021 11:52:30 +0200
Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>
>
> Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
> >
> >
> > Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
> >> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
> >>> Hi All,
> >>>
> >>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
> >>>> Hi Christophe,
> >>>>
> >>>> First bad commit (maybe != root cause):
> >>>>
> >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
> >>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
> >
> > Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
> > implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
> >
> >
> >>>> date: 3 weeks ago
> >>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
> >>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
> >>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
> >>>
> >>> A clang issue ?
> >>>
> >>>
> >>>> reproduce (this is a W=1 build):
> >>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> >>>> ~/bin/make.cross
> >>>> chmod +x ~/bin/make.cross
> >>>> # install powerpc cross compiling tool for clang build
> >>>> # apt-get install binutils-powerpc-linux-gnu
> >>>> #
> >>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> >>>>
> >>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >>>> git fetch --no-tags linus master
> >>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> >>>> # save the attached .config to linux build tree
> >>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
> >>>>
> >>>> If you fix the issue, kindly add following tag as appropriate
> >>>> Reported-by: kernel test robot <lkp@intel.com>
> >>>>
> >>>> All errors (new ones prefixed by >>):
> >>>>
> >>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
> >>>>>> [-Werror,-Wunused-function]
> >>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> >>>> ^
> >>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
> >>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
> >>>
> >>> That's a 'static inline', shouldn't generate an 'unused function' warning.
> >> This is a W=1 build, which means that "inline" does not silence unused function warnings with
> >> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
> >> for W=1 build").
> >
> > Ok, I didn't know that.
>
> After looking at it in more details, I don't really know what should be done to avoid that.
Ah, thanks for reporting!
>
> This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
>
> The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
>
> Solution could be to hide that in a .h, but is that worth it ?
The best solution is to remove ppc_optinsn, but that is defined in kernel/kprobes.c
just because page allocation is different.
I think the easiest fix is to add weak alloc_optinsn_page() and override it
in arch/powerpc/kernel/optprobe.c.
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
2021-05-12 12:50 ` Masami Hiramatsu
@ 2021-05-12 15:06 ` Masami Hiramatsu
-1 siblings, 0 replies; 27+ messages in thread
From: Masami Hiramatsu @ 2021-05-12 15:06 UTC (permalink / raw)
To: Masami Hiramatsu
Cc: Christophe Leroy, Nathan Chancellor, kernel test robot,
Nick Desaulniers, Masahiro Yamada, kbuild-all, clang-built-linux,
linux-kernel, Michael Ellerman
On Wed, 12 May 2021 21:50:57 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Wed, 12 May 2021 11:52:30 +0200
> Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
> >
> > Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
> > >
> > >
> > > Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
> > >> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
> > >>> Hi All,
> > >>>
> > >>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
> > >>>> Hi Christophe,
> > >>>>
> > >>>> First bad commit (maybe != root cause):
> > >>>>
> > >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > >>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
> > >>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
> > >
> > > Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
> > > implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
> > >
> > >
> > >>>> date: 3 weeks ago
> > >>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
> > >>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
> > >>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
> > >>>
> > >>> A clang issue ?
> > >>>
> > >>>
> > >>>> reproduce (this is a W=1 build):
> > >>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> > >>>> ~/bin/make.cross
> > >>>> chmod +x ~/bin/make.cross
> > >>>> # install powerpc cross compiling tool for clang build
> > >>>> # apt-get install binutils-powerpc-linux-gnu
> > >>>> #
> > >>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> > >>>>
> > >>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > >>>> git fetch --no-tags linus master
> > >>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> > >>>> # save the attached .config to linux build tree
> > >>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
> > >>>>
> > >>>> If you fix the issue, kindly add following tag as appropriate
> > >>>> Reported-by: kernel test robot <lkp@intel.com>
> > >>>>
> > >>>> All errors (new ones prefixed by >>):
> > >>>>
> > >>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
> > >>>>>> [-Werror,-Wunused-function]
> > >>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> > >>>> ^
> > >>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
> > >>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
> > >>>
> > >>> That's a 'static inline', shouldn't generate an 'unused function' warning.
> > >> This is a W=1 build, which means that "inline" does not silence unused function warnings with
> > >> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
> > >> for W=1 build").
> > >
> > > Ok, I didn't know that.
> >
> > After looking at it in more details, I don't really know what should be done to avoid that.
>
> Ah, thanks for reporting!
>
> >
> > This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
> >
> > The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
> >
> > Solution could be to hide that in a .h, but is that worth it ?
>
> The best solution is to remove ppc_optinsn, but that is defined in kernel/kprobes.c
> just because page allocation is different.
> I think the easiest fix is to add weak alloc_optinsn_page() and override it
> in arch/powerpc/kernel/optprobe.c.
Please try this patch.
Thank you,
From 7782fa154349923ed52baa8843cc1d5eed26e82d Mon Sep 17 00:00:00 2001
From: Masami Hiramatsu <mhiramat@kernel.org>
Date: Wed, 12 May 2021 23:33:10 +0900
Subject: [PATCH] powerpc/kprobes: Define arch specific optinsn memory
allocation
Define arch specific optinsn memory allocate functions
instead of using arch specific ppc_optinsn_slot.
This fixes the unused function warning on is_kprobe_ppc_optinsn_slot()
when building with W=1 and also this makes kernel_text_address()
works correctly on optinsn page.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
arch/powerpc/kernel/optprobes.c | 24 +++++++-----------------
kernel/kprobes.c | 15 +++++++++++++--
2 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/kernel/optprobes.c b/arch/powerpc/kernel/optprobes.c
index cdf87086fa33..aa017ccbd66e 100644
--- a/arch/powerpc/kernel/optprobes.c
+++ b/arch/powerpc/kernel/optprobes.c
@@ -31,11 +31,10 @@
#define TMPL_END_IDX \
(optprobe_template_end - optprobe_template_entry)
-DEFINE_INSN_CACHE_OPS(ppc_optinsn);
-
static bool insn_page_in_use;
-static void *__ppc_alloc_insn_page(void)
+/* Override optinsn page allocation */
+void *alloc_optinsn_page(void)
{
if (insn_page_in_use)
return NULL;
@@ -43,20 +42,11 @@ static void *__ppc_alloc_insn_page(void)
return &optinsn_slot;
}
-static void __ppc_free_insn_page(void *page __maybe_unused)
+void free_optinsn_page(void *page __maybe_unused)
{
insn_page_in_use = false;
}
-struct kprobe_insn_cache kprobe_ppc_optinsn_slots = {
- .mutex = __MUTEX_INITIALIZER(kprobe_ppc_optinsn_slots.mutex),
- .pages = LIST_HEAD_INIT(kprobe_ppc_optinsn_slots.pages),
- /* insn_size initialized later */
- .alloc = __ppc_alloc_insn_page,
- .free = __ppc_free_insn_page,
- .nr_garbage = 0,
-};
-
/*
* Check if we can optimize this probe. Returns NIP post-emulation if this can
* be optimized and 0 otherwise.
@@ -136,7 +126,7 @@ NOKPROBE_SYMBOL(optimized_callback);
void arch_remove_optimized_kprobe(struct optimized_kprobe *op)
{
if (op->optinsn.insn) {
- free_ppc_optinsn_slot(op->optinsn.insn, 1);
+ free_optinsn_slot(op->optinsn.insn, 1);
op->optinsn.insn = NULL;
}
}
@@ -203,14 +193,14 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
unsigned long nip, size;
int rc, i;
- kprobe_ppc_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
+ kprobe_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
nip = can_optimize(p);
if (!nip)
return -EILSEQ;
/* Allocate instruction slot for detour buffer */
- buff = get_ppc_optinsn_slot();
+ buff = get_optinsn_slot();
if (!buff)
return -ENOMEM;
@@ -297,7 +287,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
return 0;
error:
- free_ppc_optinsn_slot(buff, 0);
+ free_optinsn_slot(buff, 0);
return -ERANGE;
}
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 745f08fdd7a6..251fcb9d6c4c 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -321,11 +321,22 @@ int kprobe_cache_get_kallsym(struct kprobe_insn_cache *c, unsigned int *symnum,
}
#ifdef CONFIG_OPTPROBES
+
+void * __weak alloc_optinsn_page(void)
+{
+ return alloc_insn_page();
+}
+
+void __weak free_optinsn_page(void *page)
+{
+ free_insn_page(page);
+}
+
/* For optimized_kprobe buffer */
struct kprobe_insn_cache kprobe_optinsn_slots = {
.mutex = __MUTEX_INITIALIZER(kprobe_optinsn_slots.mutex),
- .alloc = alloc_insn_page,
- .free = free_insn_page,
+ .alloc = alloc_optinsn_page,
+ .free = free_optinsn_page,
.sym = KPROBE_OPTINSN_PAGE_SYM,
.pages = LIST_HEAD_INIT(kprobe_optinsn_slots.pages),
/* .insn_size is initialized later */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-12 15:06 ` Masami Hiramatsu
0 siblings, 0 replies; 27+ messages in thread
From: Masami Hiramatsu @ 2021-05-12 15:06 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7819 bytes --]
On Wed, 12 May 2021 21:50:57 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Wed, 12 May 2021 11:52:30 +0200
> Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
> >
> > Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
> > >
> > >
> > > Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
> > >> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
> > >>> Hi All,
> > >>>
> > >>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
> > >>>> Hi Christophe,
> > >>>>
> > >>>> First bad commit (maybe != root cause):
> > >>>>
> > >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > >>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
> > >>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
> > >
> > > Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
> > > implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
> > >
> > >
> > >>>> date: 3 weeks ago
> > >>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
> > >>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
> > >>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
> > >>>
> > >>> A clang issue ?
> > >>>
> > >>>
> > >>>> reproduce (this is a W=1 build):
> > >>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> > >>>> ~/bin/make.cross
> > >>>> chmod +x ~/bin/make.cross
> > >>>> # install powerpc cross compiling tool for clang build
> > >>>> # apt-get install binutils-powerpc-linux-gnu
> > >>>> #
> > >>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> > >>>>
> > >>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > >>>> git fetch --no-tags linus master
> > >>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> > >>>> # save the attached .config to linux build tree
> > >>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
> > >>>>
> > >>>> If you fix the issue, kindly add following tag as appropriate
> > >>>> Reported-by: kernel test robot <lkp@intel.com>
> > >>>>
> > >>>> All errors (new ones prefixed by >>):
> > >>>>
> > >>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
> > >>>>>> [-Werror,-Wunused-function]
> > >>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> > >>>> ^
> > >>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
> > >>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
> > >>>
> > >>> That's a 'static inline', shouldn't generate an 'unused function' warning.
> > >> This is a W=1 build, which means that "inline" does not silence unused function warnings with
> > >> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
> > >> for W=1 build").
> > >
> > > Ok, I didn't know that.
> >
> > After looking at it in more details, I don't really know what should be done to avoid that.
>
> Ah, thanks for reporting!
>
> >
> > This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
> >
> > The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
> >
> > Solution could be to hide that in a .h, but is that worth it ?
>
> The best solution is to remove ppc_optinsn, but that is defined in kernel/kprobes.c
> just because page allocation is different.
> I think the easiest fix is to add weak alloc_optinsn_page() and override it
> in arch/powerpc/kernel/optprobe.c.
Please try this patch.
Thank you,
>From 7782fa154349923ed52baa8843cc1d5eed26e82d Mon Sep 17 00:00:00 2001
From: Masami Hiramatsu <mhiramat@kernel.org>
Date: Wed, 12 May 2021 23:33:10 +0900
Subject: [PATCH] powerpc/kprobes: Define arch specific optinsn memory
allocation
Define arch specific optinsn memory allocate functions
instead of using arch specific ppc_optinsn_slot.
This fixes the unused function warning on is_kprobe_ppc_optinsn_slot()
when building with W=1 and also this makes kernel_text_address()
works correctly on optinsn page.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
arch/powerpc/kernel/optprobes.c | 24 +++++++-----------------
kernel/kprobes.c | 15 +++++++++++++--
2 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/kernel/optprobes.c b/arch/powerpc/kernel/optprobes.c
index cdf87086fa33..aa017ccbd66e 100644
--- a/arch/powerpc/kernel/optprobes.c
+++ b/arch/powerpc/kernel/optprobes.c
@@ -31,11 +31,10 @@
#define TMPL_END_IDX \
(optprobe_template_end - optprobe_template_entry)
-DEFINE_INSN_CACHE_OPS(ppc_optinsn);
-
static bool insn_page_in_use;
-static void *__ppc_alloc_insn_page(void)
+/* Override optinsn page allocation */
+void *alloc_optinsn_page(void)
{
if (insn_page_in_use)
return NULL;
@@ -43,20 +42,11 @@ static void *__ppc_alloc_insn_page(void)
return &optinsn_slot;
}
-static void __ppc_free_insn_page(void *page __maybe_unused)
+void free_optinsn_page(void *page __maybe_unused)
{
insn_page_in_use = false;
}
-struct kprobe_insn_cache kprobe_ppc_optinsn_slots = {
- .mutex = __MUTEX_INITIALIZER(kprobe_ppc_optinsn_slots.mutex),
- .pages = LIST_HEAD_INIT(kprobe_ppc_optinsn_slots.pages),
- /* insn_size initialized later */
- .alloc = __ppc_alloc_insn_page,
- .free = __ppc_free_insn_page,
- .nr_garbage = 0,
-};
-
/*
* Check if we can optimize this probe. Returns NIP post-emulation if this can
* be optimized and 0 otherwise.
@@ -136,7 +126,7 @@ NOKPROBE_SYMBOL(optimized_callback);
void arch_remove_optimized_kprobe(struct optimized_kprobe *op)
{
if (op->optinsn.insn) {
- free_ppc_optinsn_slot(op->optinsn.insn, 1);
+ free_optinsn_slot(op->optinsn.insn, 1);
op->optinsn.insn = NULL;
}
}
@@ -203,14 +193,14 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
unsigned long nip, size;
int rc, i;
- kprobe_ppc_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
+ kprobe_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
nip = can_optimize(p);
if (!nip)
return -EILSEQ;
/* Allocate instruction slot for detour buffer */
- buff = get_ppc_optinsn_slot();
+ buff = get_optinsn_slot();
if (!buff)
return -ENOMEM;
@@ -297,7 +287,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
return 0;
error:
- free_ppc_optinsn_slot(buff, 0);
+ free_optinsn_slot(buff, 0);
return -ERANGE;
}
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 745f08fdd7a6..251fcb9d6c4c 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -321,11 +321,22 @@ int kprobe_cache_get_kallsym(struct kprobe_insn_cache *c, unsigned int *symnum,
}
#ifdef CONFIG_OPTPROBES
+
+void * __weak alloc_optinsn_page(void)
+{
+ return alloc_insn_page();
+}
+
+void __weak free_optinsn_page(void *page)
+{
+ free_insn_page(page);
+}
+
/* For optimized_kprobe buffer */
struct kprobe_insn_cache kprobe_optinsn_slots = {
.mutex = __MUTEX_INITIALIZER(kprobe_optinsn_slots.mutex),
- .alloc = alloc_insn_page,
- .free = free_insn_page,
+ .alloc = alloc_optinsn_page,
+ .free = free_optinsn_page,
.sym = KPROBE_OPTINSN_PAGE_SYM,
.pages = LIST_HEAD_INIT(kprobe_optinsn_slots.pages),
/* .insn_size is initialized later */
--
2.25.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
2021-05-12 15:06 ` Masami Hiramatsu
@ 2021-05-12 15:12 ` Christophe Leroy
-1 siblings, 0 replies; 27+ messages in thread
From: Christophe Leroy @ 2021-05-12 15:12 UTC (permalink / raw)
To: Masami Hiramatsu
Cc: Nathan Chancellor, kernel test robot, Nick Desaulniers,
Masahiro Yamada, kbuild-all, clang-built-linux, linux-kernel,
Michael Ellerman
Le 12/05/2021 à 17:06, Masami Hiramatsu a écrit :
> On Wed, 12 May 2021 21:50:57 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
>> On Wed, 12 May 2021 11:52:30 +0200
>> Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>
>>>
>>> Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
>>>>
>>>>
>>>> Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
>>>>> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
>>>>>>> Hi Christophe,
>>>>>>>
>>>>>>> First bad commit (maybe != root cause):
>>>>>>>
>>>>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>>>>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
>>>>>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
>>>>
>>>> Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
>>>> implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
>>>>
>>>>
>>>>>>> date: 3 weeks ago
>>>>>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
>>>>>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
>>>>>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
>>>>>>
>>>>>> A clang issue ?
>>>>>>
>>>>>>
>>>>>>> reproduce (this is a W=1 build):
>>>>>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
>>>>>>> ~/bin/make.cross
>>>>>>> chmod +x ~/bin/make.cross
>>>>>>> # install powerpc cross compiling tool for clang build
>>>>>>> # apt-get install binutils-powerpc-linux-gnu
>>>>>>> #
>>>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>>>>>
>>>>>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>>>>> git fetch --no-tags linus master
>>>>>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>>>>> # save the attached .config to linux build tree
>>>>>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
>>>>>>>
>>>>>>> If you fix the issue, kindly add following tag as appropriate
>>>>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>>>>
>>>>>>> All errors (new ones prefixed by >>):
>>>>>>>
>>>>>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
>>>>>>>>> [-Werror,-Wunused-function]
>>>>>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>>>>>> ^
>>>>>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
>>>>>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
>>>>>>
>>>>>> That's a 'static inline', shouldn't generate an 'unused function' warning.
>>>>> This is a W=1 build, which means that "inline" does not silence unused function warnings with
>>>>> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
>>>>> for W=1 build").
>>>>
>>>> Ok, I didn't know that.
>>>
>>> After looking at it in more details, I don't really know what should be done to avoid that.
>>
>> Ah, thanks for reporting!
>>
>>>
>>> This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
>>>
>>> The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
>>>
>>> Solution could be to hide that in a .h, but is that worth it ?
>>
>> The best solution is to remove ppc_optinsn, but that is defined in kernel/kprobes.c
>> just because page allocation is different.
>> I think the easiest fix is to add weak alloc_optinsn_page() and override it
>> in arch/powerpc/kernel/optprobe.c.
>
> Please try this patch.
>
> Thank you,
Yeah, look pretty similar to the two patches I sent 30 minutes ago.
>
> From 7782fa154349923ed52baa8843cc1d5eed26e82d Mon Sep 17 00:00:00 2001
> From: Masami Hiramatsu <mhiramat@kernel.org>
> Date: Wed, 12 May 2021 23:33:10 +0900
> Subject: [PATCH] powerpc/kprobes: Define arch specific optinsn memory
> allocation
>
> @@ -203,14 +193,14 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
> unsigned long nip, size;
> int rc, i;
>
> - kprobe_ppc_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
> + kprobe_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
Is this still needed ? It looks like it is already done by init_kprobes() in kernel/kprobes.c
>
> nip = can_optimize(p);
> if (!nip)
> return -EILSEQ;
>
> /* Allocate instruction slot for detour buffer */
> - buff = get_ppc_optinsn_slot();
> + buff = get_optinsn_slot();
> if (!buff)
> return -ENOMEM;
>
Christophe
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-12 15:12 ` Christophe Leroy
0 siblings, 0 replies; 27+ messages in thread
From: Christophe Leroy @ 2021-05-12 15:12 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4996 bytes --]
Le 12/05/2021 à 17:06, Masami Hiramatsu a écrit :
> On Wed, 12 May 2021 21:50:57 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
>> On Wed, 12 May 2021 11:52:30 +0200
>> Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>
>>>
>>> Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
>>>>
>>>>
>>>> Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
>>>>> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
>>>>>>> Hi Christophe,
>>>>>>>
>>>>>>> First bad commit (maybe != root cause):
>>>>>>>
>>>>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>>>>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
>>>>>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
>>>>
>>>> Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
>>>> implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
>>>>
>>>>
>>>>>>> date: 3 weeks ago
>>>>>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
>>>>>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
>>>>>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
>>>>>>
>>>>>> A clang issue ?
>>>>>>
>>>>>>
>>>>>>> reproduce (this is a W=1 build):
>>>>>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
>>>>>>> ~/bin/make.cross
>>>>>>> chmod +x ~/bin/make.cross
>>>>>>> # install powerpc cross compiling tool for clang build
>>>>>>> # apt-get install binutils-powerpc-linux-gnu
>>>>>>> #
>>>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>>>>>
>>>>>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>>>>> git fetch --no-tags linus master
>>>>>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
>>>>>>> # save the attached .config to linux build tree
>>>>>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
>>>>>>>
>>>>>>> If you fix the issue, kindly add following tag as appropriate
>>>>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>>>>
>>>>>>> All errors (new ones prefixed by >>):
>>>>>>>
>>>>>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
>>>>>>>>> [-Werror,-Wunused-function]
>>>>>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
>>>>>>> ^
>>>>>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
>>>>>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
>>>>>>
>>>>>> That's a 'static inline', shouldn't generate an 'unused function' warning.
>>>>> This is a W=1 build, which means that "inline" does not silence unused function warnings with
>>>>> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
>>>>> for W=1 build").
>>>>
>>>> Ok, I didn't know that.
>>>
>>> After looking at it in more details, I don't really know what should be done to avoid that.
>>
>> Ah, thanks for reporting!
>>
>>>
>>> This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
>>>
>>> The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
>>>
>>> Solution could be to hide that in a .h, but is that worth it ?
>>
>> The best solution is to remove ppc_optinsn, but that is defined in kernel/kprobes.c
>> just because page allocation is different.
>> I think the easiest fix is to add weak alloc_optinsn_page() and override it
>> in arch/powerpc/kernel/optprobe.c.
>
> Please try this patch.
>
> Thank you,
Yeah, look pretty similar to the two patches I sent 30 minutes ago.
>
> From 7782fa154349923ed52baa8843cc1d5eed26e82d Mon Sep 17 00:00:00 2001
> From: Masami Hiramatsu <mhiramat@kernel.org>
> Date: Wed, 12 May 2021 23:33:10 +0900
> Subject: [PATCH] powerpc/kprobes: Define arch specific optinsn memory
> allocation
>
> @@ -203,14 +193,14 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
> unsigned long nip, size;
> int rc, i;
>
> - kprobe_ppc_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
> + kprobe_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
Is this still needed ? It looks like it is already done by init_kprobes() in kernel/kprobes.c
>
> nip = can_optimize(p);
> if (!nip)
> return -EILSEQ;
>
> /* Allocate instruction slot for detour buffer */
> - buff = get_ppc_optinsn_slot();
> + buff = get_optinsn_slot();
> if (!buff)
> return -ENOMEM;
>
Christophe
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
2021-05-12 15:12 ` Christophe Leroy
@ 2021-05-12 23:42 ` Masami Hiramatsu
-1 siblings, 0 replies; 27+ messages in thread
From: Masami Hiramatsu @ 2021-05-12 23:42 UTC (permalink / raw)
To: Christophe Leroy
Cc: Nathan Chancellor, kernel test robot, Nick Desaulniers,
Masahiro Yamada, kbuild-all, clang-built-linux, linux-kernel,
Michael Ellerman
On Wed, 12 May 2021 17:12:32 +0200
Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>
>
> Le 12/05/2021 à 17:06, Masami Hiramatsu a écrit :
> > On Wed, 12 May 2021 21:50:57 +0900
> > Masami Hiramatsu <mhiramat@kernel.org> wrote:
> >
> >> On Wed, 12 May 2021 11:52:30 +0200
> >> Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
> >
> >>>
> >>> Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
> >>>>
> >>>>
> >>>> Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
> >>>>> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
> >>>>>> Hi All,
> >>>>>>
> >>>>>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
> >>>>>>> Hi Christophe,
> >>>>>>>
> >>>>>>> First bad commit (maybe != root cause):
> >>>>>>>
> >>>>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >>>>>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
> >>>>>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
> >>>>
> >>>> Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
> >>>> implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
> >>>>
> >>>>
> >>>>>>> date: 3 weeks ago
> >>>>>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
> >>>>>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
> >>>>>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
> >>>>>>
> >>>>>> A clang issue ?
> >>>>>>
> >>>>>>
> >>>>>>> reproduce (this is a W=1 build):
> >>>>>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> >>>>>>> ~/bin/make.cross
> >>>>>>> chmod +x ~/bin/make.cross
> >>>>>>> # install powerpc cross compiling tool for clang build
> >>>>>>> # apt-get install binutils-powerpc-linux-gnu
> >>>>>>> #
> >>>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> >>>>>>>
> >>>>>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >>>>>>> git fetch --no-tags linus master
> >>>>>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> >>>>>>> # save the attached .config to linux build tree
> >>>>>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
> >>>>>>>
> >>>>>>> If you fix the issue, kindly add following tag as appropriate
> >>>>>>> Reported-by: kernel test robot <lkp@intel.com>
> >>>>>>>
> >>>>>>> All errors (new ones prefixed by >>):
> >>>>>>>
> >>>>>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
> >>>>>>>>> [-Werror,-Wunused-function]
> >>>>>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> >>>>>>> ^
> >>>>>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
> >>>>>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
> >>>>>>
> >>>>>> That's a 'static inline', shouldn't generate an 'unused function' warning.
> >>>>> This is a W=1 build, which means that "inline" does not silence unused function warnings with
> >>>>> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
> >>>>> for W=1 build").
> >>>>
> >>>> Ok, I didn't know that.
> >>>
> >>> After looking at it in more details, I don't really know what should be done to avoid that.
> >>
> >> Ah, thanks for reporting!
> >>
> >>>
> >>> This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
> >>>
> >>> The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
> >>>
> >>> Solution could be to hide that in a .h, but is that worth it ?
> >>
> >> The best solution is to remove ppc_optinsn, but that is defined in kernel/kprobes.c
> >> just because page allocation is different.
> >> I think the easiest fix is to add weak alloc_optinsn_page() and override it
> >> in arch/powerpc/kernel/optprobe.c.
> >
> > Please try this patch.
> >
> > Thank you,
>
>
> Yeah, look pretty similar to the two patches I sent 30 minutes ago.
Ah, I missed it.
OK, let me check.
>
>
>
> >
> > From 7782fa154349923ed52baa8843cc1d5eed26e82d Mon Sep 17 00:00:00 2001
> > From: Masami Hiramatsu <mhiramat@kernel.org>
> > Date: Wed, 12 May 2021 23:33:10 +0900
> > Subject: [PATCH] powerpc/kprobes: Define arch specific optinsn memory
> > allocation
> >
>
> > @@ -203,14 +193,14 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
> > unsigned long nip, size;
> > int rc, i;
> >
> > - kprobe_ppc_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
> > + kprobe_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
>
> Is this still needed ? It looks like it is already done by init_kprobes() in kernel/kprobes.c
No, not needed anymore.
Thanks!
>
> >
> > nip = can_optimize(p);
> > if (!nip)
> > return -EILSEQ;
> >
> > /* Allocate instruction slot for detour buffer */
> > - buff = get_ppc_optinsn_slot();
> > + buff = get_optinsn_slot();
> > if (!buff)
> > return -ENOMEM;
> >
>
> Christophe
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-05-12 23:42 ` Masami Hiramatsu
0 siblings, 0 replies; 27+ messages in thread
From: Masami Hiramatsu @ 2021-05-12 23:42 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5475 bytes --]
On Wed, 12 May 2021 17:12:32 +0200
Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>
>
> Le 12/05/2021 à 17:06, Masami Hiramatsu a écrit :
> > On Wed, 12 May 2021 21:50:57 +0900
> > Masami Hiramatsu <mhiramat@kernel.org> wrote:
> >
> >> On Wed, 12 May 2021 11:52:30 +0200
> >> Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
> >
> >>>
> >>> Le 12/05/2021 à 11:36, Christophe Leroy a écrit :
> >>>>
> >>>>
> >>>> Le 11/05/2021 à 20:46, Nathan Chancellor a écrit :
> >>>>> On 5/11/2021 9:47 AM, Christophe Leroy wrote:
> >>>>>> Hi All,
> >>>>>>
> >>>>>> Le 11/05/2021 à 18:30, kernel test robot a écrit :
> >>>>>>> Hi Christophe,
> >>>>>>>
> >>>>>>> First bad commit (maybe != root cause):
> >>>>>>>
> >>>>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >>>>>>> head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
> >>>>>>> commit: eacf4c0202654adfa94bbb17b5c5c77c0be14af8 powerpc: Enable OPTPROBES on PPC32
> >>>>
> >>>> Ok, the problem appears on PPC32 with that patch, but it must have been there on PPC64 since the
> >>>> implementation of optprobes with commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
> >>>>
> >>>>
> >>>>>>> date: 3 weeks ago
> >>>>>>> config: powerpc-randconfig-r033-20210511 (attached as .config)
> >>>>>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project
> >>>>>>> a0fed635fe1701470062495a6ffee1c608f3f1bc)
> >>>>>>
> >>>>>> A clang issue ?
> >>>>>>
> >>>>>>
> >>>>>>> reproduce (this is a W=1 build):
> >>>>>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> >>>>>>> ~/bin/make.cross
> >>>>>>> chmod +x ~/bin/make.cross
> >>>>>>> # install powerpc cross compiling tool for clang build
> >>>>>>> # apt-get install binutils-powerpc-linux-gnu
> >>>>>>> #
> >>>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> >>>>>>>
> >>>>>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >>>>>>> git fetch --no-tags linus master
> >>>>>>> git checkout eacf4c0202654adfa94bbb17b5c5c77c0be14af8
> >>>>>>> # save the attached .config to linux build tree
> >>>>>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
> >>>>>>>
> >>>>>>> If you fix the issue, kindly add following tag as appropriate
> >>>>>>> Reported-by: kernel test robot <lkp@intel.com>
> >>>>>>>
> >>>>>>> All errors (new ones prefixed by >>):
> >>>>>>>
> >>>>>>>>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
> >>>>>>>>> [-Werror,-Wunused-function]
> >>>>>>> DEFINE_INSN_CACHE_OPS(ppc_optinsn);
> >>>>>>> ^
> >>>>>>> include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
> >>>>>>> static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
> >>>>>>
> >>>>>> That's a 'static inline', shouldn't generate an 'unused function' warning.
> >>>>> This is a W=1 build, which means that "inline" does not silence unused function warnings with
> >>>>> clang because of commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions
> >>>>> for W=1 build").
> >>>>
> >>>> Ok, I didn't know that.
> >>>
> >>> After looking at it in more details, I don't really know what should be done to avoid that.
> >>
> >> Ah, thanks for reporting!
> >>
> >>>
> >>> This unused function is defined as part of DEFINE_INSN_CACHE_OPS(ppc_optinsn).
> >>>
> >>> The code uses other items defined by macro DEFINE_INSN_CACHE_OPS, so it cannot be removed.
> >>>
> >>> Solution could be to hide that in a .h, but is that worth it ?
> >>
> >> The best solution is to remove ppc_optinsn, but that is defined in kernel/kprobes.c
> >> just because page allocation is different.
> >> I think the easiest fix is to add weak alloc_optinsn_page() and override it
> >> in arch/powerpc/kernel/optprobe.c.
> >
> > Please try this patch.
> >
> > Thank you,
>
>
> Yeah, look pretty similar to the two patches I sent 30 minutes ago.
Ah, I missed it.
OK, let me check.
>
>
>
> >
> > From 7782fa154349923ed52baa8843cc1d5eed26e82d Mon Sep 17 00:00:00 2001
> > From: Masami Hiramatsu <mhiramat@kernel.org>
> > Date: Wed, 12 May 2021 23:33:10 +0900
> > Subject: [PATCH] powerpc/kprobes: Define arch specific optinsn memory
> > allocation
> >
>
> > @@ -203,14 +193,14 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
> > unsigned long nip, size;
> > int rc, i;
> >
> > - kprobe_ppc_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
> > + kprobe_optinsn_slots.insn_size = MAX_OPTINSN_SIZE;
>
> Is this still needed ? It looks like it is already done by init_kprobes() in kernel/kprobes.c
No, not needed anymore.
Thanks!
>
> >
> > nip = can_optimize(p);
> > if (!nip)
> > return -EILSEQ;
> >
> > /* Allocate instruction slot for detour buffer */
> > - buff = get_ppc_optinsn_slot();
> > + buff = get_optinsn_slot();
> > if (!buff)
> > return -ENOMEM;
> >
>
> Christophe
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-04-29 15:33 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-04-29 15:33 UTC (permalink / raw)
To: Cédric Le Goater
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 3412 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d72cd4ad4174cfd2257c426ad51e4f53bcfde9c9
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 3 months ago
config: powerpc64-randconfig-r015-20210429 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9131a078901b00e68248a27a4f8c4b11bb1db1ae)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:132:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34517 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-04-29 15:33 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-04-29 15:33 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3482 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d72cd4ad4174cfd2257c426ad51e4f53bcfde9c9
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 3 months ago
config: powerpc64-randconfig-r015-20210429 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9131a078901b00e68248a27a4f8c4b11bb1db1ae)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:132:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34517 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-04-20 7:43 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-04-20 7:43 UTC (permalink / raw)
To: Cédric Le Goater
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 3412 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7af08140979a6e7e12b78c93b8625c8d25b084e2
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 3 months ago
config: powerpc64-randconfig-r024-20210419 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:115:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35126 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-04-20 7:43 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-04-20 7:43 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3482 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7af08140979a6e7e12b78c93b8625c8d25b084e2
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 3 months ago
config: powerpc64-randconfig-r024-20210419 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:115:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35126 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-03-23 14:06 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-03-23 14:06 UTC (permalink / raw)
To: Cédric Le Goater
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 3398 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 84196390620ac0e5070ae36af84c137c6216a7dc
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 8 weeks ago
config: powerpc-randconfig-r013-20210323 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 78a65cd945d006ff02f9d24d9cc20a302ed93b08)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:95:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 20891 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-03-23 14:06 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-03-23 14:06 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3468 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 84196390620ac0e5070ae36af84c137c6216a7dc
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 8 weeks ago
config: powerpc-randconfig-r013-20210323 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 78a65cd945d006ff02f9d24d9cc20a302ed93b08)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:95:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 20891 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-03-19 17:00 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-03-19 17:00 UTC (permalink / raw)
To: Cédric Le Goater
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 3406 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8b12a62a4e3ed4ae99c715034f557eb391d6b196
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 7 weeks ago
config: powerpc64-randconfig-r003-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:14:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34045 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-03-19 17:00 ` kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-03-19 17:00 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3476 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8b12a62a4e3ed4ae99c715034f557eb391d6b196
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 7 weeks ago
config: powerpc64-randconfig-r003-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:14:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34045 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
@ 2021-03-04 20:34 kernel test robot
0 siblings, 0 replies; 27+ messages in thread
From: kernel test robot @ 2021-03-04 20:34 UTC (permalink / raw)
To: Cédric Le Goater; +Cc: clang-built-linux, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 3406 bytes --]
Hi Cédric,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f69d02e37a85645aa90d18cacfff36dba370f797
commit: bb21e1b6c5352d62d866e9236ed427f632cd537b powerpc/optprobes: Make patch_imm64_load_insns() static
date: 5 weeks ago
config: powerpc64-randconfig-r026-20210304 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project eec7f8f7b1226be422a76542cb403d02538f453a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb21e1b6c5352d62d866e9236ed427f632cd537b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb21e1b6c5352d62d866e9236ed427f632cd537b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' [-Werror,-Wunused-function]
DEFINE_INSN_CACHE_OPS(ppc_optinsn);
^
include/linux/kprobes.h:306:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS'
static inline bool is_kprobe_##__name##_slot(unsigned long addr) \
^
<scratch space>:55:1: note: expanded from here
is_kprobe_ppc_optinsn_slot
^
1 error generated.
vim +/is_kprobe_ppc_optinsn_slot +34 arch/powerpc/kernel/optprobes.c
51c9c084399352 Anju T 2017-02-08 20
51c9c084399352 Anju T 2017-02-08 21 #define TMPL_CALL_HDLR_IDX \
51c9c084399352 Anju T 2017-02-08 22 (optprobe_template_call_handler - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 23 #define TMPL_EMULATE_IDX \
51c9c084399352 Anju T 2017-02-08 24 (optprobe_template_call_emulate - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 25 #define TMPL_RET_IDX \
51c9c084399352 Anju T 2017-02-08 26 (optprobe_template_ret - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 27 #define TMPL_OP_IDX \
51c9c084399352 Anju T 2017-02-08 28 (optprobe_template_op_address - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 29 #define TMPL_INSN_IDX \
51c9c084399352 Anju T 2017-02-08 30 (optprobe_template_insn - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 31 #define TMPL_END_IDX \
51c9c084399352 Anju T 2017-02-08 32 (optprobe_template_end - optprobe_template_entry)
51c9c084399352 Anju T 2017-02-08 33
51c9c084399352 Anju T 2017-02-08 @34 DEFINE_INSN_CACHE_OPS(ppc_optinsn);
51c9c084399352 Anju T 2017-02-08 35
:::::: The code at line 34 was first introduced by commit
:::::: 51c9c0843993528bffc920c54c2121d9e6f8b090 powerpc/kprobes: Implement Optprobes
:::::: TO: Anju T <anju@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36194 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2021-05-12 23:45 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 16:30 arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot' kernel test robot
2021-05-11 16:30 ` kernel test robot
2021-05-11 16:47 ` Christophe Leroy
2021-05-11 16:47 ` Christophe Leroy
2021-05-11 18:46 ` Nathan Chancellor
2021-05-11 18:46 ` Nathan Chancellor
2021-05-12 9:36 ` Christophe Leroy
2021-05-12 9:36 ` Christophe Leroy
2021-05-12 9:52 ` Christophe Leroy
2021-05-12 9:52 ` Christophe Leroy
2021-05-12 12:50 ` Masami Hiramatsu
2021-05-12 12:50 ` Masami Hiramatsu
2021-05-12 15:06 ` Masami Hiramatsu
2021-05-12 15:06 ` Masami Hiramatsu
2021-05-12 15:12 ` Christophe Leroy
2021-05-12 15:12 ` Christophe Leroy
2021-05-12 23:42 ` Masami Hiramatsu
2021-05-12 23:42 ` Masami Hiramatsu
-- strict thread matches above, loose matches on Subject: below --
2021-04-29 15:33 kernel test robot
2021-04-29 15:33 ` kernel test robot
2021-04-20 7:43 kernel test robot
2021-04-20 7:43 ` kernel test robot
2021-03-23 14:06 kernel test robot
2021-03-23 14:06 ` kernel test robot
2021-03-19 17:00 kernel test robot
2021-03-19 17:00 ` kernel test robot
2021-03-04 20:34 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.