CC: [email protected] TO: "Jordan, Niethe," <[email protected]> CC: Michael Ellerman <[email protected]> CC: Alistair Popple <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 48f99181fc118d82dc8bf6c7221ad1c654cb8bc2 commit: 9409d2f9dad2f0679d67dc24d8116dd3e837b035 [9320/15259] powerpc: Support prefixed instructions in alignment handler :::::: branch date: 13 hours ago :::::: commit date: 2 weeks ago config: powerpc64-randconfig-m031-20200603 (attached as .config) compiler: powerpc-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: arch/powerpc/kernel/traps.c:1627 alignment_exception() warn: bitwise AND condition is false here Old smatch warnings: arch/powerpc/kernel/traps.c:1260 emulate_string_inst() warn: bitwise AND condition is false here # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9409d2f9dad2f0679d67dc24d8116dd3e837b035 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update linux-next git checkout 9409d2f9dad2f0679d67dc24d8116dd3e837b035 vim +1627 arch/powerpc/kernel/traps.c bf593907f7236e Paul Mackerras 2013-06-14 1614 dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1615 void alignment_exception(struct pt_regs *regs) 14cf11af6cf608 Paul Mackerras 2005-09-26 1616 { ba12eedee321ee Li Zhong 2013-05-13 1617 enum ctx_state prev_state = exception_enter(); 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1618 int sig, code, fixed = 0; 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1619 unsigned long reason; 14cf11af6cf608 Paul Mackerras 2005-09-26 1620 a3512b2dd57cb6 Benjamin Herrenschmidt 2012-05-08 1621 /* We restore the interrupt state now */ a3512b2dd57cb6 Benjamin Herrenschmidt 2012-05-08 1622 if (!arch_irq_disabled_regs(regs)) a3512b2dd57cb6 Benjamin Herrenschmidt 2012-05-08 1623 local_irq_enable(); a3512b2dd57cb6 Benjamin Herrenschmidt 2012-05-08 1624 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1625 reason = get_reason(regs); 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1626 9409d2f9dad2f0 Jordan Niethe 2020-05-06 @1627 if (reason & REASON_BOUNDARY) { 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1628 sig = SIGBUS; 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1629 code = BUS_ADRALN; 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1630 goto bad; 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1631 } 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1632 6ce6c629fd8254 Michael Neuling 2013-05-26 1633 if (tm_abort_check(regs, TM_CAUSE_ALIGNMENT | TM_CAUSE_PERSISTENT)) 6ce6c629fd8254 Michael Neuling 2013-05-26 1634 goto bail; 6ce6c629fd8254 Michael Neuling 2013-05-26 1635 e9370ae15dc2f8 Paul Mackerras 2006-06-07 1636 /* we don't implement logging of alignment exceptions */ e9370ae15dc2f8 Paul Mackerras 2006-06-07 1637 if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) 14cf11af6cf608 Paul Mackerras 2005-09-26 1638 fixed = fix_alignment(regs); 14cf11af6cf608 Paul Mackerras 2005-09-26 1639 14cf11af6cf608 Paul Mackerras 2005-09-26 1640 if (fixed == 1) { 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1641 /* skip over emulated instruction */ 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1642 regs->nip += inst_length(reason); 14cf11af6cf608 Paul Mackerras 2005-09-26 1643 emulate_single_step(regs); ba12eedee321ee Li Zhong 2013-05-13 1644 goto bail; 14cf11af6cf608 Paul Mackerras 2005-09-26 1645 } 14cf11af6cf608 Paul Mackerras 2005-09-26 1646 14cf11af6cf608 Paul Mackerras 2005-09-26 1647 /* Operand address was bad */ 14cf11af6cf608 Paul Mackerras 2005-09-26 1648 if (fixed == -EFAULT) { 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1649 sig = SIGSEGV; 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1650 code = SEGV_ACCERR; 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1651 } else { 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1652 sig = SIGBUS; 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1653 code = BUS_ADRALN; 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1654 } 9409d2f9dad2f0 Jordan Niethe 2020-05-06 1655 bad: 14cf11af6cf608 Paul Mackerras 2005-09-26 1656 if (user_mode(regs)) 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1657 _exception(sig, regs, code, regs->dar); 14cf11af6cf608 Paul Mackerras 2005-09-26 1658 else 4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1659 bad_page_fault(regs, regs->dar, sig); ba12eedee321ee Li Zhong 2013-05-13 1660 ba12eedee321ee Li Zhong 2013-05-13 1661 bail: ba12eedee321ee Li Zhong 2013-05-13 1662 exception_exit(prev_state); 14cf11af6cf608 Paul Mackerras 2005-09-26 1663 } 14cf11af6cf608 Paul Mackerras 2005-09-26 1664 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
