* [linuxppc:merge-test 618/850] arch/powerpc/kernel/hw_breakpoint.c:735:38: error: variable 'ea' is uninitialized when used here
@ 2021-06-26 15:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-26 15:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 16871 bytes --]
tree: https://github.com/linuxppc/linux merge-test
head: 0f7a719601eb957c10d417c62bd5f65080b5a409
commit: a76a912cfb7e2e0bbb124518bd3a73d3f027e0cf [618/850] Automatic merge of 'master', 'next' and 'fixes' (2020-07-27 23:37)
config: powerpc64-buildonly-randconfig-r006-20210626 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 557b101ce714e39438ba1d39c4c50b03e12fcb96)
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://github.com/linuxppc/linux/commit/a76a912cfb7e2e0bbb124518bd3a73d3f027e0cf
git remote add linuxppc https://github.com/linuxppc/linux
git fetch --no-tags linuxppc merge-test
git checkout a76a912cfb7e2e0bbb124518bd3a73d3f027e0cf
# 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 >>):
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:192:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/hw_breakpoint.c:11:
In file included from include/linux/hw_breakpoint.h:5:
In file included from include/linux/perf_event.h:57:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:194:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/hw_breakpoint.c:11:
In file included from include/linux/hw_breakpoint.h:5:
In file included from include/linux/perf_event.h:57:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:196:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/hw_breakpoint.c:11:
In file included from include/linux/hw_breakpoint.h:5:
In file included from include/linux/perf_event.h:57:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:198:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/hw_breakpoint.c:11:
In file included from include/linux/hw_breakpoint.h:5:
In file included from include/linux/perf_event.h:57:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:200:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> arch/powerpc/kernel/hw_breakpoint.c:735:38: error: variable 'ea' is uninitialized when used here [-Werror,-Wuninitialized]
if (check_constraints(regs, instr, ea, type, size, info[i])) {
^~
arch/powerpc/kernel/hw_breakpoint.c:711:18: note: initialize the variable 'ea' to silence this warning
unsigned long ea;
^
= 0
8 errors generated.
vim +/ea +735 arch/powerpc/kernel/hw_breakpoint.c
658d029df0bce6 Christophe Leroy 2019-06-28 696
03465f899bdac7 Nicholas Piggin 2016-09-16 697 int hw_breakpoint_handler(struct die_args *args)
5aae8a53708025 K.Prasad 2010-06-15 698 {
74c6881019b7d5 Ravi Bangoria 2020-05-14 699 bool err = false;
5aae8a53708025 K.Prasad 2010-06-15 700 int rc = NOTIFY_STOP;
74c6881019b7d5 Ravi Bangoria 2020-05-14 701 struct perf_event *bp[HBP_NUM_MAX] = { NULL };
5aae8a53708025 K.Prasad 2010-06-15 702 struct pt_regs *regs = args->regs;
74c6881019b7d5 Ravi Bangoria 2020-05-14 703 struct arch_hw_breakpoint *info[HBP_NUM_MAX] = { NULL };
74c6881019b7d5 Ravi Bangoria 2020-05-14 704 int i;
74c6881019b7d5 Ravi Bangoria 2020-05-14 705 int hit[HBP_NUM_MAX] = {0};
74c6881019b7d5 Ravi Bangoria 2020-05-14 706 int nr_hit = 0;
74c6881019b7d5 Ravi Bangoria 2020-05-14 707 bool ptrace_bp = false;
74c6881019b7d5 Ravi Bangoria 2020-05-14 708 struct ppc_inst instr = ppc_inst(0);
74c6881019b7d5 Ravi Bangoria 2020-05-14 709 int type = 0;
74c6881019b7d5 Ravi Bangoria 2020-05-14 710 int size = 0;
f6780ce619f8da Ravi Bangoria 2020-07-23 711 unsigned long ea;
5aae8a53708025 K.Prasad 2010-06-15 712
5aae8a53708025 K.Prasad 2010-06-15 713 /* Disable breakpoints during exception handling */
9422de3e953d0e Michael Neuling 2012-12-20 714 hw_breakpoint_disable();
574cb24899d35e Paul Mackerras 2010-06-23 715
5aae8a53708025 K.Prasad 2010-06-15 716 /*
5aae8a53708025 K.Prasad 2010-06-15 717 * The counter may be concurrently released but that can only
5aae8a53708025 K.Prasad 2010-06-15 718 * occur from a call_rcu() path. We can then safely fetch
5aae8a53708025 K.Prasad 2010-06-15 719 * the breakpoint, use its callback, touch its counter
5aae8a53708025 K.Prasad 2010-06-15 720 * while we are in an rcu_read_lock() path.
5aae8a53708025 K.Prasad 2010-06-15 721 */
5aae8a53708025 K.Prasad 2010-06-15 722 rcu_read_lock();
5aae8a53708025 K.Prasad 2010-06-15 723
74c6881019b7d5 Ravi Bangoria 2020-05-14 724 if (!IS_ENABLED(CONFIG_PPC_8xx))
f6780ce619f8da Ravi Bangoria 2020-07-23 725 get_instr_detail(regs, &instr, &type, &size, &ea);
74c6881019b7d5 Ravi Bangoria 2020-05-14 726
74c6881019b7d5 Ravi Bangoria 2020-05-14 727 for (i = 0; i < nr_wp_slots(); i++) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 728 bp[i] = __this_cpu_read(bp_per_reg[i]);
74c6881019b7d5 Ravi Bangoria 2020-05-14 729 if (!bp[i])
74c6881019b7d5 Ravi Bangoria 2020-05-14 730 continue;
74c6881019b7d5 Ravi Bangoria 2020-05-14 731
74c6881019b7d5 Ravi Bangoria 2020-05-14 732 info[i] = counter_arch_bp(bp[i]);
74c6881019b7d5 Ravi Bangoria 2020-05-14 733 info[i]->type &= ~HW_BRK_TYPE_EXTRANEOUS_IRQ;
74c6881019b7d5 Ravi Bangoria 2020-05-14 734
f6780ce619f8da Ravi Bangoria 2020-07-23 @735 if (check_constraints(regs, instr, ea, type, size, info[i])) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 736 if (!IS_ENABLED(CONFIG_PPC_8xx) &&
74c6881019b7d5 Ravi Bangoria 2020-05-14 737 ppc_inst_equal(instr, ppc_inst(0))) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 738 handler_error(bp[i], info[i]);
74c6881019b7d5 Ravi Bangoria 2020-05-14 739 info[i] = NULL;
74c6881019b7d5 Ravi Bangoria 2020-05-14 740 err = 1;
74c6881019b7d5 Ravi Bangoria 2020-05-14 741 continue;
74c6881019b7d5 Ravi Bangoria 2020-05-14 742 }
74c6881019b7d5 Ravi Bangoria 2020-05-14 743
74c6881019b7d5 Ravi Bangoria 2020-05-14 744 if (is_ptrace_bp(bp[i]))
74c6881019b7d5 Ravi Bangoria 2020-05-14 745 ptrace_bp = true;
74c6881019b7d5 Ravi Bangoria 2020-05-14 746 hit[i] = 1;
74c6881019b7d5 Ravi Bangoria 2020-05-14 747 nr_hit++;
74c6881019b7d5 Ravi Bangoria 2020-05-14 748 }
74c6881019b7d5 Ravi Bangoria 2020-05-14 749 }
74c6881019b7d5 Ravi Bangoria 2020-05-14 750
74c6881019b7d5 Ravi Bangoria 2020-05-14 751 if (err)
74c6881019b7d5 Ravi Bangoria 2020-05-14 752 goto reset;
74c6881019b7d5 Ravi Bangoria 2020-05-14 753
74c6881019b7d5 Ravi Bangoria 2020-05-14 754 if (!nr_hit) {
c21a493a2b4465 Ravi Bangoria 2016-11-22 755 rc = NOTIFY_DONE;
5aae8a53708025 K.Prasad 2010-06-15 756 goto out;
c21a493a2b4465 Ravi Bangoria 2016-11-22 757 }
5aae8a53708025 K.Prasad 2010-06-15 758
5aae8a53708025 K.Prasad 2010-06-15 759 /*
5aae8a53708025 K.Prasad 2010-06-15 760 * Return early after invoking user-callback function without restoring
5aae8a53708025 K.Prasad 2010-06-15 761 * DABR if the breakpoint is from ptrace which always operates in
5aae8a53708025 K.Prasad 2010-06-15 762 * one-shot mode. The ptrace-ed process will receive the SIGTRAP signal
5aae8a53708025 K.Prasad 2010-06-15 763 * generated in do_dabr().
5aae8a53708025 K.Prasad 2010-06-15 764 */
74c6881019b7d5 Ravi Bangoria 2020-05-14 765 if (ptrace_bp) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 766 for (i = 0; i < nr_wp_slots(); i++) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 767 if (!hit[i])
74c6881019b7d5 Ravi Bangoria 2020-05-14 768 continue;
74c6881019b7d5 Ravi Bangoria 2020-05-14 769 perf_bp_event(bp[i], regs);
74c6881019b7d5 Ravi Bangoria 2020-05-14 770 info[i] = NULL;
74c6881019b7d5 Ravi Bangoria 2020-05-14 771 }
5aae8a53708025 K.Prasad 2010-06-15 772 rc = NOTIFY_DONE;
74c6881019b7d5 Ravi Bangoria 2020-05-14 773 goto reset;
5aae8a53708025 K.Prasad 2010-06-15 774 }
5aae8a53708025 K.Prasad 2010-06-15 775
74c6881019b7d5 Ravi Bangoria 2020-05-14 776 if (!IS_ENABLED(CONFIG_PPC_8xx)) {
f6780ce619f8da Ravi Bangoria 2020-07-23 777 if (is_larx_stcx_instr(type)) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 778 for (i = 0; i < nr_wp_slots(); i++) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 779 if (!hit[i])
74c6881019b7d5 Ravi Bangoria 2020-05-14 780 continue;
74c6881019b7d5 Ravi Bangoria 2020-05-14 781 larx_stcx_err(bp[i], info[i]);
74c6881019b7d5 Ravi Bangoria 2020-05-14 782 info[i] = NULL;
74c6881019b7d5 Ravi Bangoria 2020-05-14 783 }
74c6881019b7d5 Ravi Bangoria 2020-05-14 784 goto reset;
74c6881019b7d5 Ravi Bangoria 2020-05-14 785 }
74c6881019b7d5 Ravi Bangoria 2020-05-14 786
74c6881019b7d5 Ravi Bangoria 2020-05-14 787 if (!stepping_handler(regs, bp, info, hit, instr))
74c6881019b7d5 Ravi Bangoria 2020-05-14 788 goto reset;
e08658a657f974 Ravi Bangoria 2020-02-22 789 }
5aae8a53708025 K.Prasad 2010-06-15 790
5aae8a53708025 K.Prasad 2010-06-15 791 /*
5aae8a53708025 K.Prasad 2010-06-15 792 * As a policy, the callback is invoked in a 'trigger-after-execute'
5aae8a53708025 K.Prasad 2010-06-15 793 * fashion
5aae8a53708025 K.Prasad 2010-06-15 794 */
74c6881019b7d5 Ravi Bangoria 2020-05-14 795 for (i = 0; i < nr_wp_slots(); i++) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 796 if (!hit[i])
74c6881019b7d5 Ravi Bangoria 2020-05-14 797 continue;
74c6881019b7d5 Ravi Bangoria 2020-05-14 798 if (!(info[i]->type & HW_BRK_TYPE_EXTRANEOUS_IRQ))
74c6881019b7d5 Ravi Bangoria 2020-05-14 799 perf_bp_event(bp[i], regs);
74c6881019b7d5 Ravi Bangoria 2020-05-14 800 }
74c6881019b7d5 Ravi Bangoria 2020-05-14 801
74c6881019b7d5 Ravi Bangoria 2020-05-14 802 reset:
74c6881019b7d5 Ravi Bangoria 2020-05-14 803 for (i = 0; i < nr_wp_slots(); i++) {
74c6881019b7d5 Ravi Bangoria 2020-05-14 804 if (!info[i])
74c6881019b7d5 Ravi Bangoria 2020-05-14 805 continue;
74c6881019b7d5 Ravi Bangoria 2020-05-14 806 __set_breakpoint(i, info[i]);
74c6881019b7d5 Ravi Bangoria 2020-05-14 807 }
5aae8a53708025 K.Prasad 2010-06-15 808
5aae8a53708025 K.Prasad 2010-06-15 809 out:
5aae8a53708025 K.Prasad 2010-06-15 810 rcu_read_unlock();
5aae8a53708025 K.Prasad 2010-06-15 811 return rc;
5aae8a53708025 K.Prasad 2010-06-15 812 }
03465f899bdac7 Nicholas Piggin 2016-09-16 813 NOKPROBE_SYMBOL(hw_breakpoint_handler);
5aae8a53708025 K.Prasad 2010-06-15 814
:::::: The code@line 735 was first introduced by commit
:::::: f6780ce619f8daa285760302d56e95892087bd1f powerpc/watchpoint: Fix DAWR exception constraint
:::::: TO: Ravi Bangoria <ravi.bangoria@linux.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: 22022 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-26 15:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-26 15:19 [linuxppc:merge-test 618/850] arch/powerpc/kernel/hw_breakpoint.c:735:38: error: variable 'ea' is uninitialized when used here 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.