Re: [PATCH v3 15/18] tcp: authopt: Add prefixlen support
by kernel test robot
Hi Leonard,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 1fe5b01262844be03de98afdd56d1d393df04d7e]
url: https://github.com/0day-ci/linux/commits/Leonard-Crestez/tcp-Initial-supp...
base: 1fe5b01262844be03de98afdd56d1d393df04d7e
config: m68k-randconfig-s031-20211209 (https://download.01.org/0day-ci/archive/20211210/202112100225.hqdTG8c9-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/7498e5058485276b294b76ec94a4769b3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Leonard-Crestez/tcp-Initial-support-for-RFC5925-auth-option/20211208-194125
git checkout 7498e5058485276b294b76ec94a4769b36084115
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash net/ipv4/
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/ipv4/tcp_authopt.c:250:42: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/ipv4/tcp_authopt.c:250:42: sparse: expected unsigned int [usertype] mask
net/ipv4/tcp_authopt.c:250:42: sparse: got restricted __be32
>> net/ipv4/tcp_authopt.c:252:28: sparse: sparse: restricted __be32 degrades to integer
net/ipv4/tcp_authopt.c:252:65: sparse: sparse: restricted __be32 degrades to integer
net/ipv4/tcp_authopt.c:279:42: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] mask @@ got restricted __be32 @@
net/ipv4/tcp_authopt.c:279:42: sparse: expected unsigned int [usertype] mask
net/ipv4/tcp_authopt.c:279:42: sparse: got restricted __be32
net/ipv4/tcp_authopt.c:281:34: sparse: sparse: restricted __be32 degrades to integer
net/ipv4/tcp_authopt.c:281:72: sparse: sparse: restricted __be32 degrades to integer
net/ipv4/tcp_authopt.c:394:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:394:23: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:394:23: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:396:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:396:23: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:396:23: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:420:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:420:25: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:420:25: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:560:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:560:20: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:560:20: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:579:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:579:13: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:579:13: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:580:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:580:17: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:580:17: sparse: struct tcp_authopt_key_info *
vim +250 net/ipv4/tcp_authopt.c
241
242 static bool tcp_authopt_key_match_skb_addr(struct tcp_authopt_key_info *key,
243 struct sk_buff *skb)
244 {
245 u16 keyaf = key->addr.ss_family;
246 struct iphdr *iph = (struct iphdr *)skb_network_header(skb);
247
248 if (keyaf == AF_INET && iph->version == 4) {
249 struct sockaddr_in *key_addr = (struct sockaddr_in *)&key->addr;
> 250 u32 mask = inet_make_mask(key->prefixlen);
251
> 252 return (iph->saddr & mask) == key_addr->sin_addr.s_addr;
253 } else if (keyaf == AF_INET6 && iph->version == 6) {
254 struct ipv6hdr *ip6h = (struct ipv6hdr *)skb_network_header(skb);
255 struct sockaddr_in6 *key_addr = (struct sockaddr_in6 *)&key->addr;
256
257 return ipv6_prefix_equal(&ip6h->saddr,
258 &key_addr->sin6_addr,
259 key->prefixlen);
260 }
261
262 /* This actually happens with ipv6-mapped-ipv4-addresses
263 * IPv6 listen sockets will be asked to validate ipv4 packets.
264 */
265 return false;
266 }
267
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[ardb:for-kernelci 1/1] arch/arm/boot/compressed/head.S:315: Error: invalid constant (408000) after fixup
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git for-kernelci
head: 3d803745c0cdcca58579eb2654530bf4be3bef72
commit: 3d803745c0cdcca58579eb2654530bf4be3bef72 [1/1] ARM: set textoffset to 4 MiB unconditionally
config: arm-randconfig-c002-20211209 (https://download.01.org/0day-ci/archive/20211210/202112100254.0Rw7jLH5-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://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id...
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb for-kernelci
git checkout 3d803745c0cdcca58579eb2654530bf4be3bef72
# 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 errors (new ones prefixed by >>):
arch/arm/boot/compressed/head.S: Assembler messages:
>> arch/arm/boot/compressed/head.S:315: Error: invalid constant (408000) after fixup
vim +315 arch/arm/boot/compressed/head.S
0673cb38951215 Geert Uytterhoeven 2021-01-04 300
0673cb38951215 Geert Uytterhoeven 2021-01-04 301 /*
0673cb38951215 Geert Uytterhoeven 2021-01-04 302 * Make sure we have some stack before calling C code.
0673cb38951215 Geert Uytterhoeven 2021-01-04 303 * No GOT fixup has occurred yet, but none of the code we're
0673cb38951215 Geert Uytterhoeven 2021-01-04 304 * about to call uses any global variables.
0673cb38951215 Geert Uytterhoeven 2021-01-04 305 */
0673cb38951215 Geert Uytterhoeven 2021-01-04 306 ldr sp, [r1] @ get stack location
0673cb38951215 Geert Uytterhoeven 2021-01-04 307 add sp, sp, r1 @ apply relocation
0673cb38951215 Geert Uytterhoeven 2021-01-04 308
0673cb38951215 Geert Uytterhoeven 2021-01-04 309 /* Validate calculated start against passed DTB */
0673cb38951215 Geert Uytterhoeven 2021-01-04 310 mov r1, r8
0673cb38951215 Geert Uytterhoeven 2021-01-04 311 bl fdt_check_mem_start
0673cb38951215 Geert Uytterhoeven 2021-01-04 312 1:
0673cb38951215 Geert Uytterhoeven 2021-01-04 313 #endif /* CONFIG_USE_OF */
0a6a78b8b3c1c1 Russell King 2015-03-26 314 /* Determine final kernel image address. */
0673cb38951215 Geert Uytterhoeven 2021-01-04 @315 add r4, r0, #TEXT_OFFSET
e69edc7939abda Eric Miao 2010-07-05 316 #else
9e84ed63dc71e1 Russell King 2010-09-09 317 ldr r4, =zreladdr
e69edc7939abda Eric Miao 2010-07-05 318 #endif
^1da177e4c3f41 Linus Torvalds 2005-04-16 319
2874865c1271cc Nicolas Pitre 2013-06-06 320 /*
2874865c1271cc Nicolas Pitre 2013-06-06 321 * Set up a page table only if it won't overwrite ourself.
7d57909bf69f21 Masahiro Yamada 2015-01-20 322 * That means r4 < pc || r4 - 16k page directory > &_end.
2874865c1271cc Nicolas Pitre 2013-06-06 323 * Given that r4 > &_end is most unfrequent, we add a rough
2874865c1271cc Nicolas Pitre 2013-06-06 324 * additional 1MB of room for a possible appended DTB.
2874865c1271cc Nicolas Pitre 2013-06-06 325 */
2874865c1271cc Nicolas Pitre 2013-06-06 326 mov r0, pc
2874865c1271cc Nicolas Pitre 2013-06-06 327 cmp r0, r4
691cbe5ba5f77f Ard Biesheuvel 2020-04-13 328 ldrcc r0, .Lheadroom
2874865c1271cc Nicolas Pitre 2013-06-06 329 addcc r0, r0, pc
2874865c1271cc Nicolas Pitre 2013-06-06 330 cmpcc r4, r0
2874865c1271cc Nicolas Pitre 2013-06-06 331 orrcc r4, r4, #1 @ remember we skipped cache_on
2874865c1271cc Nicolas Pitre 2013-06-06 332 blcs cache_on
6d7d0ae5157494 Nicolas Pitre 2011-02-21 333
:::::: The code at line 315 was first introduced by commit
:::::: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
:::::: TO: Geert Uytterhoeven <geert+renesas(a)glider.be>
:::::: CC: Russell King <rmk+kernel(a)armlinux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
【Amazon】アカウント情報をご確認ください
by Amazon.co.jp
Amazonお客様
平素は、Amazonをご利用いただき、誠にありがとうございます。
お客様のご要望に応じて、アカウントのパスワードを変更いたしました。
ログインプロセス中に、お客様は次のアクションを実行しました:
パスワードの変更。
アドレスの変更。
上記の操作を自分で行わなかった場合。以下のリンクをクリックして、本人確認を行い、アカウント設定を復元してください。
お客様が24時間以内に応答しない場合、アカウントのセキュリティのために、Amazonの使用にいくつかの制限を課します。
本件についてご迷惑をおかけしましたことをお詫び申し上げます。
何卒、よろしくお願い申し上げます。
お客様の Amazon アカウント
アカウント所有権の証明をご自身で行う場合は、Amazon 管理コンソールにログインし、所定の手順でお手続きください。アカウント所有権の証明についてのヘルプセンター記事も併せてご参照ください。
状態:
異常は更新待ちです
Amazonクリック&ログイン
Amazonのまたのご利用をお待ちしております。
© 1996-2021, Amazon. Inc. or its affiliates
9 months, 2 weeks
[freescale-fslc:pr/493 2/10] arch/arm/mach-imx/reboot.c:31:6: warning: no previous prototype for 'do_switch_recovery'
by kernel test robot
tree: https://github.com/Freescale/linux-fslc pr/493
head: 4095f16ba8dccb30a4b20aead5efc191a07f21f5
commit: a9a756351b7a22878f92177dd2c79509dfc94e53 [2/10] MA-7633-2 [Android-Reboot]reboot to fastboot\recovery mode
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20211210/202112100228.1Tz5EDRZ-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/Freescale/linux-fslc/commit/a9a756351b7a22878f92177dd2...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/493
git checkout a9a756351b7a22878f92177dd2c79509dfc94e53
# 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 >>):
>> arch/arm/mach-imx/reboot.c:31:6: warning: no previous prototype for 'do_switch_recovery' [-Wmissing-prototypes]
31 | void do_switch_recovery(void)
| ^~~~~~~~~~~~~~~~~~
>> arch/arm/mach-imx/reboot.c:61:6: warning: no previous prototype for 'do_switch_fastboot' [-Wmissing-prototypes]
61 | void do_switch_fastboot(void)
| ^~~~~~~~~~~~~~~~~~
vim +/do_switch_recovery +31 arch/arm/mach-imx/reboot.c
30
> 31 void do_switch_recovery(void)
32 {
33 u32 reg;
34 void *addr;
35 struct clk *snvs_root;
36 if (cpu_is_imx6()) {
37 addr = ioremap(MX6_SNVS_BASE_ADDR, MX6_SNVS_SIZE);
38 if (!addr) {
39 pr_warn("SNVS ioremap failed!\n");
40 return;
41 }
42 reg = __raw_readl(addr + MX6_SNVS_LPGPR);
43 reg |= ANDROID_RECOVERY_BOOT;
44 __raw_writel(reg, (addr + MX6_SNVS_LPGPR));
45 } else {
46 snvs_root = clk_get_sys("imx-snvs.0", "snvs");
47 addr = ioremap(MX7_SNVS_BASE_ADDR, MX7_SNVS_SIZE);
48 if (!addr) {
49 pr_warn("SNVS ioremap failed!\n");
50 return;
51 }
52 clk_enable(snvs_root);
53 reg = __raw_readl(addr + MX7_SNVS_LPGPR);
54 reg |= ANDROID_RECOVERY_BOOT;
55 __raw_writel(reg, (addr + MX7_SNVS_LPGPR));
56 clk_disable(snvs_root);
57 }
58 iounmap(addr);
59 }
60
> 61 void do_switch_fastboot(void)
62 {
63 u32 reg;
64 void *addr;
65 struct clk *snvs_root;
66 if (cpu_is_imx6()) {
67 addr = ioremap(MX6_SNVS_BASE_ADDR, MX6_SNVS_SIZE);
68 if (!addr) {
69 pr_warn("SNVS ioremap failed!\n");
70 return;
71 }
72 reg = __raw_readl(addr + MX6_SNVS_LPGPR);
73 reg |= ANDROID_FASTBOOT_BOOT;
74 __raw_writel(reg, addr + MX6_SNVS_LPGPR);
75 } else {
76 snvs_root = clk_get_sys("imx-snvs.0", "snvs");
77 addr = ioremap(MX7_SNVS_BASE_ADDR, MX7_SNVS_SIZE);
78 if (!addr) {
79 pr_warn("SNVS ioremap failed!\n");
80 return;
81 }
82 clk_enable(snvs_root);
83 reg = __raw_readl(addr + MX7_SNVS_LPGPR);
84 reg |= ANDROID_FASTBOOT_BOOT;
85 __raw_writel(reg, addr + MX7_SNVS_LPGPR);
86 clk_disable(snvs_root);
87 }
88 iounmap(addr);
89 }
90
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
【Amazon】アカウント情報をご確認ください
by Amazon.co.jp
Amazonお客様
平素は、Amazonをご利用いただき、誠にありがとうございます。
お客様のご要望に応じて、アカウントのパスワードを変更いたしました。
ログインプロセス中に、お客様は次のアクションを実行しました:
パスワードの変更。
アドレスの変更。
上記の操作を自分で行わなかった場合。以下のリンクをクリックして、本人確認を行い、アカウント設定を復元してください。
お客様が24時間以内に応答しない場合、アカウントのセキュリティのために、Amazonの使用にいくつかの制限を課します。
本件についてご迷惑をおかけしましたことをお詫び申し上げます。
何卒、よろしくお願い申し上げます。
お客様の Amazon アカウント
アカウント所有権の証明をご自身で行う場合は、Amazon 管理コンソールにログインし、所定の手順でお手続きください。アカウント所有権の証明についてのヘルプセンター記事も併せてご参照ください。
状態:
異常は更新待ちです
Amazonクリック&ログイン
Amazonのまたのご利用をお待ちしております。
© 1996-2021, Amazon. Inc. or its affiliates
9 months, 2 weeks
Re: [PATCH] pwm: imx27: workaround of the pwm output bug when decrease the duty cycle
by kernel test robot
Hi Clark,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on thierry-reding-pwm/for-next]
[also build test WARNING on v5.16-rc4 next-20211208]
[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/Clark-Wang/pwm-imx27-workaround-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git for-next
config: riscv-randconfig-s031-20211209 (https://download.01.org/0day-ci/archive/20211210/202112100135.Qng8J561-lk...)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/e56186a9b8501a89d138d2072cc63d107...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Clark-Wang/pwm-imx27-workaround-of-the-pwm-output-bug-when-decrease-the-duty-cycle/20211208-165523
git checkout e56186a9b8501a89d138d2072cc63d107fb303a0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/pwm/
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 >>)
>> drivers/pwm/pwm-imx27.c:301:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sar_last @@ got restricted __le32 [usertype] @@
drivers/pwm/pwm-imx27.c:301:26: sparse: expected unsigned int [usertype] sar_last
drivers/pwm/pwm-imx27.c:301:26: sparse: got restricted __le32 [usertype]
>> drivers/pwm/pwm-imx27.c:302:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sar_current @@ got restricted __le32 [usertype] @@
drivers/pwm/pwm-imx27.c:302:29: sparse: expected unsigned int [usertype] sar_current
drivers/pwm/pwm-imx27.c:302:29: sparse: got restricted __le32 [usertype]
vim +301 drivers/pwm/pwm-imx27.c
217
218 static int pwm_imx27_apply(struct pwm_chip *chip, struct pwm_device *pwm,
219 const struct pwm_state *state)
220 {
221 unsigned long period_cycles, duty_cycles, prescale, counter_check, flags;
222 struct pwm_imx27_chip *imx = to_pwm_imx27_chip(chip);
223 void __iomem *reg_sar = imx->mmio_base + MX3_PWMSAR;
224 __force u32 sar_last, sar_current;
225 struct pwm_state cstate;
226 unsigned long long c;
227 unsigned long long clkrate;
228 int ret;
229 u32 cr, timeout = 1000;
230
231 pwm_get_state(pwm, &cstate);
232
233 clkrate = clk_get_rate(imx->clk_per);
234 c = clkrate * state->period;
235
236 do_div(c, NSEC_PER_SEC);
237 period_cycles = c;
238
239 prescale = period_cycles / 0x10000 + 1;
240
241 period_cycles /= prescale;
242 c = clkrate * state->duty_cycle;
243 do_div(c, NSEC_PER_SEC);
244 duty_cycles = c;
245 duty_cycles /= prescale;
246
247 /*
248 * according to imx pwm RM, the real period value should be PERIOD
249 * value in PWMPR plus 2.
250 */
251 if (period_cycles > 2)
252 period_cycles -= 2;
253 else
254 period_cycles = 0;
255
256 /*
257 * Wait for a free FIFO slot if the PWM is already enabled, and flush
258 * the FIFO if the PWM was disabled and is about to be enabled.
259 */
260 if (cstate.enabled) {
261 pwm_imx27_wait_fifo_slot(chip, pwm);
262 } else {
263 ret = pwm_imx27_clk_prepare_enable(imx);
264 if (ret)
265 return ret;
266
267 pwm_imx27_sw_reset(chip);
268 }
269
270 /*
271 * This is a limited workaround. When the SAR FIFO is empty, the new
272 * write value will be directly applied to SAR even the current period
273 * is not over.
274 * If the new SAR value is less than the old one, and the counter is
275 * greater than the new SAR value, the current period will not filp
276 * the level. This will result in a pulse with a duty cycle of 100%.
277 * So, writing the current value of the SAR to SAR here before updating
278 * the new SAR value can avoid this issue.
279 *
280 * Add a spin lock and turn off the interrupt to ensure that the
281 * real-time performance can be guaranteed as much as possible when
282 * operating the following operations.
283 *
284 * 1. Add a threshold of 1.5us. If the time T between the read current
285 * count value CNR and the end of the cycle is less than 1.5us, wait
286 * for T to be longer than 1.5us before updating the SAR register.
287 * This is to avoid the situation that when the first SAR is written,
288 * the current cycle just ends and the SAR FIFO that just be written
289 * is emptied again.
290 *
291 * 2. Use __raw_writel() to minimize the interval between two writes to
292 * the SAR register to increase the fastest pwm frequency supported.
293 *
294 * When the PWM period is longer than 2us(or <500KHz), this workaround
295 * can solve this problem.
296 */
297 if (duty_cycles < imx->duty_cycle) {
298 c = clkrate * 1500;
299 do_div(c, NSEC_PER_SEC);
300 counter_check = c;
> 301 sar_last = cpu_to_le32(imx->duty_cycle);
> 302 sar_current = cpu_to_le32(duty_cycles);
303
304 spin_lock_irqsave(&imx->lock, flags);
305 if (state->period >= 2000) {
306 while ((period_cycles -
307 readl_relaxed(imx->mmio_base + MX3_PWMCNR))
308 < counter_check) {
309 if (!--timeout)
310 break;
311 };
312 }
313 if (!(MX3_PWMSR_FIFOAV &
314 readl_relaxed(imx->mmio_base + MX3_PWMSR)))
315 __raw_writel(sar_last, reg_sar);
316 __raw_writel(sar_current, reg_sar);
317 spin_unlock_irqrestore(&imx->lock, flags);
318 } else
319 writel(duty_cycles, imx->mmio_base + MX3_PWMSAR);
320
321 writel(period_cycles, imx->mmio_base + MX3_PWMPR);
322
323 /*
324 * Store the duty cycle for future reference in cases where the
325 * MX3_PWMSAR register can't be read (i.e. when the PWM is disabled).
326 */
327 imx->duty_cycle = duty_cycles;
328
329 cr = MX3_PWMCR_PRESCALER_SET(prescale) |
330 MX3_PWMCR_STOPEN | MX3_PWMCR_DOZEN | MX3_PWMCR_WAITEN |
331 FIELD_PREP(MX3_PWMCR_CLKSRC, MX3_PWMCR_CLKSRC_IPG_HIGH) |
332 MX3_PWMCR_DBGEN;
333
334 if (state->polarity == PWM_POLARITY_INVERSED)
335 cr |= FIELD_PREP(MX3_PWMCR_POUTC,
336 MX3_PWMCR_POUTC_INVERTED);
337
338 if (state->enabled)
339 cr |= MX3_PWMCR_EN;
340
341 writel(cr, imx->mmio_base + MX3_PWMCR);
342
343 if (!state->enabled)
344 pwm_imx27_clk_disable_unprepare(imx);
345
346 return 0;
347 }
348
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[leon-rdma:rdma-next 24/31] drivers/infiniband/core/cache.c:967:16: error: expected ';' after expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head: 3851deadf6de976fe0d2f72ca1084b47a044c2c7
commit: 1f2b65dfb4d995e74b621e3e21e7c7445d187956 [24/31] RDMA/core: Modify rdma_query_gid() to return accurate error codes
config: riscv-buildonly-randconfig-r003-20211209 (https://download.01.org/0day-ci/archive/20211210/202112100121.3lkxU859-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commi...
git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
git fetch --no-tags leon-rdma rdma-next
git checkout 1f2b65dfb4d995e74b621e3e21e7c7445d187956
# 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/infiniband/core/
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 >>):
>> drivers/infiniband/core/cache.c:967:16: error: expected ';' after expression
res = -EINVAL
^
;
1 error generated.
vim +967 drivers/infiniband/core/cache.c
938
939 /**
940 * rdma_query_gid - Read the GID content from the GID software cache
941 * @device: Device to query the GID
942 * @port_num: Port number of the device
943 * @index: Index of the GID table entry to read
944 * @gid: Pointer to GID where to store the entry's GID
945 *
946 * rdma_query_gid() only reads the GID entry content for requested device,
947 * port and index. It reads for IB, RoCE and iWarp link layers. It doesn't
948 * hold any reference to the GID table entry in the HCA or software cache.
949 *
950 * Returns 0 on success or appropriate error code.
951 *
952 */
953 int rdma_query_gid(struct ib_device *device, u32 port_num,
954 int index, union ib_gid *gid)
955 {
956 struct ib_gid_table *table;
957 unsigned long flags;
958 int res;
959
960 if (!rdma_is_port_valid(device, port_num))
961 return -EINVAL;
962
963 table = rdma_gid_table(device, port_num);
964 read_lock_irqsave(&table->rwlock, flags);
965
966 if (index < 0 || index >= table->sz) {
> 967 res = -EINVAL
968 goto done;
969 }
970
971 if (!is_gid_entry_valid(table->data_vec[index])) {
972 res = -ENOENT;
973 goto done;
974 }
975
976 memcpy(gid, &table->data_vec[index]->attr.gid, sizeof(*gid));
977 res = 0;
978
979 done:
980 read_unlock_irqrestore(&table->rwlock, flags);
981 return res;
982 }
983 EXPORT_SYMBOL(rdma_query_gid);
984
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
Re: [PATCH v3 12/18] tcp: authopt: Add key selection controls
by kernel test robot
Hi Leonard,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 1fe5b01262844be03de98afdd56d1d393df04d7e]
url: https://github.com/0day-ci/linux/commits/Leonard-Crestez/tcp-Initial-supp...
base: 1fe5b01262844be03de98afdd56d1d393df04d7e
config: m68k-randconfig-s031-20211209 (https://download.01.org/0day-ci/archive/20211210/202112100044.EM5GEcUJ-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/8082f98bdfa221e0dc891e89beecb5d1e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Leonard-Crestez/tcp-Initial-support-for-RFC5925-auth-option/20211208-194125
git checkout 8082f98bdfa221e0dc891e89beecb5d1e3ac64ac
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash net/ipv4/
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/ipv4/tcp_authopt.c:343:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> net/ipv4/tcp_authopt.c:343:23: sparse: struct tcp_authopt_key_info [noderef] __rcu *
>> net/ipv4/tcp_authopt.c:343:23: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:345:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:345:23: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:345:23: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:369:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:369:25: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:369:25: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:509:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:509:20: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:509:20: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:528:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:528:13: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:528:13: sparse: struct tcp_authopt_key_info *
net/ipv4/tcp_authopt.c:529:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/tcp_authopt.c:529:17: sparse: struct tcp_authopt_key_info [noderef] __rcu *
net/ipv4/tcp_authopt.c:529:17: sparse: struct tcp_authopt_key_info *
vim +343 net/ipv4/tcp_authopt.c
306
307 /**
308 * __tcp_authopt_select_key - select key for sending
309 *
310 * @sk: socket
311 * @info: socket's tcp_authopt_info
312 * @addr_sk: socket used for address lookup. Same as sk except for synack case
313 * @rnextkeyid: value of rnextkeyid caller should write in packet
314 * @locked: If we're holding the socket lock. This is false for some timewait and reset cases
315 *
316 * Result is protected by RCU and can't be stored, it may only be passed to
317 * tcp_authopt_hash and only under a single rcu_read_lock.
318 */
319 struct tcp_authopt_key_info *__tcp_authopt_select_key(const struct sock *sk,
320 struct tcp_authopt_info *info,
321 const struct sock *addr_sk,
322 u8 *rnextkeyid,
323 bool locked)
324 {
325 struct tcp_authopt_key_info *key, *new_key = NULL;
326
327 /* Listen sockets don't refer to any specific connection so we don't try
328 * to keep using the same key and ignore any received keyids.
329 */
330 if (sk->sk_state == TCP_LISTEN) {
331 int send_keyid = -1;
332
333 if (info->flags & TCP_AUTHOPT_FLAG_LOCK_KEYID)
334 send_keyid = info->send_keyid;
335 key = tcp_authopt_lookup_send(info, addr_sk, send_keyid);
336 if (key)
337 *rnextkeyid = key->recv_id;
338
339 return key;
340 }
341
342 if (locked)
> 343 key = rcu_dereference_protected(info->send_key, lockdep_sock_is_held(sk));
344 else
345 key = rcu_dereference(info->send_key);
346
347 /* Try to keep the same sending key unless user or peer requires a different key
348 * User request (via TCP_AUTHOPT_FLAG_LOCK_KEYID) always overrides peer request.
349 */
350 if (info->flags & TCP_AUTHOPT_FLAG_LOCK_KEYID) {
351 int send_keyid = info->send_keyid;
352
353 if (!key || key->send_id != send_keyid)
354 new_key = tcp_authopt_lookup_send(info, addr_sk, send_keyid);
355 } else {
356 if (!key || key->send_id != info->recv_rnextkeyid)
357 new_key = tcp_authopt_lookup_send(info, addr_sk, info->recv_rnextkeyid);
358 }
359 /* If no key found with specific send_id try anything else. */
360 if (!key && !new_key)
361 new_key = tcp_authopt_lookup_send(info, addr_sk, -1);
362
363 /* Update current key only if we hold the socket lock, otherwise we might
364 * store a pointer that goes stale
365 */
366 if (new_key && key != new_key) {
367 key = new_key;
368 if (locked)
369 rcu_assign_pointer(info->send_key, key);
370 }
371
372 if (key) {
373 if (info->flags & TCP_AUTHOPT_FLAG_LOCK_RNEXTKEYID)
374 *rnextkeyid = info->send_rnextkeyid;
375 else
376 *rnextkeyid = info->send_rnextkeyid = key->recv_id;
377 }
378
379 return key;
380 }
381 EXPORT_SYMBOL(__tcp_authopt_select_key);
382
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[PATCH] arm64: kexec: Fix missing error code 'ret' warning in load_other_segments()
by Lakshmi Ramasubramanian
Since commit ac10be5cdbfa ("arm64: Use common
of_kexec_alloc_and_setup_fdt()"), smatch reports the following warning:
arch/arm64/kernel/machine_kexec_file.c:152 load_other_segments()
warn: missing error code 'ret'
Return code is not set to an error code in load_other_segments() when
of_kexec_alloc_and_setup_fdt() call returns a NULL dtb. This results
in status success (return code set to 0) being returned from
load_other_segments().
Set return code to -ENOMEM if of_kexec_alloc_and_setup_fdt() returns
NULL dtb.
Signed-off-by: Lakshmi Ramasubramanian <nramas(a)linux.microsoft.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Fixes: ac10be5cdbfa ("arm64: Use common of_kexec_alloc_and_setup_fdt()")
---
Patch created in dt/next branch in git repo
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
arch/arm64/kernel/machine_kexec_file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c
index 63634b4d72c1..04d072885e64 100644
--- a/arch/arm64/kernel/machine_kexec_file.c
+++ b/arch/arm64/kernel/machine_kexec_file.c
@@ -149,6 +149,7 @@ int load_other_segments(struct kimage *image,
initrd_len, cmdline, 0);
if (!dtb) {
pr_err("Preparing for new dtb failed\n");
+ ret = -ENOMEM;
goto out_err;
}
--
2.25.1
9 months, 2 weeks
Re: [PATCH v5 07/16] ima: Move ima_htable into ima_namespace
by kernel test robot
Hi Stefan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on zohar-integrity/next-integrity]
[also build test ERROR on linux/master linus/master v5.16-rc4]
[cannot apply to next-20211208]
[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/Stefan-Berger/ima-Namespace-IMA-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity
config: arm64-randconfig-r031-20211208 (https://download.01.org/0day-ci/archive/20211210/202112100051.YVQaPaJf-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/312fc86ebd92ceacb9cb3575f96147213...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Stefan-Berger/ima-Namespace-IMA-with-audit-support-in-IMA-ns/20211209-062017
git checkout 312fc86ebd92ceacb9cb3575f961472132e6cb77
# 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=arm64 SHELL=/bin/bash security/integrity/ima/
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 >>):
>> security/integrity/ima/ima_kexec.c:150:21: error: too few arguments to function call, expected 3, have 2
kexec_buffer);
^
security/integrity/ima/ima.h:169:5: note: 'ima_restore_measurement_list' declared here
int ima_restore_measurement_list(struct ima_namespace *ns,
^
1 error generated.
vim +150 security/integrity/ima/ima_kexec.c
7b8589cc29e7c3 Mimi Zohar 2016-12-19 136
94c3aac567a9dd Mimi Zohar 2016-12-19 137 /*
94c3aac567a9dd Mimi Zohar 2016-12-19 138 * Restore the measurement list from the previous kernel.
94c3aac567a9dd Mimi Zohar 2016-12-19 139 */
94c3aac567a9dd Mimi Zohar 2016-12-19 140 void ima_load_kexec_buffer(void)
94c3aac567a9dd Mimi Zohar 2016-12-19 141 {
94c3aac567a9dd Mimi Zohar 2016-12-19 142 void *kexec_buffer = NULL;
94c3aac567a9dd Mimi Zohar 2016-12-19 143 size_t kexec_buffer_size = 0;
94c3aac567a9dd Mimi Zohar 2016-12-19 144 int rc;
94c3aac567a9dd Mimi Zohar 2016-12-19 145
94c3aac567a9dd Mimi Zohar 2016-12-19 146 rc = ima_get_kexec_buffer(&kexec_buffer, &kexec_buffer_size);
94c3aac567a9dd Mimi Zohar 2016-12-19 147 switch (rc) {
94c3aac567a9dd Mimi Zohar 2016-12-19 148 case 0:
94c3aac567a9dd Mimi Zohar 2016-12-19 149 rc = ima_restore_measurement_list(kexec_buffer_size,
94c3aac567a9dd Mimi Zohar 2016-12-19 @150 kexec_buffer);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks