From: kernel test robot <lkp@intel.com>
To: Lauri Kasanen <cand@gmx.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: arch/mips/lib/uncached.c:50 run_uncached() warn: always true condition '(sp >= (9223372036854775808 | ((0) << 59) | (0))) => (s64min-s64max >= s64min)'
Date: Thu, 16 Dec 2021 22:15:36 +0800 [thread overview]
Message-ID: <202112162231.WVjq5Lh3-lkp@intel.com> (raw)
Hi Lauri,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2b14864acbaaf03d9c01982e243a84632524c3ac
commit: baec970aa5ba11099ad7a91773350c91fb2113f0 mips: Add N64 machine type
date: 11 months ago
config: mips-randconfig-m031-20211216 (https://download.01.org/0day-ci/archive/20211216/202112162231.WVjq5Lh3-lkp@intel.com/config)
compiler: mips64-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>
New smatch warnings:
arch/mips/lib/uncached.c:50 run_uncached() warn: always true condition '(sp >= (9223372036854775808 | ((0) << 59) | (0))) => (s64min-s64max >= s64min)'
arch/mips/lib/uncached.c:62 run_uncached() warn: always true condition '(lfunc >= (9223372036854775808 | ((0) << 59) | (0))) => (s64min-s64max >= s64min)'
arch/mips/kernel/unaligned.c:347 emulate_load_store_insn() warn: ignoring unreachable code.
arch/mips/kernel/unaligned.c:1136 emulate_load_store_microMIPS() warn: ignoring unreachable code.
arch/mips/kernel/unaligned.c:1402 emulate_load_store_MIPS16e() warn: ignoring unreachable code.
arch/mips/math-emu/dsemul.c:264 mips_dsemul() warn: 'break_math' 33685517 can't fit into 65535 '*(_badinst.halfword[1])'
kernel/bpf/ringbuf.c:334 __bpf_ringbuf_reserve() error: uninitialized symbol 'flags'.
Old smatch warnings:
arch/mips/kernel/unaligned.c:370 emulate_load_store_insn() warn: ignoring unreachable code.
arch/mips/kernel/unaligned.c:433 emulate_load_store_insn() warn: ignoring unreachable code.
arch/mips/kernel/unaligned.c:1158 emulate_load_store_microMIPS() warn: ignoring unreachable code.
arch/mips/kernel/unaligned.c:1200 emulate_load_store_microMIPS() warn: ignoring unreachable code.
arch/mips/kernel/unaligned.c:1426 emulate_load_store_MIPS16e() warn: ignoring unreachable code.
arch/mips/kernel/unaligned.c:1474 emulate_load_store_MIPS16e() warn: ignoring unreachable code.
vim +50 arch/mips/lib/uncached.c
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 22
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 23 /*
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 24 * FUNC is executed in one of the uncached segments, depending on its
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 25 * original address as follows:
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 26 *
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 27 * 1. If the original address is in CKSEG0 or CKSEG1, then the uncached
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 28 * segment used is CKSEG1.
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 29 * 2. If the original address is in XKPHYS, then the uncached segment
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 30 * used is XKPHYS(2).
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 31 * 3. Otherwise it's a bug.
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 32 *
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 33 * The same remapping is done with the stack pointer. Stack handling
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 34 * works because we don't handle stack arguments or more complex return
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 35 * values, so we can avoid sharing the same stack area between a cached
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 36 * and the uncached mode.
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 37 */
078a55fc824c16 Paul Gortmaker 2013-06-18 38 unsigned long run_uncached(void *func)
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 39 {
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 40 register long ret __asm__("$2");
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 41 long lfunc = (long)func, ufunc;
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 42 long usp;
5b058973d32055 Anders Roxell 2020-12-11 43 long sp;
5b058973d32055 Anders Roxell 2020-12-11 44
5b058973d32055 Anders Roxell 2020-12-11 45 __asm__("move %0, $sp" : "=r" (sp));
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 46
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 47 if (sp >= (long)CKSEG0 && sp < (long)CKSEG2)
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 48 usp = CKSEG1ADDR(sp);
c55197eb549dc0 Yoichi Yuasa 2007-02-06 49 #ifdef CONFIG_64BIT
48ef2626aeecac Andrew Sharp 2007-10-31 @50 else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0, 0) &&
48ef2626aeecac Andrew Sharp 2007-10-31 51 (long long)sp < (long long)PHYS_TO_XKPHYS(8, 0))
48ef2626aeecac Andrew Sharp 2007-10-31 52 usp = PHYS_TO_XKPHYS(K_CALG_UNCACHED,
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 53 XKPHYS_TO_PHYS((long long)sp));
c55197eb549dc0 Yoichi Yuasa 2007-02-06 54 #endif
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 55 else {
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 56 BUG();
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 57 usp = sp;
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 58 }
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 59 if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2)
ba5187dbb4b2ea Thiemo Seufer 2005-04-25 60 ufunc = CKSEG1ADDR(lfunc);
c55197eb549dc0 Yoichi Yuasa 2007-02-06 61 #ifdef CONFIG_64BIT
48ef2626aeecac Andrew Sharp 2007-10-31 @62 else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0, 0) &&
:::::: The code at line 50 was first introduced by commit
:::::: 48ef2626aeecac3b160d1aee38ac46d6c3540122 [MIPS] Put cast inside macro instead of all the callers
:::::: TO: Andrew Sharp <andy.sharp@onstor.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2021-12-16 14:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202112162231.WVjq5Lh3-lkp@intel.com \
--to=lkp@intel.com \
--cc=cand@gmx.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®