Re: [PATCH v4 6/9] arm64: rethook: Add arm64 rethook implementation
by kernel test robot
Hi Masami,
I love your patch! Yet something to improve:
[auto build test ERROR on rostedt-trace/for-next]
[also build test ERROR on arm64/for-next/core tip/x86/core linus/master v5.17-rc1 next-20220124]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/fprobe-Introduc...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: arm64-randconfig-r033-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250403.5YnZvb4K-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/981b0378461c912ba2d7b10412dd6fe21...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Masami-Hiramatsu/fprobe-Introduce-fprobe-function-entry-exit-probe/20220125-001253
git checkout 981b0378461c912ba2d7b10412dd6fe21c316055
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm64/kernel/stacktrace.c: In function 'unwind_frame':
>> arch/arm64/kernel/stacktrace.c:141:73: error: 'struct stackframe' has no member named 'kr_cur'
141 | frame->pc = rethook_find_ret_addr(tsk, frame->fp, &frame->kr_cur);
| ^~
vim +141 arch/arm64/kernel/stacktrace.c
59
60 /*
61 * Unwind from one frame record (A) to the next frame record (B).
62 *
63 * We terminate early if the location of B indicates a malformed chain of frame
64 * records (e.g. a cycle), determined based on the location and fp value of A
65 * and the location (but not the fp value) of B.
66 */
67 int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
68 {
69 unsigned long fp = frame->fp;
70 struct stack_info info;
71
72 if (!tsk)
73 tsk = current;
74
75 /* Final frame; nothing to unwind */
76 if (fp == (unsigned long)task_pt_regs(tsk)->stackframe)
77 return -ENOENT;
78
79 if (fp & 0x7)
80 return -EINVAL;
81
82 if (!on_accessible_stack(tsk, fp, 16, &info))
83 return -EINVAL;
84
85 if (test_bit(info.type, frame->stacks_done))
86 return -EINVAL;
87
88 /*
89 * As stacks grow downward, any valid record on the same stack must be
90 * at a strictly higher address than the prior record.
91 *
92 * Stacks can nest in several valid orders, e.g.
93 *
94 * TASK -> IRQ -> OVERFLOW -> SDEI_NORMAL
95 * TASK -> SDEI_NORMAL -> SDEI_CRITICAL -> OVERFLOW
96 *
97 * ... but the nesting itself is strict. Once we transition from one
98 * stack to another, it's never valid to unwind back to that first
99 * stack.
100 */
101 if (info.type == frame->prev_type) {
102 if (fp <= frame->prev_fp)
103 return -EINVAL;
104 } else {
105 set_bit(frame->prev_type, frame->stacks_done);
106 }
107
108 /*
109 * Record this frame record's values and location. The prev_fp and
110 * prev_type are only meaningful to the next unwind_frame() invocation.
111 */
112 frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp));
113 frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 8));
114 frame->prev_fp = fp;
115 frame->prev_type = info.type;
116
117 frame->pc = ptrauth_strip_insn_pac(frame->pc);
118
119 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
120 if (tsk->ret_stack &&
121 (frame->pc == (unsigned long)return_to_handler)) {
122 unsigned long orig_pc;
123 /*
124 * This is a case where function graph tracer has
125 * modified a return address (LR) in a stack frame
126 * to hook a function return.
127 * So replace it to an original value.
128 */
129 orig_pc = ftrace_graph_ret_addr(tsk, NULL, frame->pc,
130 (void *)frame->fp);
131 if (WARN_ON_ONCE(frame->pc == orig_pc))
132 return -EINVAL;
133 frame->pc = orig_pc;
134 }
135 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
136 #ifdef CONFIG_KRETPROBES
137 if (is_kretprobe_trampoline(frame->pc))
138 frame->pc = kretprobe_find_ret_addr(tsk, (void *)frame->fp, &frame->kr_cur);
139 #endif
140 if (IS_ENABLED(CONFIG_RETHOOK) && is_rethook_trampoline(frame->pc))
> 141 frame->pc = rethook_find_ret_addr(tsk, frame->fp, &frame->kr_cur);
142
143 return 0;
144 }
145 NOKPROBE_SYMBOL(unwind_frame);
146
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
【三井住友カード】の一時利用停止は解除されました [メールコード SM54]
by 三井住友銀行
【三井住友カード】利用いただき、ありがとうございます。
このたび、ご本人様のご利用かどうかを確認させていただきたいお取引がありましたので、誠に勝手ながら、カードのご利用を一部制限させていただき、ご連絡させていただきました。
つきましては、以下へアクセスの上、カードのご利用確認にご協力をお願い致します。
お客様にはご迷惑、ご心配をお掛けし、誠に申し訳ございません。
何卒ご理解いただきたくお願い申しあげます。
ご回答をいただけない場合、カードのご利用制限が継続されることもございますので、予めご了承下さい。
■ご利用確認はこちら
ご不便とご心配をおかけしまして誠に申し訳ございませんが、
何とぞご理解賜りたくお願い申しあげます。
──────────────────────────────────
三井住友カード株式会社
━━━━━━━━━━━━━━━
■発行者■
三井住友カード株式会社
※本メールは送信専用です。
※本メールは「Vpass」にメールアドレスをご登録いただいた方にお送りしています。
━━━━━━━━━━━━━━━
[メールコード SM95651575]
7 months, 4 weeks
[mingo-tip:sched/headers 1750/2384] arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h:38:27: warning: declaration of 'struct net_device' will not be visible outside of this function
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: 665097d414cd5e34cf1c21585efc611205ab1efa [1750/2384] headers/deps: net: Optimize <linux/if_ether.h>
config: mips-bcm63xx_defconfig (https://download.01.org/0day-ci/archive/20220125/202201250317.7RaTIwIn-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2e58a18910867ba6795066e044293e6daf89edf5)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 665097d414cd5e34cf1c21585efc611205ab1efa
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/ kernel//
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/mips/bcm63xx/dev-enet.c:16:
>> arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h:38:27: warning: declaration of 'struct net_device' will not be visible outside of this function [-Wvisibility]
int (*mii_config)(struct net_device *dev, int probe,
^
1 warning generated.
vim +38 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
3dc6475c0c9e55 Florian Fainelli 2013-06-12 9
e7300d04bd0809 Maxime Bizon 2009-08-18 10 /*
e7300d04bd0809 Maxime Bizon 2009-08-18 11 * on board ethernet platform data
e7300d04bd0809 Maxime Bizon 2009-08-18 12 */
e7300d04bd0809 Maxime Bizon 2009-08-18 13 struct bcm63xx_enet_platform_data {
e7300d04bd0809 Maxime Bizon 2009-08-18 14 char mac_addr[ETH_ALEN];
e7300d04bd0809 Maxime Bizon 2009-08-18 15
e7300d04bd0809 Maxime Bizon 2009-08-18 16 int has_phy;
e7300d04bd0809 Maxime Bizon 2009-08-18 17
e7300d04bd0809 Maxime Bizon 2009-08-18 18 /* if has_phy, then set use_internal_phy */
e7300d04bd0809 Maxime Bizon 2009-08-18 19 int use_internal_phy;
e7300d04bd0809 Maxime Bizon 2009-08-18 20
e7300d04bd0809 Maxime Bizon 2009-08-18 21 /* or fill phy info to use an external one */
e7300d04bd0809 Maxime Bizon 2009-08-18 22 int phy_id;
e7300d04bd0809 Maxime Bizon 2009-08-18 23 int has_phy_interrupt;
e7300d04bd0809 Maxime Bizon 2009-08-18 24 int phy_interrupt;
e7300d04bd0809 Maxime Bizon 2009-08-18 25
e904b94a06c77a Andrea Gelmini 2016-05-21 26 /* if has_phy, use autonegotiated pause parameters or force
e7300d04bd0809 Maxime Bizon 2009-08-18 27 * them */
e7300d04bd0809 Maxime Bizon 2009-08-18 28 int pause_auto;
e7300d04bd0809 Maxime Bizon 2009-08-18 29 int pause_rx;
e7300d04bd0809 Maxime Bizon 2009-08-18 30 int pause_tx;
e7300d04bd0809 Maxime Bizon 2009-08-18 31
e7300d04bd0809 Maxime Bizon 2009-08-18 32 /* if !has_phy, set desired forced speed/duplex */
e7300d04bd0809 Maxime Bizon 2009-08-18 33 int force_speed_100;
e7300d04bd0809 Maxime Bizon 2009-08-18 34 int force_duplex_full;
e7300d04bd0809 Maxime Bizon 2009-08-18 35
e7300d04bd0809 Maxime Bizon 2009-08-18 36 /* if !has_phy, set callback to perform mii device
e7300d04bd0809 Maxime Bizon 2009-08-18 37 * init/remove */
e7300d04bd0809 Maxime Bizon 2009-08-18 @38 int (*mii_config)(struct net_device *dev, int probe,
e7300d04bd0809 Maxime Bizon 2009-08-18 39 int (*mii_read)(struct net_device *dev,
e7300d04bd0809 Maxime Bizon 2009-08-18 40 int phy_id, int reg),
e7300d04bd0809 Maxime Bizon 2009-08-18 41 void (*mii_write)(struct net_device *dev,
e7300d04bd0809 Maxime Bizon 2009-08-18 42 int phy_id, int reg, int val));
3dc6475c0c9e55 Florian Fainelli 2013-06-12 43
3dc6475c0c9e55 Florian Fainelli 2013-06-12 44 /* DMA channel enable mask */
3dc6475c0c9e55 Florian Fainelli 2013-06-12 45 u32 dma_chan_en_mask;
3dc6475c0c9e55 Florian Fainelli 2013-06-12 46
3dc6475c0c9e55 Florian Fainelli 2013-06-12 47 /* DMA channel interrupt mask */
3dc6475c0c9e55 Florian Fainelli 2013-06-12 48 u32 dma_chan_int_mask;
3dc6475c0c9e55 Florian Fainelli 2013-06-12 49
3dc6475c0c9e55 Florian Fainelli 2013-06-12 50 /* DMA engine has internal SRAM */
3dc6475c0c9e55 Florian Fainelli 2013-06-12 51 bool dma_has_sram;
3dc6475c0c9e55 Florian Fainelli 2013-06-12 52
3dc6475c0c9e55 Florian Fainelli 2013-06-12 53 /* DMA channel register width */
3dc6475c0c9e55 Florian Fainelli 2013-06-12 54 unsigned int dma_chan_width;
3dc6475c0c9e55 Florian Fainelli 2013-06-12 55
3dc6475c0c9e55 Florian Fainelli 2013-06-12 56 /* DMA descriptor shift */
3dc6475c0c9e55 Florian Fainelli 2013-06-12 57 unsigned int dma_desc_shift;
1942e482258d8c Jonas Gorski 2017-12-17 58
1942e482258d8c Jonas Gorski 2017-12-17 59 /* dma channel ids */
1942e482258d8c Jonas Gorski 2017-12-17 60 int rx_chan;
1942e482258d8c Jonas Gorski 2017-12-17 61 int tx_chan;
e7300d04bd0809 Maxime Bizon 2009-08-18 62 };
e7300d04bd0809 Maxime Bizon 2009-08-18 63
:::::: The code at line 38 was first introduced by commit
:::::: e7300d04bd0809eb7ea10a2ed8c729459f816e36 MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.
:::::: TO: Maxime Bizon <mbizon(a)freebox.fr>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
Re: [PATCH v4 5/9] ARM: rethook: Add rethook arm implementation
by kernel test robot
Hi Masami,
I love your patch! Yet something to improve:
[auto build test ERROR on rostedt-trace/for-next]
[also build test ERROR on arm64/for-next/core tip/x86/core linus/master v5.17-rc1 next-20220124]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/fprobe-Introduc...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: arm-aspeed_g5_defconfig (https://download.01.org/0day-ci/archive/20220125/202201250328.drn6ia3n-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/df6df88bb474db78d80fc5619d39b25ec...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Masami-Hiramatsu/fprobe-Introduce-fprobe-function-entry-exit-probe/20220125-001253
git checkout df6df88bb474db78d80fc5619d39b25ec15d5d16
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm/kernel/stacktrace.c: In function 'unwind_frame':
>> arch/arm/kernel/stacktrace.c:71:56: error: 'struct stackframe' has no member named 'tsk'
71 | frame->pc = rethook_find_ret_addr(frame->tsk, frame->fp,
| ^~
>> arch/arm/kernel/stacktrace.c:72:57: error: 'struct stackframe' has no member named 'kr_cur'
72 | &frame->kr_cur);
| ^~
vim +71 arch/arm/kernel/stacktrace.c
12
13 #if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
14 /*
15 * Unwind the current stack frame and store the new register values in the
16 * structure passed as argument. Unwinding is equivalent to a function return,
17 * hence the new PC value rather than LR should be used for backtrace.
18 *
19 * With framepointer enabled, a simple function prologue looks like this:
20 * mov ip, sp
21 * stmdb sp!, {fp, ip, lr, pc}
22 * sub fp, ip, #4
23 *
24 * A simple function epilogue looks like this:
25 * ldm sp, {fp, sp, pc}
26 *
27 * When compiled with clang, pc and sp are not pushed. A simple function
28 * prologue looks like this when built with clang:
29 *
30 * stmdb {..., fp, lr}
31 * add fp, sp, #x
32 * sub sp, sp, #y
33 *
34 * A simple function epilogue looks like this when built with clang:
35 *
36 * sub sp, fp, #x
37 * ldm {..., fp, pc}
38 *
39 *
40 * Note that with framepointer enabled, even the leaf functions have the same
41 * prologue and epilogue, therefore we can ignore the LR value in this case.
42 */
43 int notrace unwind_frame(struct stackframe *frame)
44 {
45 unsigned long high, low;
46 unsigned long fp = frame->fp;
47
48 /* only go to a higher address on the stack */
49 low = frame->sp;
50 high = ALIGN(low, THREAD_SIZE);
51
52 #ifdef CONFIG_CC_IS_CLANG
53 /* check current frame pointer is within bounds */
54 if (fp < low + 4 || fp > high - 4)
55 return -EINVAL;
56
57 frame->sp = frame->fp;
58 frame->fp = *(unsigned long *)(fp);
59 frame->pc = *(unsigned long *)(fp + 4);
60 #else
61 /* check current frame pointer is within bounds */
62 if (fp < low + 12 || fp > high - 4)
63 return -EINVAL;
64
65 /* restore the registers from the stack frame */
66 frame->fp = *(unsigned long *)(fp - 12);
67 frame->sp = *(unsigned long *)(fp - 8);
68 frame->pc = *(unsigned long *)(fp - 4);
69 #endif
70 if (IS_ENABLED(CONFIG_RETHOOK) && is_rethook_trampoline(frame->pc))
> 71 frame->pc = rethook_find_ret_addr(frame->tsk, frame->fp,
> 72 &frame->kr_cur);
73 #ifdef CONFIG_KRETPROBES
74 if (is_kretprobe_trampoline(frame->pc))
75 frame->pc = kretprobe_find_ret_addr(frame->tsk,
76 (void *)frame->fp, &frame->kr_cur);
77 #endif
78
79 return 0;
80 }
81 #endif
82
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
[esmil:visionfive 59/63] drivers/soc/sifive/sifive_l2_cache.c:148:19: warning: result of comparison of constant 36507222016 with expression of type 'unsigned long' is always false
by kernel test robot
tree: https://github.com/esmil/linux visionfive
head: fdbe623707a8f3f9b9d2cb3c4c240299a12b8302
commit: c17f07c367229d46348e9005d004d8b3416637bc [59/63] RISC-V: Enable SIFIVE_L2_FLUSH for StarFive SoCs
config: riscv-randconfig-r015-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250206.q2ugUJBE-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7b3d30728816403d1fd73cc5082e9fb761262bce)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/esmil/linux/commit/c17f07c367229d46348e9005d004d8b3416...
git remote add esmil https://github.com/esmil/linux
git fetch --no-tags esmil visionfive
git checkout c17f07c367229d46348e9005d004d8b3416637bc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/soc/sifive/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/soc/sifive/sifive_l2_cache.c:158:3: error: implicit declaration of function 'writeq' [-Werror,-Wimplicit-function-declaration]
writeq(line, l2_base + SIFIVE_L2_FLUSH64);
^
>> drivers/soc/sifive/sifive_l2_cache.c:148:19: warning: result of comparison of constant 36507222016 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
(start + len) > (CONFIG_SIFIVE_L2_FLUSH_START +
~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +148 drivers/soc/sifive/sifive_l2_cache.c
a967a289f16969 arch/riscv/mm/sifive_l2_cache.c Yash Shah 2019-05-06 126
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 127 #ifdef CONFIG_SIFIVE_L2_FLUSH
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 128 void sifive_l2_flush64_range(unsigned long start, unsigned long len)
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 129 {
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 130 unsigned long line;
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 131
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 132 if(!l2_base) {
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 133 pr_warn("L2CACHE: base addr invalid, skipping flush\n");
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 134 return;
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 135 }
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 136
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 137 /* TODO: if (len == 0), skipping flush or going on? */
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 138 if(!len) {
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 139 pr_debug("L2CACHE: flush64 range @ 0x%lx(len:0)\n", start);
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 140 return;
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 141 }
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 142
0684fe29f5de5f drivers/soc/sifive/sifive_l2_cache.c Atish Patra 2021-06-12 143 len = len + (start % SIFIVE_L2_FLUSH64_LINE_LEN);
0684fe29f5de5f drivers/soc/sifive/sifive_l2_cache.c Atish Patra 2021-06-12 144 start = ALIGN_DOWN(start, SIFIVE_L2_FLUSH64_LINE_LEN);
0684fe29f5de5f drivers/soc/sifive/sifive_l2_cache.c Atish Patra 2021-06-12 145
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 146 /* make sure the address is in the range */
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 147 if(start < CONFIG_SIFIVE_L2_FLUSH_START ||
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 @148 (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START +
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 149 CONFIG_SIFIVE_L2_FLUSH_SIZE)) {
b5cf3456431952 drivers/soc/sifive/sifive_l2_cache.c Geert Uytterhoeven 2021-05-21 150 WARN(1, "L2CACHE: flush64 out of range: %lx(%lx), skip flush\n",
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 151 start, len);
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 152 return;
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 153 }
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 154
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 155 mb(); /* sync */
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 156 for (line = start; line < start + len;
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 157 line += SIFIVE_L2_FLUSH64_LINE_LEN) {
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 158 writeq(line, l2_base + SIFIVE_L2_FLUSH64);
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 159 mb();
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 160 }
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 161 }
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 162 EXPORT_SYMBOL_GPL(sifive_l2_flush64_range);
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 163 #endif
c6649e71d37210 drivers/soc/sifive/sifive_l2_cache.c Tom 2021-01-08 164
:::::: The code at line 148 was first introduced by commit
:::::: c6649e71d37210bc4c33eada849aeda98c823de9 sifive/sifive_l2_cache: Add sifive_l2_flush64_range function
:::::: TO: Tom <support(a)vamrs.com>
:::::: CC: Emil Renner Berthing <kernel(a)esmil.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
Re: [PATCH net] ipv6: gro: flush instead of assuming different flows on hop_limit mismatch
by kernel test robot
Hi Jakub,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net/master]
url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/ipv6-gro-flush-in...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 57afdc0aab094b4c811b3fe030b2567812a495f3
config: x86_64-randconfig-s022 (https://download.01.org/0day-ci/archive/20220125/202201250210.roaIok2H-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/6f8f3e541288381a67df8b670068d5add...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jakub-Kicinski/ipv6-gro-flush-instead-of-assuming-different-flows-on-hop_limit-mismatch/20220121-092033
git checkout 6f8f3e541288381a67df8b670068d5add231d082
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash net/ipv6/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/ipv6/ip6_offload.c:264:57: sparse: sparse: restricted __be32 degrades to integer
>> net/ipv6/ip6_offload.c:263:48: sparse: sparse: dubious: x | !y
vim +264 net/ipv6/ip6_offload.c
182
183 INDIRECT_CALLABLE_SCOPE struct sk_buff *ipv6_gro_receive(struct list_head *head,
184 struct sk_buff *skb)
185 {
186 const struct net_offload *ops;
187 struct sk_buff *pp = NULL;
188 struct sk_buff *p;
189 struct ipv6hdr *iph;
190 unsigned int nlen;
191 unsigned int hlen;
192 unsigned int off;
193 u16 flush = 1;
194 int proto;
195
196 off = skb_gro_offset(skb);
197 hlen = off + sizeof(*iph);
198 iph = skb_gro_header_fast(skb, off);
199 if (skb_gro_header_hard(skb, hlen)) {
200 iph = skb_gro_header_slow(skb, hlen, off);
201 if (unlikely(!iph))
202 goto out;
203 }
204
205 skb_set_network_header(skb, off);
206 skb_gro_pull(skb, sizeof(*iph));
207 skb_set_transport_header(skb, skb_gro_offset(skb));
208
209 flush += ntohs(iph->payload_len) != skb_gro_len(skb);
210
211 proto = iph->nexthdr;
212 ops = rcu_dereference(inet6_offloads[proto]);
213 if (!ops || !ops->callbacks.gro_receive) {
214 __pskb_pull(skb, skb_gro_offset(skb));
215 skb_gro_frag0_invalidate(skb);
216 proto = ipv6_gso_pull_exthdrs(skb, proto);
217 skb_gro_pull(skb, -skb_transport_offset(skb));
218 skb_reset_transport_header(skb);
219 __skb_push(skb, skb_gro_offset(skb));
220
221 ops = rcu_dereference(inet6_offloads[proto]);
222 if (!ops || !ops->callbacks.gro_receive)
223 goto out;
224
225 iph = ipv6_hdr(skb);
226 }
227
228 NAPI_GRO_CB(skb)->proto = proto;
229
230 flush--;
231 nlen = skb_network_header_len(skb);
232
233 list_for_each_entry(p, head, list) {
234 const struct ipv6hdr *iph2;
235 __be32 first_word; /* <Version:4><Traffic_Class:8><Flow_Label:20> */
236
237 if (!NAPI_GRO_CB(p)->same_flow)
238 continue;
239
240 iph2 = (struct ipv6hdr *)(p->data + off);
241 first_word = *(__be32 *)iph ^ *(__be32 *)iph2;
242
243 /* All fields must match except length and Traffic Class.
244 * XXX skbs on the gro_list have all been parsed and pulled
245 * already so we don't need to compare nlen
246 * (nlen != (sizeof(*iph2) + ipv6_exthdrs_len(iph2, &ops)))
247 * memcmp() alone below is sufficient, right?
248 */
249 if ((first_word & htonl(0xF00FFFFF)) ||
250 !ipv6_addr_equal(&iph->saddr, &iph2->saddr) ||
251 !ipv6_addr_equal(&iph->daddr, &iph2->daddr) ||
252 iph->nexthdr != iph2->nexthdr) {
253 not_same_flow:
254 NAPI_GRO_CB(p)->same_flow = 0;
255 continue;
256 }
257 if (unlikely(nlen > sizeof(struct ipv6hdr))) {
258 if (memcmp(iph + 1, iph2 + 1,
259 nlen - sizeof(struct ipv6hdr)))
260 goto not_same_flow;
261 }
262 /* flush if Traffic Class fields are different */
> 263 NAPI_GRO_CB(p)->flush |= flush |
> 264 !!((first_word & htonl(0x0FF00000)) |
265 (iph->hop_limit ^ iph2->hop_limit));
266
267 /* If the previous IP ID value was based on an atomic
268 * datagram we can overwrite the value and ignore it.
269 */
270 if (NAPI_GRO_CB(skb)->is_atomic)
271 NAPI_GRO_CB(p)->flush_id = 0;
272 }
273
274 NAPI_GRO_CB(skb)->is_atomic = true;
275 NAPI_GRO_CB(skb)->flush |= flush;
276
277 skb_gro_postpull_rcsum(skb, iph, nlen);
278
279 pp = indirect_call_gro_receive_l4(tcp6_gro_receive, udp6_gro_receive,
280 ops->callbacks.gro_receive, head, skb);
281
282 out:
283 skb_gro_flush_final(skb, pp, flush);
284
285 return pp;
286 }
287
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks
Re: [PATCH v2 2/2] vsprintf: Move space out of string literals in fourcc_string()
by kernel test robot
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.17-rc1 next-20220124]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/vsprintf-Fix-pot...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
config: arm-randconfig-r022-20220124 (https://download.01.org/0day-ci/archive/20220125/202201250258.qVWkKB2I-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/f1895edcabdc5dae0528ffff9c3cb665a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/vsprintf-Fix-potential-unaligned-access/20220124-224420
git checkout f1895edcabdc5dae0528ffff9c3cb665a937223d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
lib/vsprintf.c: In function 'va_format':
lib/vsprintf.c:1695:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1695 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
| ^~~
lib/vsprintf.c: In function 'fourcc_string':
lib/vsprintf.c:1794:13: error: implicit declaration of function 'stpcpy' [-Werror=implicit-function-declaration]
1794 | p = stpcpy(p, orig & BIT(31) ? "big-endian" : "little-endian");
| ^~~~~~
>> lib/vsprintf.c:1794:13: warning: incompatible implicit declaration of built-in function 'stpcpy' [-Wbuiltin-declaration-mismatch]
cc1: some warnings being treated as errors
vim +/stpcpy +1794 lib/vsprintf.c
1685
1686 static char *va_format(char *buf, char *end, struct va_format *va_fmt,
1687 struct printf_spec spec, const char *fmt)
1688 {
1689 va_list va;
1690
1691 if (check_pointer(&buf, end, va_fmt, spec))
1692 return buf;
1693
1694 va_copy(va, *va_fmt->va);
> 1695 buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
1696 va_end(va);
1697
1698 return buf;
1699 }
1700
1701 static noinline_for_stack
1702 char *uuid_string(char *buf, char *end, const u8 *addr,
1703 struct printf_spec spec, const char *fmt)
1704 {
1705 char uuid[UUID_STRING_LEN + 1];
1706 char *p = uuid;
1707 int i;
1708 const u8 *index = uuid_index;
1709 bool uc = false;
1710
1711 if (check_pointer(&buf, end, addr, spec))
1712 return buf;
1713
1714 switch (*(++fmt)) {
1715 case 'L':
1716 uc = true;
1717 fallthrough;
1718 case 'l':
1719 index = guid_index;
1720 break;
1721 case 'B':
1722 uc = true;
1723 break;
1724 }
1725
1726 for (i = 0; i < 16; i++) {
1727 if (uc)
1728 p = hex_byte_pack_upper(p, addr[index[i]]);
1729 else
1730 p = hex_byte_pack(p, addr[index[i]]);
1731 switch (i) {
1732 case 3:
1733 case 5:
1734 case 7:
1735 case 9:
1736 *p++ = '-';
1737 break;
1738 }
1739 }
1740
1741 *p = 0;
1742
1743 return string_nocheck(buf, end, uuid, spec);
1744 }
1745
1746 static noinline_for_stack
1747 char *netdev_bits(char *buf, char *end, const void *addr,
1748 struct printf_spec spec, const char *fmt)
1749 {
1750 unsigned long long num;
1751 int size;
1752
1753 if (check_pointer(&buf, end, addr, spec))
1754 return buf;
1755
1756 switch (fmt[1]) {
1757 case 'F':
1758 num = *(const netdev_features_t *)addr;
1759 size = sizeof(netdev_features_t);
1760 break;
1761 default:
1762 return error_string(buf, end, "(%pN?)", spec);
1763 }
1764
1765 return special_hex_number(buf, end, num, size);
1766 }
1767
1768 static noinline_for_stack
1769 char *fourcc_string(char *buf, char *end, const u32 *fourcc,
1770 struct printf_spec spec, const char *fmt)
1771 {
1772 char output[sizeof("0123 little-endian (0x01234567)")];
1773 char *p = output;
1774 unsigned int i;
1775 u32 orig, val;
1776
1777 if (fmt[1] != 'c' || fmt[2] != 'c')
1778 return error_string(buf, end, "(%p4?)", spec);
1779
1780 if (check_pointer(&buf, end, fourcc, spec))
1781 return buf;
1782
1783 orig = get_unaligned(fourcc);
1784 val = orig & ~BIT(31);
1785
1786 for (i = 0; i < sizeof(u32); i++) {
1787 unsigned char c = val >> (i * 8);
1788
1789 /* Print non-control ASCII characters as-is, dot otherwise */
1790 *p++ = isascii(c) && isprint(c) ? c : '.';
1791 }
1792
1793 *p++ = ' ';
> 1794 p = stpcpy(p, orig & BIT(31) ? "big-endian" : "little-endian");
1795
1796 *p++ = ' ';
1797 *p++ = '(';
1798 p = special_hex_number(p, output + sizeof(output) - 2, orig, sizeof(u32));
1799 *p++ = ')';
1800 *p = '\0';
1801
1802 return string(buf, end, output, spec);
1803 }
1804
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 4 weeks