From: kernel test robot <lkp@intel.com>
To: Matt Johnston <matt@codeconstruct.com.au>,
Jeremy Kerr <jk@codeconstruct.com.au>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
Matt Johnston <matt@codeconstruct.com.au>
Subject: Re: [PATCH net-next 6/7] net: mctp: Test conflicts of connect() with bind()
Date: Fri, 4 Jul 2025 19:01:46 +0800 [thread overview]
Message-ID: <202507041803.6bndMcXn-lkp@intel.com> (raw)
In-Reply-To: <20250703-mctp-bind-v1-6-bb7e97c24613@codeconstruct.com.au>
Hi Matt,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 8b98f34ce1d8c520403362cb785231f9898eb3ff]
url: https://github.com/intel-lab-lkp/linux/commits/Matt-Johnston/net-mctp-Prevent-duplicate-binds/20250703-171427
base: 8b98f34ce1d8c520403362cb785231f9898eb3ff
patch link: https://lore.kernel.org/r/20250703-mctp-bind-v1-6-bb7e97c24613%40codeconstruct.com.au
patch subject: [PATCH net-next 6/7] net: mctp: Test conflicts of connect() with bind()
config: loongarch-randconfig-001-20250704 (https://download.01.org/0day-ci/archive/20250704/202507041803.6bndMcXn-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250704/202507041803.6bndMcXn-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507041803.6bndMcXn-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from net/mctp/route.c:1584:
net/mctp/test/route-test.c:1258:65: warning: 'type1' defined but not used [-Wunused-const-variable=]
1258 | static const struct mctp_test_bind_setup bind_addr8_netdefault, type1 = {
| ^~~~~
net/mctp/test/route-test.c:1258:42: warning: 'bind_addr8_netdefault' defined but not used [-Wunused-const-variable=]
1258 | static const struct mctp_test_bind_setup bind_addr8_netdefault, type1 = {
| ^~~~~~~~~~~~~~~~~~~~~
net/mctp/test/route-test.c: In function 'mctp_bind_pair_desc':
>> net/mctp/test/route-test.c:1340:49: warning: '%s' directive output may be truncated writing up to 99 bytes into a region of size between 87 and 101 [-Wformat-truncation=]
1340 | "{bind(addr %d, type %d, net %d%s)} {bind(addr %d, type %d, net %d%s)} -> error %d",
| ^~
1341 | t->bind1->bind_addr, t->bind1->bind_type, t->bind1->bind_net, peer1,
| ~~~~~
net/mctp/test/route-test.c:1340:18: note: directive argument in the range [0, 255]
1340 | "{bind(addr %d, type %d, net %d%s)} {bind(addr %d, type %d, net %d%s)} -> error %d",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/mctp/test/route-test.c:1340:18: note: directive argument in the range [0, 255]
net/mctp/test/route-test.c:1339:9: note: 'snprintf' output between 71 and 307 bytes into a destination of size 128
1339 | snprintf(desc, KUNIT_PARAM_DESC_SIZE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1340 | "{bind(addr %d, type %d, net %d%s)} {bind(addr %d, type %d, net %d%s)} -> error %d",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1341 | t->bind1->bind_addr, t->bind1->bind_type, t->bind1->bind_net, peer1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1342 | t->bind2->bind_addr, t->bind2->bind_type, t->bind2->bind_net, peer2,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1343 | t->error);
| ~~~~~~~~~
vim +1340 net/mctp/test/route-test.c
1257
> 1258 static const struct mctp_test_bind_setup bind_addr8_netdefault, type1 = {
1259 .bind_addr = 8, .bind_net = MCTP_NET_ANY, .bind_type = 1,
1260 };
1261
1262 /* 1 is default net */
1263 static const struct mctp_test_bind_setup bind_addr8_net1_type1 = {
1264 .bind_addr = 8, .bind_net = 1, .bind_type = 1,
1265 };
1266
1267 static const struct mctp_test_bind_setup bind_addrany_net1_type1 = {
1268 .bind_addr = MCTP_ADDR_ANY, .bind_net = 1, .bind_type = 1,
1269 };
1270
1271 /* 2 is an arbitrary net */
1272 static const struct mctp_test_bind_setup bind_addr8_net2_type1 = {
1273 .bind_addr = 8, .bind_net = 2, .bind_type = 1,
1274 };
1275
1276 static const struct mctp_test_bind_setup bind_addr8_netdefault_type1 = {
1277 .bind_addr = 8, .bind_net = MCTP_NET_ANY, .bind_type = 1,
1278 };
1279
1280 static const struct mctp_test_bind_setup bind_addrany_net2_type2 = {
1281 .bind_addr = MCTP_ADDR_ANY, .bind_net = 2, .bind_type = 2,
1282 };
1283
1284 static const struct mctp_test_bind_setup bind_addrany_net2_type1_peer9 = {
1285 .bind_addr = MCTP_ADDR_ANY, .bind_net = 2, .bind_type = 1,
1286 .have_peer = true, .peer_addr = 9, .peer_net = 2,
1287 };
1288
1289 struct mctp_bind_pair_test {
1290 const struct mctp_test_bind_setup *bind1;
1291 const struct mctp_test_bind_setup *bind2;
1292 int error;
1293 };
1294
1295 /* Pairs of binds and whether they will conflict */
1296 static const struct mctp_bind_pair_test mctp_bind_pair_tests[] = {
1297 /* Both ADDR_ANY, conflict */
1298 { &bind_addrany_netdefault_type1, &bind_addrany_netdefault_type1, EADDRINUSE },
1299 /* Same specific EID, conflict */
1300 { &bind_addr8_netdefault_type1, &bind_addr8_netdefault_type1, EADDRINUSE },
1301 /* ADDR_ANY vs specific EID, OK */
1302 { &bind_addrany_netdefault_type1, &bind_addr8_netdefault_type1, 0 },
1303 /* ADDR_ANY different types, OK */
1304 { &bind_addrany_net2_type2, &bind_addrany_net2_type1, 0 },
1305 /* ADDR_ANY different nets, OK */
1306 { &bind_addrany_net2_type1, &bind_addrany_netdefault_type1, 0 },
1307
1308 /* specific EID, NET_ANY (resolves to default)
1309 * vs specific EID, explicit default net 1, conflict
1310 */
1311 { &bind_addr8_netdefault_type1, &bind_addr8_net1_type1, EADDRINUSE },
1312
1313 /* specific EID, net 1 vs specific EID, net 2, ok */
1314 { &bind_addr8_net1_type1, &bind_addr8_net2_type1, 0 },
1315
1316 /* ANY_ADDR, NET_ANY (doesn't resolve to default)
1317 * vs ADDR_ANY, explicit default net 1, OK
1318 */
1319 { &bind_addrany_netdefault_type1, &bind_addrany_net1_type1, 0 },
1320
1321 /* specific remote peer doesn't conflict with any-peer bind */
1322 { &bind_addrany_net2_type1_peer9, &bind_addrany_net2_type1, 0 },
1323
1324 /* bind() NET_ANY is allowed with a connect() net */
1325 { &bind_addrany_net2_type1_peer9, &bind_addrany_netdefault_type1, 0 },
1326 };
1327
1328 static void mctp_bind_pair_desc(const struct mctp_bind_pair_test *t, char *desc)
1329 {
1330 char peer1[100] = {0}, peer2[100] = {0};
1331
1332 if (t->bind1->have_peer)
1333 snprintf(peer1, sizeof(peer1), ", peer %d net %d",
1334 t->bind1->peer_addr, t->bind1->peer_net);
1335 if (t->bind2->have_peer)
1336 snprintf(peer2, sizeof(peer2), ", peer %d net %d",
1337 t->bind2->peer_addr, t->bind2->peer_net);
1338
1339 snprintf(desc, KUNIT_PARAM_DESC_SIZE,
> 1340 "{bind(addr %d, type %d, net %d%s)} {bind(addr %d, type %d, net %d%s)} -> error %d",
1341 t->bind1->bind_addr, t->bind1->bind_type, t->bind1->bind_net, peer1,
1342 t->bind2->bind_addr, t->bind2->bind_type, t->bind2->bind_net, peer2,
1343 t->error);
1344 }
1345
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-07-04 11:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 9:11 [PATCH net-next 0/7] net: mctp: Improved bind handling Matt Johnston
2025-07-03 9:11 ` [PATCH net-next 1/7] net: mctp: Prevent duplicate binds Matt Johnston
2025-07-03 9:11 ` [PATCH net-next 2/7] net: mctp: Treat MCTP_NET_ANY specially in bind() Matt Johnston
2025-07-03 9:11 ` [PATCH net-next 3/7] net: mctp: Add test for conflicting bind()s Matt Johnston
2025-07-04 11:55 ` kernel test robot
2025-07-03 9:11 ` [PATCH net-next 4/7] net: mctp: Use hashtable for binds Matt Johnston
2025-07-03 9:11 ` [PATCH net-next 5/7] net: mctp: Allow limiting binds to a peer address Matt Johnston
2025-07-14 19:16 ` Dan Carpenter
2025-07-15 1:13 ` Matt Johnston
2025-07-03 9:11 ` [PATCH net-next 6/7] net: mctp: Test conflicts of connect() with bind() Matt Johnston
2025-07-04 11:01 ` kernel test robot [this message]
2025-07-03 9:11 ` [PATCH net-next 7/7] net: mctp: Add bind lookup test Matt Johnston
2025-08-11 11:35 ` Alexandre Ghiti
2025-08-12 5:11 ` Matt Johnston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202507041803.6bndMcXn-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.