* [arm64:for-next/ghostbusters 15/19] arch/arm64/kernel/proton-pack.c:558:13: warning: no previous prototype for function 'spectre_v4_patch_fw_mitigation_enable'
@ 2020-09-25 17:22 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-09-25 17:22 UTC (permalink / raw)
To: Will Deacon; +Cc: clang-built-linux, kbuild-all, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 5484 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/ghostbusters
head: 9a313c5d65a5f10ddf605022e9220e52946326f0
commit: 9dedd646da95640f41d6d8d523011ec44b26c4d7 [15/19] arm64: Rewrite Spectre-v4 mitigation code
config: arm64-randconfig-r023-20200920 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6a6b06f5262bb96523eceef4a42fe8e60ae2a630)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=9dedd646da95640f41d6d8d523011ec44b26c4d7
git remote add arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
git fetch --no-tags arm64 for-next/ghostbusters
git checkout 9dedd646da95640f41d6d8d523011ec44b26c4d7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/arm64/kernel/proton-pack.c:288:2: error: implicit declaration of function 'install_bp_hardening_cb' [-Werror,-Wimplicit-function-declaration]
install_bp_hardening_cb(cb);
^
arch/arm64/kernel/proton-pack.c:304:2: error: implicit declaration of function 'install_bp_hardening_cb' [-Werror,-Wimplicit-function-declaration]
install_bp_hardening_cb(qcom_link_stack_sanitisation);
^
>> arch/arm64/kernel/proton-pack.c:558:13: warning: no previous prototype for function 'spectre_v4_patch_fw_mitigation_enable' [-Wmissing-prototypes]
void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
^
arch/arm64/kernel/proton-pack.c:558:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
^
static
>> arch/arm64/kernel/proton-pack.c:578:13: warning: no previous prototype for function 'spectre_v4_patch_fw_mitigation_conduit' [-Wmissing-prototypes]
void __init spectre_v4_patch_fw_mitigation_conduit(struct alt_instr *alt,
^
arch/arm64/kernel/proton-pack.c:578:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init spectre_v4_patch_fw_mitigation_conduit(struct alt_instr *alt,
^
static
arch/arm64/kernel/proton-pack.c:646:25: error: implicit declaration of function 'task_stack_page' [-Werror,-Wimplicit-function-declaration]
struct pt_regs *regs = task_pt_regs(tsk);
^
arch/arm64/include/asm/processor.h:253:36: note: expanded from macro 'task_pt_regs'
((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
^
arch/arm64/kernel/proton-pack.c:646:25: note: did you mean 'task_spread_page'?
arch/arm64/include/asm/processor.h:253:36: note: expanded from macro 'task_pt_regs'
((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
^
include/linux/sched.h:1585:1: note: 'task_spread_page' declared here
TASK_PFA_TEST(SPREAD_PAGE, spread_page)
^
include/linux/sched.h:1571:21: note: expanded from macro 'TASK_PFA_TEST'
static inline bool task_##func(struct task_struct *p) \
^
<scratch space>:51:1: note: expanded from here
task_spread_page
^
2 warnings and 3 errors generated.
vim +/spectre_v4_patch_fw_mitigation_enable +558 arch/arm64/kernel/proton-pack.c
553
554 /*
555 * Patch a branch over the Spectre-v4 mitigation code with a NOP so that
556 * we fallthrough and check whether firmware needs to be called on this CPU.
557 */
> 558 void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
559 __le32 *origptr,
560 __le32 *updptr, int nr_inst)
561 {
562 BUG_ON(nr_inst != 1); /* Branch -> NOP */
563
564 if (spectre_v4_mitigations_off())
565 return;
566
567 if (cpus_have_final_cap(ARM64_SSBS))
568 return;
569
570 if (spectre_v4_mitigations_dynamic())
571 *updptr = cpu_to_le32(aarch64_insn_gen_nop());
572 }
573
574 /*
575 * Patch a NOP in the Spectre-v4 mitigation code with an SMC/HVC instruction
576 * to call into firmware to adjust the mitigation state.
577 */
> 578 void __init spectre_v4_patch_fw_mitigation_conduit(struct alt_instr *alt,
579 __le32 *origptr,
580 __le32 *updptr, int nr_inst)
581 {
582 u32 insn;
583
584 BUG_ON(nr_inst != 1); /* NOP -> HVC/SMC */
585
586 switch (arm_smccc_1_1_get_conduit()) {
587 case SMCCC_CONDUIT_HVC:
588 insn = aarch64_insn_get_hvc_value();
589 break;
590 case SMCCC_CONDUIT_SMC:
591 insn = aarch64_insn_get_smc_value();
592 break;
593 default:
594 return;
595 }
596
597 *updptr = cpu_to_le32(insn);
598 }
599
---
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: 46968 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [arm64:for-next/ghostbusters 15/19] arch/arm64/kernel/proton-pack.c:558:13: warning: no previous prototype for function 'spectre_v4_patch_fw_mitigation_enable'
@ 2020-09-25 17:22 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-09-25 17:22 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5602 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/ghostbusters
head: 9a313c5d65a5f10ddf605022e9220e52946326f0
commit: 9dedd646da95640f41d6d8d523011ec44b26c4d7 [15/19] arm64: Rewrite Spectre-v4 mitigation code
config: arm64-randconfig-r023-20200920 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6a6b06f5262bb96523eceef4a42fe8e60ae2a630)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=9dedd646da95640f41d6d8d523011ec44b26c4d7
git remote add arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
git fetch --no-tags arm64 for-next/ghostbusters
git checkout 9dedd646da95640f41d6d8d523011ec44b26c4d7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/arm64/kernel/proton-pack.c:288:2: error: implicit declaration of function 'install_bp_hardening_cb' [-Werror,-Wimplicit-function-declaration]
install_bp_hardening_cb(cb);
^
arch/arm64/kernel/proton-pack.c:304:2: error: implicit declaration of function 'install_bp_hardening_cb' [-Werror,-Wimplicit-function-declaration]
install_bp_hardening_cb(qcom_link_stack_sanitisation);
^
>> arch/arm64/kernel/proton-pack.c:558:13: warning: no previous prototype for function 'spectre_v4_patch_fw_mitigation_enable' [-Wmissing-prototypes]
void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
^
arch/arm64/kernel/proton-pack.c:558:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
^
static
>> arch/arm64/kernel/proton-pack.c:578:13: warning: no previous prototype for function 'spectre_v4_patch_fw_mitigation_conduit' [-Wmissing-prototypes]
void __init spectre_v4_patch_fw_mitigation_conduit(struct alt_instr *alt,
^
arch/arm64/kernel/proton-pack.c:578:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init spectre_v4_patch_fw_mitigation_conduit(struct alt_instr *alt,
^
static
arch/arm64/kernel/proton-pack.c:646:25: error: implicit declaration of function 'task_stack_page' [-Werror,-Wimplicit-function-declaration]
struct pt_regs *regs = task_pt_regs(tsk);
^
arch/arm64/include/asm/processor.h:253:36: note: expanded from macro 'task_pt_regs'
((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
^
arch/arm64/kernel/proton-pack.c:646:25: note: did you mean 'task_spread_page'?
arch/arm64/include/asm/processor.h:253:36: note: expanded from macro 'task_pt_regs'
((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
^
include/linux/sched.h:1585:1: note: 'task_spread_page' declared here
TASK_PFA_TEST(SPREAD_PAGE, spread_page)
^
include/linux/sched.h:1571:21: note: expanded from macro 'TASK_PFA_TEST'
static inline bool task_##func(struct task_struct *p) \
^
<scratch space>:51:1: note: expanded from here
task_spread_page
^
2 warnings and 3 errors generated.
vim +/spectre_v4_patch_fw_mitigation_enable +558 arch/arm64/kernel/proton-pack.c
553
554 /*
555 * Patch a branch over the Spectre-v4 mitigation code with a NOP so that
556 * we fallthrough and check whether firmware needs to be called on this CPU.
557 */
> 558 void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
559 __le32 *origptr,
560 __le32 *updptr, int nr_inst)
561 {
562 BUG_ON(nr_inst != 1); /* Branch -> NOP */
563
564 if (spectre_v4_mitigations_off())
565 return;
566
567 if (cpus_have_final_cap(ARM64_SSBS))
568 return;
569
570 if (spectre_v4_mitigations_dynamic())
571 *updptr = cpu_to_le32(aarch64_insn_gen_nop());
572 }
573
574 /*
575 * Patch a NOP in the Spectre-v4 mitigation code with an SMC/HVC instruction
576 * to call into firmware to adjust the mitigation state.
577 */
> 578 void __init spectre_v4_patch_fw_mitigation_conduit(struct alt_instr *alt,
579 __le32 *origptr,
580 __le32 *updptr, int nr_inst)
581 {
582 u32 insn;
583
584 BUG_ON(nr_inst != 1); /* NOP -> HVC/SMC */
585
586 switch (arm_smccc_1_1_get_conduit()) {
587 case SMCCC_CONDUIT_HVC:
588 insn = aarch64_insn_get_hvc_value();
589 break;
590 case SMCCC_CONDUIT_SMC:
591 insn = aarch64_insn_get_smc_value();
592 break;
593 default:
594 return;
595 }
596
597 *updptr = cpu_to_le32(insn);
598 }
599
---
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: 46968 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-25 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 17:22 [arm64:for-next/ghostbusters 15/19] arch/arm64/kernel/proton-pack.c:558:13: warning: no previous prototype for function 'spectre_v4_patch_fw_mitigation_enable' kernel test robot
2020-09-25 17:22 ` 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.