From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: arch/powerpc/kernel/traps.c:1631 ____alignment_exception() warn: bitwise AND condition is false here
Date: Thu, 04 Nov 2021 18:08:20 +0800 [thread overview]
Message-ID: <202111041852.jtq1ZuhD-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5361 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Nicholas Piggin <npiggin@gmail.com>
CC: Michael Ellerman <mpe@ellerman.id.au>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7ddb58cb0ecae8e8b6181d736a87667cc9ab8389
commit: 3a96570ffceb15c6ed9cc6f990f172dcdc8ac279 powerpc: convert interrupt handlers to use wrappers
date: 9 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 9 months ago
config: powerpc-randconfig-m031-20211104 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
arch/powerpc/kernel/traps.c:1631 ____alignment_exception() warn: bitwise AND condition is false here
Old smatch warnings:
arch/powerpc/kernel/traps.c:1254 emulate_string_inst() warn: bitwise AND condition is false here
vim +1631 arch/powerpc/kernel/traps.c
bf593907f7236e Paul Mackerras 2013-06-14 1618
3a96570ffceb15 Nicholas Piggin 2021-01-30 1619 DEFINE_INTERRUPT_HANDLER(alignment_exception)
14cf11af6cf608 Paul Mackerras 2005-09-26 1620 {
ba12eedee321ee Li Zhong 2013-05-13 1621 enum ctx_state prev_state = exception_enter();
4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1622 int sig, code, fixed = 0;
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1623 unsigned long reason;
14cf11af6cf608 Paul Mackerras 2005-09-26 1624
a3512b2dd57cb6 Benjamin Herrenschmidt 2012-05-08 1625 /* We restore the interrupt state now */
a3512b2dd57cb6 Benjamin Herrenschmidt 2012-05-08 1626 if (!arch_irq_disabled_regs(regs))
a3512b2dd57cb6 Benjamin Herrenschmidt 2012-05-08 1627 local_irq_enable();
a3512b2dd57cb6 Benjamin Herrenschmidt 2012-05-08 1628
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1629 reason = get_reason(regs);
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1630
9409d2f9dad2f0 Jordan Niethe 2020-05-06 @1631 if (reason & REASON_BOUNDARY) {
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1632 sig = SIGBUS;
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1633 code = BUS_ADRALN;
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1634 goto bad;
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1635 }
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1636
6ce6c629fd8254 Michael Neuling 2013-05-26 1637 if (tm_abort_check(regs, TM_CAUSE_ALIGNMENT | TM_CAUSE_PERSISTENT))
6ce6c629fd8254 Michael Neuling 2013-05-26 1638 goto bail;
6ce6c629fd8254 Michael Neuling 2013-05-26 1639
e9370ae15dc2f8 Paul Mackerras 2006-06-07 1640 /* we don't implement logging of alignment exceptions */
e9370ae15dc2f8 Paul Mackerras 2006-06-07 1641 if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS))
14cf11af6cf608 Paul Mackerras 2005-09-26 1642 fixed = fix_alignment(regs);
14cf11af6cf608 Paul Mackerras 2005-09-26 1643
14cf11af6cf608 Paul Mackerras 2005-09-26 1644 if (fixed == 1) {
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1645 /* skip over emulated instruction */
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1646 regs->nip += inst_length(reason);
14cf11af6cf608 Paul Mackerras 2005-09-26 1647 emulate_single_step(regs);
ba12eedee321ee Li Zhong 2013-05-13 1648 goto bail;
14cf11af6cf608 Paul Mackerras 2005-09-26 1649 }
14cf11af6cf608 Paul Mackerras 2005-09-26 1650
14cf11af6cf608 Paul Mackerras 2005-09-26 1651 /* Operand address was bad */
14cf11af6cf608 Paul Mackerras 2005-09-26 1652 if (fixed == -EFAULT) {
4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1653 sig = SIGSEGV;
4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1654 code = SEGV_ACCERR;
4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1655 } else {
4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1656 sig = SIGBUS;
4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1657 code = BUS_ADRALN;
4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1658 }
9409d2f9dad2f0 Jordan Niethe 2020-05-06 1659 bad:
14cf11af6cf608 Paul Mackerras 2005-09-26 1660 if (user_mode(regs))
4393c4f6788cee Benjamin Herrenschmidt 2006-11-01 1661 _exception(sig, regs, code, regs->dar);
14cf11af6cf608 Paul Mackerras 2005-09-26 1662 else
8458c628a53ba4 Nicholas Piggin 2021-01-30 1663 bad_page_fault(regs, sig);
ba12eedee321ee Li Zhong 2013-05-13 1664
ba12eedee321ee Li Zhong 2013-05-13 1665 bail:
ba12eedee321ee Li Zhong 2013-05-13 1666 exception_exit(prev_state);
14cf11af6cf608 Paul Mackerras 2005-09-26 1667 }
14cf11af6cf608 Paul Mackerras 2005-09-26 1668
:::::: The code at line 1631 was first introduced by commit
:::::: 9409d2f9dad2f0679d67dc24d8116dd3e837b035 powerpc: Support prefixed instructions in alignment handler
:::::: TO: Jordan Niethe <jniethe5@gmail.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: 33840 bytes --]
next reply other threads:[~2021-11-04 10:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 10:08 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-19 7:52 arch/powerpc/kernel/traps.c:1631 ____alignment_exception() warn: bitwise AND condition is false here kernel test robot
2021-11-13 19:43 kernel test robot
2021-11-11 6:13 kernel test robot
2021-07-28 20:15 kernel test robot
2021-05-04 21:35 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202111041852.jtq1ZuhD-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.