Re: [PATCH v2 net-next 1/1] Allow user to set metric on default route learned via Router Advertisement.
by kernel test robot
Hi Praveen,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 139711f033f636cc78b6aaf7363252241b9698ef]
url: https://github.com/0day-ci/linux/commits/Praveen-Chaudhary/Allow-user-to-...
base: 139711f033f636cc78b6aaf7363252241b9698ef
config: nds32-randconfig-r015-20210115 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.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/35f232fe80f8b50430aee1c6e534cba11...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Praveen-Chaudhary/Allow-user-to-set-metric-on-default-route-learned-via-Router-Advertisement/20210115-160758
git checkout 35f232fe80f8b50430aee1c6e534cba119c88de8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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 >>):
net/ipv6/ndisc.c: In function 'ndisc_router_discovery':
>> net/ipv6/ndisc.c:1308:35: error: 'struct ipv6_devconf' has no member named 'accept_ra_defrtr_metric'; did you mean 'accept_ra_defrtr'?
1308 | defrtr_usr_metric = in6_dev->cnf.accept_ra_defrtr_metric;
| ^~~~~~~~~~~~~~~~~~~~~~~
| accept_ra_defrtr
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- LATENCYTOP && DEBUG_KERNEL && STACKTRACE_SUPPORT && PROC_FS && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
vim +1308 net/ipv6/ndisc.c
1241
1242 if (in6_dev->if_flags & IF_RS_SENT) {
1243 /*
1244 * flag that an RA was received after an RS was sent
1245 * out on this interface.
1246 */
1247 in6_dev->if_flags |= IF_RA_RCVD;
1248 }
1249
1250 /*
1251 * Remember the managed/otherconf flags from most recently
1252 * received RA message (RFC 2462) -- yoshfuji
1253 */
1254 old_if_flags = in6_dev->if_flags;
1255 in6_dev->if_flags = (in6_dev->if_flags & ~(IF_RA_MANAGED |
1256 IF_RA_OTHERCONF)) |
1257 (ra_msg->icmph.icmp6_addrconf_managed ?
1258 IF_RA_MANAGED : 0) |
1259 (ra_msg->icmph.icmp6_addrconf_other ?
1260 IF_RA_OTHERCONF : 0);
1261
1262 if (old_if_flags != in6_dev->if_flags)
1263 send_ifinfo_notify = true;
1264
1265 if (!in6_dev->cnf.accept_ra_defrtr) {
1266 ND_PRINTK(2, info,
1267 "RA: %s, defrtr is false for dev: %s\n",
1268 __func__, skb->dev->name);
1269 goto skip_defrtr;
1270 }
1271
1272 /* Do not accept RA with source-addr found on local machine unless
1273 * accept_ra_from_local is set to true.
1274 */
1275 net = dev_net(in6_dev->dev);
1276 if (!in6_dev->cnf.accept_ra_from_local &&
1277 ipv6_chk_addr(net, &ipv6_hdr(skb)->saddr, in6_dev->dev, 0)) {
1278 ND_PRINTK(2, info,
1279 "RA from local address detected on dev: %s: default router ignored\n",
1280 skb->dev->name);
1281 goto skip_defrtr;
1282 }
1283
1284 lifetime = ntohs(ra_msg->icmph.icmp6_rt_lifetime);
1285
1286 #ifdef CONFIG_IPV6_ROUTER_PREF
1287 pref = ra_msg->icmph.icmp6_router_pref;
1288 /* 10b is handled as if it were 00b (medium) */
1289 if (pref == ICMPV6_ROUTER_PREF_INVALID ||
1290 !in6_dev->cnf.accept_ra_rtr_pref)
1291 pref = ICMPV6_ROUTER_PREF_MEDIUM;
1292 #endif
1293 /* routes added from RAs do not use nexthop objects */
1294 rt = rt6_get_dflt_router(net, &ipv6_hdr(skb)->saddr, skb->dev);
1295 if (rt) {
1296 neigh = ip6_neigh_lookup(&rt->fib6_nh->fib_nh_gw6,
1297 rt->fib6_nh->fib_nh_dev, NULL,
1298 &ipv6_hdr(skb)->saddr);
1299 if (!neigh) {
1300 ND_PRINTK(0, err,
1301 "RA: %s got default router without neighbour\n",
1302 __func__);
1303 fib6_info_release(rt);
1304 return;
1305 }
1306 }
1307 /* Set default route metric if specified by user */
> 1308 defrtr_usr_metric = in6_dev->cnf.accept_ra_defrtr_metric;
1309 if (defrtr_usr_metric == 0)
1310 defrtr_usr_metric = IP6_RT_PRIO_USER;
1311 /* delete the route if lifetime is 0 or if metric needs change */
1312 if (rt && ((lifetime == 0) || (rt->fib6_metric != defrtr_usr_metric))) {
1313 ip6_del_rt(net, rt, false);
1314 rt = NULL;
1315 }
1316
1317 ND_PRINTK(3, info, "RA: rt: %p lifetime: %d, metric: %d, for dev: %s\n",
1318 rt, lifetime, defrtr_usr_metric, skb->dev->name);
1319 if (!rt && lifetime) {
1320 ND_PRINTK(3, info, "RA: adding default router\n");
1321
1322 rt = rt6_add_dflt_router(net, &ipv6_hdr(skb)->saddr,
1323 skb->dev, pref, defrtr_usr_metric);
1324 if (!rt) {
1325 ND_PRINTK(0, err,
1326 "RA: %s failed to add default route\n",
1327 __func__);
1328 return;
1329 }
1330
1331 neigh = ip6_neigh_lookup(&rt->fib6_nh->fib_nh_gw6,
1332 rt->fib6_nh->fib_nh_dev, NULL,
1333 &ipv6_hdr(skb)->saddr);
1334 if (!neigh) {
1335 ND_PRINTK(0, err,
1336 "RA: %s got default router without neighbour\n",
1337 __func__);
1338 fib6_info_release(rt);
1339 return;
1340 }
1341 neigh->flags |= NTF_ROUTER;
1342 } else if (rt) {
1343 rt->fib6_flags = (rt->fib6_flags & ~RTF_PREF_MASK) | RTF_PREF(pref);
1344 }
1345
1346 if (rt)
1347 fib6_set_expires(rt, jiffies + (HZ * lifetime));
1348 if (in6_dev->cnf.accept_ra_min_hop_limit < 256 &&
1349 ra_msg->icmph.icmp6_hop_limit) {
1350 if (in6_dev->cnf.accept_ra_min_hop_limit <= ra_msg->icmph.icmp6_hop_limit) {
1351 in6_dev->cnf.hop_limit = ra_msg->icmph.icmp6_hop_limit;
1352 fib6_metric_set(rt, RTAX_HOPLIMIT,
1353 ra_msg->icmph.icmp6_hop_limit);
1354 } else {
1355 ND_PRINTK(2, warn, "RA: Got route advertisement with lower hop_limit than minimum\n");
1356 }
1357 }
1358
1359 skip_defrtr:
1360
1361 /*
1362 * Update Reachable Time and Retrans Timer
1363 */
1364
1365 if (in6_dev->nd_parms) {
1366 unsigned long rtime = ntohl(ra_msg->retrans_timer);
1367
1368 if (rtime && rtime/1000 < MAX_SCHEDULE_TIMEOUT/HZ) {
1369 rtime = (rtime*HZ)/1000;
1370 if (rtime < HZ/100)
1371 rtime = HZ/100;
1372 NEIGH_VAR_SET(in6_dev->nd_parms, RETRANS_TIME, rtime);
1373 in6_dev->tstamp = jiffies;
1374 send_ifinfo_notify = true;
1375 }
1376
1377 rtime = ntohl(ra_msg->reachable_time);
1378 if (rtime && rtime/1000 < MAX_SCHEDULE_TIMEOUT/(3*HZ)) {
1379 rtime = (rtime*HZ)/1000;
1380
1381 if (rtime < HZ/10)
1382 rtime = HZ/10;
1383
1384 if (rtime != NEIGH_VAR(in6_dev->nd_parms, BASE_REACHABLE_TIME)) {
1385 NEIGH_VAR_SET(in6_dev->nd_parms,
1386 BASE_REACHABLE_TIME, rtime);
1387 NEIGH_VAR_SET(in6_dev->nd_parms,
1388 GC_STALETIME, 3 * rtime);
1389 in6_dev->nd_parms->reachable_time = neigh_rand_reach_time(rtime);
1390 in6_dev->tstamp = jiffies;
1391 send_ifinfo_notify = true;
1392 }
1393 }
1394 }
1395
1396 /*
1397 * Send a notify if RA changed managed/otherconf flags or timer settings
1398 */
1399 if (send_ifinfo_notify)
1400 inet6_ifinfo_notify(RTM_NEWLINK, in6_dev);
1401
1402 skip_linkparms:
1403
1404 /*
1405 * Process options.
1406 */
1407
1408 if (!neigh)
1409 neigh = __neigh_lookup(&nd_tbl, &ipv6_hdr(skb)->saddr,
1410 skb->dev, 1);
1411 if (neigh) {
1412 u8 *lladdr = NULL;
1413 if (ndopts.nd_opts_src_lladdr) {
1414 lladdr = ndisc_opt_addr_data(ndopts.nd_opts_src_lladdr,
1415 skb->dev);
1416 if (!lladdr) {
1417 ND_PRINTK(2, warn,
1418 "RA: invalid link-layer address length\n");
1419 goto out;
1420 }
1421 }
1422 ndisc_update(skb->dev, neigh, lladdr, NUD_STALE,
1423 NEIGH_UPDATE_F_WEAK_OVERRIDE|
1424 NEIGH_UPDATE_F_OVERRIDE|
1425 NEIGH_UPDATE_F_OVERRIDE_ISROUTER|
1426 NEIGH_UPDATE_F_ISROUTER,
1427 NDISC_ROUTER_ADVERTISEMENT, &ndopts);
1428 }
1429
1430 if (!ipv6_accept_ra(in6_dev)) {
1431 ND_PRINTK(2, info,
1432 "RA: %s, accept_ra is false for dev: %s\n",
1433 __func__, skb->dev->name);
1434 goto out;
1435 }
1436
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH] drm-buf: Add debug option
by kernel test robot
Hi Daniel,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20210115]
[also build test WARNING on v5.11-rc3]
[cannot apply to tegra-drm/drm/tegra/for-next linus/master v5.11-rc3 v5.11-rc2 v5.11-rc1]
[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/Daniel-Vetter/drm-buf-Add-debug-...
base: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25
config: i386-randconfig-a012-20210115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/a0f2603f574f0a1aedd7719cbb47b8077...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Vetter/drm-buf-Add-debug-option/20210115-210650
git checkout a0f2603f574f0a1aedd7719cbb47b807796d2367
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/dma-buf/dma-buf.c: In function '__map_dma_buf':
>> drivers/dma-buf/dma-buf.c:676:5: warning: "CONFIG_DMABUF_DEBUG" is not defined, evaluates to 0 [-Wundef]
676 | #if CONFIG_DMABUF_DEBUG
| ^~~~~~~~~~~~~~~~~~~
drivers/dma-buf/dma-buf.c: In function '__unmap_dma_buf':
drivers/dma-buf/dma-buf.c:816:5: warning: "CONFIG_DMABUF_DEBUG" is not defined, evaluates to 0 [-Wundef]
816 | #if CONFIG_DMABUF_DEBUG
| ^~~~~~~~~~~~~~~~~~~
vim +/CONFIG_DMABUF_DEBUG +676 drivers/dma-buf/dma-buf.c
668
669 static struct sg_table * __map_dma_buf(struct dma_buf_attachment *attach,
670 enum dma_data_direction direction)
671 {
672 struct sg_table *sg_table;
673
674 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction);
675
> 676 #if CONFIG_DMABUF_DEBUG
677 if (sg_table) {
678 int i;
679 struct scatterlist *sg;
680
681 /* To catch abuse of the underlying struct page by importers mix
682 * up the bits, but take care to preserve the low SG_ bits to
683 * not corrupt the sgt. The mixing is undone in __unmap_dma_buf
684 * before passing the sgt back to the exporter. */
685 for_each_sgtable_sg(sg_table, sg, i)
686 sg->page_link ^= ~0xffUL;
687 }
688 #endif
689
690 return sg_table;
691 }
692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[linux-next:master 1027/3956] arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is modified but its new value is never used.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25
commit: e8bb8f28233d88f4ad89fdf83d54bbc4a8ee40f2 [1027/3956] MIPS: cacheinfo: Add missing VCache
compiler: mips-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <rong.a.chen(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is modified but its new value is never used. [unreadVariable]
level++;
^
vim +/level +112 arch/mips/kernel/cacheinfo.c
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 76
ef462f3b64e9fb0c Justin Chen 2016-12-07 77 static int __populate_cache_leaves(unsigned int cpu)
ef462f3b64e9fb0c Justin Chen 2016-12-07 78 {
ef462f3b64e9fb0c Justin Chen 2016-12-07 79 struct cpuinfo_mips *c = ¤t_cpu_data;
ef462f3b64e9fb0c Justin Chen 2016-12-07 80 struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
ef462f3b64e9fb0c Justin Chen 2016-12-07 81 struct cacheinfo *this_leaf = this_cpu_ci->info_list;
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 82 int level = 1;
ef462f3b64e9fb0c Justin Chen 2016-12-07 83
ef462f3b64e9fb0c Justin Chen 2016-12-07 84 if (c->icache.waysize) {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 85 /* I/D caches are per core */
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 86 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 87 populate_cache(dcache, this_leaf, level, CACHE_TYPE_DATA);
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 88 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 89 populate_cache(icache, this_leaf, level, CACHE_TYPE_INST);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 90 level++;
ef462f3b64e9fb0c Justin Chen 2016-12-07 91 } else {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 92 populate_cache(dcache, this_leaf, level, CACHE_TYPE_UNIFIED);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 93 level++;
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 94 }
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 95
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 96 if (c->vcache.waysize) {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 97 /* Vcache is per core as well */
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 98 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 99 populate_cache(vcache, this_leaf, level, CACHE_TYPE_UNIFIED);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 100 level++;
ef462f3b64e9fb0c Justin Chen 2016-12-07 101 }
ef462f3b64e9fb0c Justin Chen 2016-12-07 102
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 103 if (c->scache.waysize) {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 104 /* Scache is per cluster */
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 105 fill_cpumask_cluster(cpu, &this_leaf->shared_cpu_map);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 106 populate_cache(scache, this_leaf, level, CACHE_TYPE_UNIFIED);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 107 level++;
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 108 }
ef462f3b64e9fb0c Justin Chen 2016-12-07 109
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 110 if (c->tcache.waysize) {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 111 populate_cache(tcache, this_leaf, level, CACHE_TYPE_UNIFIED);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 @112 level++;
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 113 }
ef462f3b64e9fb0c Justin Chen 2016-12-07 114
b8bea8a5e5d942e6 Vladimir Kondratiev 2019-07-16 115 this_cpu_ci->cpu_map_populated = true;
b8bea8a5e5d942e6 Vladimir Kondratiev 2019-07-16 116
ef462f3b64e9fb0c Justin Chen 2016-12-07 117 return 0;
ef462f3b64e9fb0c Justin Chen 2016-12-07 118 }
ef462f3b64e9fb0c Justin Chen 2016-12-07 119
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH v2 9/9] KVM: arm64: Add UBSan tests for PKVM.
by kernel test robot
Hi Elena,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on arm64/for-next/core]
[cannot apply to kvmarm/next soc/for-next arm/for-next xlnx/master v5.11-rc3 next-20210115]
[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/Elena-Petrova/UBSan-Enablement-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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/cd5e5083db55d9959f564a72bc348d834...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Elena-Petrova/UBSan-Enablement-for-hyp-nVHE-code/20210115-112509
git checkout cd5e5083db55d9959f564a72bc348d83425a2838
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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/arm64/kvm/kvm_ubsan_buffer.c:12:
include/kvm/arm_pmu.h:52:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
52 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
include/kvm/arm_pmu.h:54:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
54 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
include/kvm/arm_pmu.h:56:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
56 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
arch/arm64/kvm/kvm_ubsan_buffer.c:19:6: warning: no previous prototype for '__kvm_check_ubsan_data' [-Wmissing-prototypes]
19 | void __kvm_check_ubsan_data(struct kvm_ubsan_info *slot)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/kvm_ubsan_buffer.c: In function '__kvm_check_ubsan_data':
>> arch/arm64/kvm/kvm_ubsan_buffer.c:21:2: warning: enumeration value 'UBSAN_NONE' not handled in switch [-Wswitch]
21 | switch (slot->type) {
| ^~~~~~
arch/arm64/kvm/kvm_ubsan_buffer.c: At top level:
arch/arm64/kvm/kvm_ubsan_buffer.c:62:6: warning: no previous prototype for 'iterate_kvm_ubsan_buffer' [-Wmissing-prototypes]
62 | void iterate_kvm_ubsan_buffer(unsigned long left, unsigned long right)
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/kvm_ubsan_buffer.c:75:6: warning: no previous prototype for '__kvm_check_ubsan_buffer' [-Wmissing-prototypes]
75 | void __kvm_check_ubsan_buffer(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:16:
arch/arm64/kvm/hyp/include/hyp/test_ubsan.h: In function 'test_ubsan_out_of_bounds':
>> arch/arm64/kvm/hyp/include/hyp/test_ubsan.h:55:15: warning: variable 'arr' set but not used [-Wunused-but-set-variable]
55 | volatile int arr[4];
| ^~~
arch/arm64/kvm/hyp/include/hyp/test_ubsan.h: In function 'test_ubsan_load_invalid_value':
>> arch/arm64/kvm/hyp/include/hyp/test_ubsan.h:63:19: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
63 | bool val, val2, *ptr;
| ^~~
arch/arm64/kvm/hyp/include/hyp/test_ubsan.h: In function 'test_ubsan_object_size_mismatch':
>> arch/arm64/kvm/hyp/include/hyp/test_ubsan.h:87:27: warning: variable 'val2' set but not used [-Wunused-but-set-variable]
87 | volatile long long *ptr, val2;
| ^~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c: At top level:
arch/arm64/kvm/hyp/nvhe/hyp-main.c:183:6: warning: no previous prototype for 'handle_trap' [-Wmissing-prototypes]
183 | void handle_trap(struct kvm_cpu_context *host_ctxt)
| ^~~~~~~~~~~
vim +/UBSAN_NONE +21 arch/arm64/kvm/kvm_ubsan_buffer.c
aba3219bbab3bb5c George Popescu 2021-01-14 15
aba3219bbab3bb5c George Popescu 2021-01-14 16 DECLARE_KVM_DEBUG_BUFFER(struct kvm_ubsan_info, kvm_ubsan_buffer,
aba3219bbab3bb5c George Popescu 2021-01-14 17 kvm_ubsan_buff_wr_ind, KVM_UBSAN_BUFFER_SIZE);
aba3219bbab3bb5c George Popescu 2021-01-14 18
c8a90dc1d55ba5e3 George Popescu 2021-01-14 19 void __kvm_check_ubsan_data(struct kvm_ubsan_info *slot)
c8a90dc1d55ba5e3 George Popescu 2021-01-14 20 {
c8a90dc1d55ba5e3 George Popescu 2021-01-14 @21 switch (slot->type) {
c8a90dc1d55ba5e3 George Popescu 2021-01-14 22 case UBSAN_OUT_OF_BOUNDS:
c8a90dc1d55ba5e3 George Popescu 2021-01-14 23 __ubsan_handle_out_of_bounds(&slot->out_of_bounds_data,
c8a90dc1d55ba5e3 George Popescu 2021-01-14 24 slot->u_val.lval);
c8a90dc1d55ba5e3 George Popescu 2021-01-14 25 break;
125f434abd282604 George Popescu 2021-01-14 26 case UBSAN_UNREACHABLE_DATA:
125f434abd282604 George Popescu 2021-01-14 27 __ubsan_handle_builtin_unreachable(&slot->unreachable_data);
125f434abd282604 George Popescu 2021-01-14 28 break;
3bd940afa9486b82 George Popescu 2021-01-14 29 case UBSAN_SHIFT_OUT_OF_BOUNDS:
3bd940afa9486b82 George Popescu 2021-01-14 30 __ubsan_handle_shift_out_of_bounds(&slot->shift_out_of_bounds_data,
3bd940afa9486b82 George Popescu 2021-01-14 31 slot->u_val.lval, slot->u_val.rval);
3bd940afa9486b82 George Popescu 2021-01-14 32 break;
3b42f0d25b7dd280 George Popescu 2021-01-14 33 case UBSAN_INVALID_DATA:
3b42f0d25b7dd280 George Popescu 2021-01-14 34 __ubsan_handle_load_invalid_value(&slot->invalid_value_data,
3b42f0d25b7dd280 George Popescu 2021-01-14 35 slot->u_val.lval);
3b42f0d25b7dd280 George Popescu 2021-01-14 36 break;
e7832e63ca596782 George Popescu 2021-01-14 37 case UBSAN_TYPE_MISMATCH:
e7832e63ca596782 George Popescu 2021-01-14 38 __ubsan_handle_type_mismatch(&slot->type_mismatch_data,
e7832e63ca596782 George Popescu 2021-01-14 39 slot->u_val.lval);
e7832e63ca596782 George Popescu 2021-01-14 40 break;
aaa9326468ea971e George Popescu 2021-01-14 41 case UBSAN_OVERFLOW_DATA:
aaa9326468ea971e George Popescu 2021-01-14 42 if (slot->u_val.op == '/') {
aaa9326468ea971e George Popescu 2021-01-14 43 __ubsan_handle_divrem_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 44 slot->u_val.lval, slot->u_val.rval);
aaa9326468ea971e George Popescu 2021-01-14 45 } else if (slot->u_val.op == '!') {
aaa9326468ea971e George Popescu 2021-01-14 46 __ubsan_handle_negate_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 47 slot->u_val.lval);
aaa9326468ea971e George Popescu 2021-01-14 48 } else if (slot->u_val.op == '+') {
aaa9326468ea971e George Popescu 2021-01-14 49 __ubsan_handle_add_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 50 slot->u_val.lval, slot->u_val.rval);
aaa9326468ea971e George Popescu 2021-01-14 51 } else if (slot->u_val.op == '-') {
aaa9326468ea971e George Popescu 2021-01-14 52 __ubsan_handle_sub_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 53 slot->u_val.lval, slot->u_val.rval);
aaa9326468ea971e George Popescu 2021-01-14 54 } else if (slot->u_val.op == '*') {
aaa9326468ea971e George Popescu 2021-01-14 55 __ubsan_handle_mul_overflow(&slot->overflow_data,
aaa9326468ea971e George Popescu 2021-01-14 56 slot->u_val.lval, slot->u_val.rval);
aaa9326468ea971e George Popescu 2021-01-14 57 }
aaa9326468ea971e George Popescu 2021-01-14 58 break;
c8a90dc1d55ba5e3 George Popescu 2021-01-14 59 }
c8a90dc1d55ba5e3 George Popescu 2021-01-14 60 }
aba3219bbab3bb5c George Popescu 2021-01-14 61
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[drm-drm-intel:drm-intel-gt-next 8/8] drivers/gpu/drm/i915/gem/i915_gem_stolen.c:624:5: error: no previous prototype for '__i915_gem_object_create_stolen'
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-intel drm-intel-gt-next
head: 97d5539632501af59290ead8f832e0ca6b6f69e7
commit: 97d5539632501af59290ead8f832e0ca6b6f69e7 [8/8] drm/i915/region: convert object_create into object_init
config: i386-randconfig-a006-20210115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git remote add drm-drm-intel git://anongit.freedesktop.org/drm/drm-intel
git fetch --no-tags drm-drm-intel drm-intel-gt-next
git checkout 97d5539632501af59290ead8f832e0ca6b6f69e7
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/gpu/drm/i915/gem/i915_gem_stolen.c:624:5: error: no previous prototype for '__i915_gem_object_create_stolen' [-Werror=missing-prototypes]
624 | int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/gem/i915_gem_stolen.c:649:5: error: no previous prototype for '_i915_gem_object_stolen_init' [-Werror=missing-prototypes]
649 | int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/__i915_gem_object_create_stolen +624 drivers/gpu/drm/i915/gem/i915_gem_stolen.c
623
> 624 int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
625 struct drm_i915_gem_object *obj,
626 struct drm_mm_node *stolen)
627 {
628 static struct lock_class_key lock_class;
629 unsigned int cache_level;
630 int err;
631
632 drm_gem_private_object_init(&mem->i915->drm, &obj->base, stolen->size);
633 i915_gem_object_init(obj, &i915_gem_object_stolen_ops, &lock_class);
634
635 obj->stolen = stolen;
636 obj->read_domains = I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT;
637 cache_level = HAS_LLC(mem->i915) ? I915_CACHE_LLC : I915_CACHE_NONE;
638 i915_gem_object_set_cache_coherency(obj, cache_level);
639
640 err = i915_gem_object_pin_pages(obj);
641 if (err)
642 return err;
643
644 i915_gem_object_init_memory_region(obj, mem, 0);
645
646 return 0;
647 }
648
> 649 int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
650 struct drm_i915_gem_object *obj,
651 resource_size_t size,
652 unsigned int flags)
653 {
654 struct drm_i915_private *i915 = mem->i915;
655 struct drm_mm_node *stolen;
656 int ret;
657
658 if (!drm_mm_initialized(&i915->mm.stolen))
659 return -ENODEV;
660
661 if (size == 0)
662 return -EINVAL;
663
664 stolen = kzalloc(sizeof(*stolen), GFP_KERNEL);
665 if (!stolen)
666 return -ENOMEM;
667
668 ret = i915_gem_stolen_insert_node(i915, stolen, size, 4096);
669 if (ret)
670 goto err_free;
671
672 ret = __i915_gem_object_create_stolen(mem, obj, stolen);
673 if (ret)
674 goto err_remove;
675
676 return 0;
677
678 err_remove:
679 i915_gem_stolen_remove_node(i915, stolen);
680 err_free:
681 kfree(stolen);
682 return ret;
683 }
684
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[drm-drm-intel:drm-intel-gt-next 8/8] drivers/gpu/drm/i915/gem/i915_gem_stolen.c:624:5: error: no previous prototype for function '__i915_gem_object_create_stolen'
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-intel drm-intel-gt-next
head: 97d5539632501af59290ead8f832e0ca6b6f69e7
commit: 97d5539632501af59290ead8f832e0ca6b6f69e7 [8/8] drm/i915/region: convert object_create into object_init
config: x86_64-randconfig-a012-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add drm-drm-intel git://anongit.freedesktop.org/drm/drm-intel
git fetch --no-tags drm-drm-intel drm-intel-gt-next
git checkout 97d5539632501af59290ead8f832e0ca6b6f69e7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/gpu/drm/i915/gem/i915_gem_stolen.c:624:5: error: no previous prototype for function '__i915_gem_object_create_stolen' [-Werror,-Wmissing-prototypes]
int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
^
drivers/gpu/drm/i915/gem/i915_gem_stolen.c:624:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
^
static
>> drivers/gpu/drm/i915/gem/i915_gem_stolen.c:649:5: error: no previous prototype for function '_i915_gem_object_stolen_init' [-Werror,-Wmissing-prototypes]
int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
^
drivers/gpu/drm/i915/gem/i915_gem_stolen.c:649:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
^
static
2 errors generated.
vim +/__i915_gem_object_create_stolen +624 drivers/gpu/drm/i915/gem/i915_gem_stolen.c
623
> 624 int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
625 struct drm_i915_gem_object *obj,
626 struct drm_mm_node *stolen)
627 {
628 static struct lock_class_key lock_class;
629 unsigned int cache_level;
630 int err;
631
632 drm_gem_private_object_init(&mem->i915->drm, &obj->base, stolen->size);
633 i915_gem_object_init(obj, &i915_gem_object_stolen_ops, &lock_class);
634
635 obj->stolen = stolen;
636 obj->read_domains = I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT;
637 cache_level = HAS_LLC(mem->i915) ? I915_CACHE_LLC : I915_CACHE_NONE;
638 i915_gem_object_set_cache_coherency(obj, cache_level);
639
640 err = i915_gem_object_pin_pages(obj);
641 if (err)
642 return err;
643
644 i915_gem_object_init_memory_region(obj, mem, 0);
645
646 return 0;
647 }
648
> 649 int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
650 struct drm_i915_gem_object *obj,
651 resource_size_t size,
652 unsigned int flags)
653 {
654 struct drm_i915_private *i915 = mem->i915;
655 struct drm_mm_node *stolen;
656 int ret;
657
658 if (!drm_mm_initialized(&i915->mm.stolen))
659 return -ENODEV;
660
661 if (size == 0)
662 return -EINVAL;
663
664 stolen = kzalloc(sizeof(*stolen), GFP_KERNEL);
665 if (!stolen)
666 return -ENOMEM;
667
668 ret = i915_gem_stolen_insert_node(i915, stolen, size, 4096);
669 if (ret)
670 goto err_free;
671
672 ret = __i915_gem_object_create_stolen(mem, obj, stolen);
673 if (ret)
674 goto err_remove;
675
676 return 0;
677
678 err_remove:
679 i915_gem_stolen_remove_node(i915, stolen);
680 err_free:
681 kfree(stolen);
682 return ret;
683 }
684
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH 11/21] objtool: Move unsuffixed symbol conversion to a helper function
by kernel test robot
Hi Josh,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/master]
[also build test ERROR on linus/master v5.11-rc3 next-20210115]
[cannot apply to xen-tip/linux-next tip/x86/core]
[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/Josh-Poimboeuf/objtool-vmlinux-o...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2c2adbc40b7276518921864053f3c02034b2290f
config: x86_64-randconfig-r021-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/f06729b24980b0cdff19419510b17f5b4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Josh-Poimboeuf/objtool-vmlinux-o-and-CLANG-LTO-support/20210115-125439
git checkout f06729b24980b0cdff19419510b17f5b493dc756
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> elf.c:409:8: error: unused variable 'coldstr' [-Werror,-Wunused-variable]
char *coldstr;
^
1 error generated.
make[4]: *** [tools/build/Makefile.build:96: tools/objtool/elf.o] Error 1
make[3]: *** [Makefile:59: tools/objtool/objtool-in.o] Error 2
--
>> elf.c:409:8: error: unused variable 'coldstr' [-Werror,-Wunused-variable]
char *coldstr;
^
1 error generated.
make[4]: *** [tools/build/Makefile.build:96: tools/objtool/elf.o] Error 1
make[3]: *** [Makefile:59: tools/objtool/objtool-in.o] Error 2
make[2]: *** [Makefile:68: objtool] Error 2
make[1]: *** [Makefile:1931: tools/objtool] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
>> elf.c:409:8: error: unused variable 'coldstr' [-Werror,-Wunused-variable]
char *coldstr;
^
1 error generated.
make[4]: *** [tools/build/Makefile.build:96: tools/objtool/elf.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:59: tools/objtool/objtool-in.o] Error 2
make[2]: *** [Makefile:68: objtool] Error 2
make[1]: *** [Makefile:1931: tools/objtool] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH] ACPI: introduce support for FPDT table
by kernel test robot
Hi Zhang,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pm/linux-next]
[also build test WARNING on linus/master v5.11-rc3 next-20210115]
[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/Zhang-Rui/ACPI-introduce-support...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/48fba58f7364b11bb5f0ea5b2e3843c75...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zhang-Rui/ACPI-introduce-support-for-FPDT-table/20210115-175532
git checkout 48fba58f7364b11bb5f0ea5b2e3843c7580c95dd
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/acpi/acpi_fpdt.c:230:6: warning: no previous prototype for 'acpi_init_fpdt' [-Wmissing-prototypes]
230 | void acpi_init_fpdt(void)
| ^~~~~~~~~~~~~~
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:16,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/acpi/acpi_fpdt.c:11:
drivers/acpi/acpi_fpdt.c: In function 'acpi_init_fpdt':
>> include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
include/linux/printk.h:373:9: note: in expansion of macro 'KERN_INFO'
373 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
drivers/acpi/acpi_fpdt.c:255:4: note: in expansion of macro 'pr_info'
255 | pr_info(FW_BUG, "Invalid subtable type %d found.\n",
| ^~~~~~~
vim +/acpi_init_fpdt +230 drivers/acpi/acpi_fpdt.c
229
> 230 void acpi_init_fpdt(void)
231 {
232 acpi_status status;
233 struct acpi_table_header *header;
234 struct fpdt_subtable_entry *subtable;
235 u32 offset = sizeof(*header);
236
237 status = acpi_get_table(ACPI_SIG_FPDT, 0, &header);
238
239 if (ACPI_FAILURE(status))
240 return;
241
242 fpdt_kobj = kobject_create_and_add("fpdt", acpi_kobj);
243 if (!fpdt_kobj)
244 return;
245
246 while (offset < header->length) {
247 subtable = (void *)header + offset;
248 switch (subtable->type) {
249 case SUBTABLE_FBPT:
250 case SUBTABLE_S3PT:
251 fpdt_process_subtable(subtable->address,
252 subtable->type);
253 break;
254 default:
255 pr_info(FW_BUG, "Invalid subtable type %d found.\n",
256 subtable->type);
257 return;
258 }
259 offset += sizeof(*subtable);
260 }
261 }
262
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [RPC PATCH bpf-next] bpf: implement new BPF_CGROUP_INET_SOCK_POST_CONNECT
by kernel test robot
Hi Stanislav,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Stanislav-Fomichev/bpf-implement...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: powerpc64-randconfig-r021-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/342141c74fe4ece77f9d9753918a77e66...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Stanislav-Fomichev/bpf-implement-new-BPF_CGROUP_INET_SOCK_POST_CONNECT/20210115-112524
git checkout 342141c74fe4ece77f9d9753918a77e66d9d3316
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 >>):
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ipv4/af_inet.c:81:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:100:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ipv4/af_inet.c:81:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:102:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ipv4/af_inet.c:81:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:104:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ipv4/af_inet.c:81:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:106:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ipv4/af_inet.c:81:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:108:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/ipv4/af_inet.c:579:9: error: implicit declaration of function 'BPF_CGROUP_RUN_PROG_INET_SOCK_POST_CONNECT_LOCKED' [-Werror,-Wimplicit-function-declaration]
err = BPF_CGROUP_RUN_PROG_INET_SOCK_POST_CONNECT_LOCKED(sk);
^
>> net/ipv4/af_inet.c:730:9: error: implicit declaration of function 'BPF_CGROUP_RUN_PROG_INET_SOCK_POST_CONNECT' [-Werror,-Wimplicit-function-declaration]
err = BPF_CGROUP_RUN_PROG_INET_SOCK_POST_CONNECT(sock->sk);
^
6 warnings and 2 errors generated.
vim +/BPF_CGROUP_RUN_PROG_INET_SOCK_POST_CONNECT_LOCKED +579 net/ipv4/af_inet.c
557
558 int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
559 int addr_len, int flags)
560 {
561 struct sock *sk = sock->sk;
562 int err;
563
564 if (addr_len < sizeof(uaddr->sa_family))
565 return -EINVAL;
566 if (uaddr->sa_family == AF_UNSPEC)
567 return sk->sk_prot->disconnect(sk, flags);
568
569 if (BPF_CGROUP_PRE_CONNECT_ENABLED(sk)) {
570 err = sk->sk_prot->pre_connect(sk, uaddr, addr_len);
571 if (err)
572 return err;
573 }
574
575 if (!inet_sk(sk)->inet_num && inet_autobind(sk))
576 return -EAGAIN;
577 err = sk->sk_prot->connect(sk, uaddr, addr_len);
578 if (!err)
> 579 err = BPF_CGROUP_RUN_PROG_INET_SOCK_POST_CONNECT_LOCKED(sk);
580 return err;
581 }
582 EXPORT_SYMBOL(inet_dgram_connect);
583
584 static long inet_wait_for_connect(struct sock *sk, long timeo, int writebias)
585 {
586 DEFINE_WAIT_FUNC(wait, woken_wake_function);
587
588 add_wait_queue(sk_sleep(sk), &wait);
589 sk->sk_write_pending += writebias;
590
591 /* Basic assumption: if someone sets sk->sk_err, he _must_
592 * change state of the socket from TCP_SYN_*.
593 * Connect() does not allow to get error notifications
594 * without closing the socket.
595 */
596 while ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) {
597 release_sock(sk);
598 timeo = wait_woken(&wait, TASK_INTERRUPTIBLE, timeo);
599 lock_sock(sk);
600 if (signal_pending(current) || !timeo)
601 break;
602 }
603 remove_wait_queue(sk_sleep(sk), &wait);
604 sk->sk_write_pending -= writebias;
605 return timeo;
606 }
607
608 /*
609 * Connect to a remote host. There is regrettably still a little
610 * TCP 'magic' in here.
611 */
612 int __inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
613 int addr_len, int flags, int is_sendmsg)
614 {
615 struct sock *sk = sock->sk;
616 int err;
617 long timeo;
618
619 /*
620 * uaddr can be NULL and addr_len can be 0 if:
621 * sk is a TCP fastopen active socket and
622 * TCP_FASTOPEN_CONNECT sockopt is set and
623 * we already have a valid cookie for this socket.
624 * In this case, user can call write() after connect().
625 * write() will invoke tcp_sendmsg_fastopen() which calls
626 * __inet_stream_connect().
627 */
628 if (uaddr) {
629 if (addr_len < sizeof(uaddr->sa_family))
630 return -EINVAL;
631
632 if (uaddr->sa_family == AF_UNSPEC) {
633 err = sk->sk_prot->disconnect(sk, flags);
634 sock->state = err ? SS_DISCONNECTING : SS_UNCONNECTED;
635 goto out;
636 }
637 }
638
639 switch (sock->state) {
640 default:
641 err = -EINVAL;
642 goto out;
643 case SS_CONNECTED:
644 err = -EISCONN;
645 goto out;
646 case SS_CONNECTING:
647 if (inet_sk(sk)->defer_connect)
648 err = is_sendmsg ? -EINPROGRESS : -EISCONN;
649 else
650 err = -EALREADY;
651 /* Fall out of switch with err, set for this state */
652 break;
653 case SS_UNCONNECTED:
654 err = -EISCONN;
655 if (sk->sk_state != TCP_CLOSE)
656 goto out;
657
658 if (BPF_CGROUP_PRE_CONNECT_ENABLED(sk)) {
659 err = sk->sk_prot->pre_connect(sk, uaddr, addr_len);
660 if (err)
661 goto out;
662 }
663
664 err = sk->sk_prot->connect(sk, uaddr, addr_len);
665 if (err < 0)
666 goto out;
667
668 sock->state = SS_CONNECTING;
669
670 if (!err && inet_sk(sk)->defer_connect)
671 goto out;
672
673 /* Just entered SS_CONNECTING state; the only
674 * difference is that return value in non-blocking
675 * case is EINPROGRESS, rather than EALREADY.
676 */
677 err = -EINPROGRESS;
678 break;
679 }
680
681 timeo = sock_sndtimeo(sk, flags & O_NONBLOCK);
682
683 if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) {
684 int writebias = (sk->sk_protocol == IPPROTO_TCP) &&
685 tcp_sk(sk)->fastopen_req &&
686 tcp_sk(sk)->fastopen_req->data ? 1 : 0;
687
688 /* Error code is set above */
689 if (!timeo || !inet_wait_for_connect(sk, timeo, writebias))
690 goto out;
691
692 err = sock_intr_errno(timeo);
693 if (signal_pending(current))
694 goto out;
695 }
696
697 /* Connection was closed by RST, timeout, ICMP error
698 * or another process disconnected us.
699 */
700 if (sk->sk_state == TCP_CLOSE)
701 goto sock_error;
702
703 /* sk->sk_err may be not zero now, if RECVERR was ordered by user
704 * and error was received after socket entered established state.
705 * Hence, it is handled normally after connect() return successfully.
706 */
707
708 sock->state = SS_CONNECTED;
709 err = 0;
710 out:
711 return err;
712
713 sock_error:
714 err = sock_error(sk) ? : -ECONNABORTED;
715 sock->state = SS_UNCONNECTED;
716 if (sk->sk_prot->disconnect(sk, flags))
717 sock->state = SS_DISCONNECTING;
718 goto out;
719 }
720 EXPORT_SYMBOL(__inet_stream_connect);
721
722 int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
723 int addr_len, int flags)
724 {
725 int err;
726
727 lock_sock(sock->sk);
728 err = __inet_stream_connect(sock, uaddr, addr_len, flags, 0);
729 if (!err)
> 730 err = BPF_CGROUP_RUN_PROG_INET_SOCK_POST_CONNECT(sock->sk);
731 release_sock(sock->sk);
732 return err;
733 }
734 EXPORT_SYMBOL(inet_stream_connect);
735
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months