From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBDB3CDB474 for ; Fri, 20 Oct 2023 13:26:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377415AbjJTN0S (ORCPT ); Fri, 20 Oct 2023 09:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377002AbjJTN0P (ORCPT ); Fri, 20 Oct 2023 09:26:15 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D3A819E for ; Fri, 20 Oct 2023 06:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697808373; x=1729344373; h=date:from:to:cc:subject:message-id:mime-version; bh=++ZVFcSAip2AZQaoqn4SR+SPZnQzBmuSbPUhK0GwyHQ=; b=irj+e++pSqPS/gzwF05MM1pzUnnkF/d85p6Rhg7dHkgUASP5zwtvEzm0 YO2cBjF52V5y2cU3ko5aYZq4AS+eIHsK1qIgg9EUdrS9W7bBoUaAL6zgV Cms9b1DMv470iDuvHGgaN7i2BDpHxBp/QjIW3TUmRYyY2C6qE8phmEwpY PMaFIGAYXss7/FwhUE/c0SWpvuwlUlt5nRzi5bifCB0tbWkxhZtJ0O0Vm c1opGOUdzyYzwwd62mhl2xdTZl3EHxQlGLmzMyuX6roTfT4Hc6S88AGrV ux6MlAiU1Ml2qJYRdHEYdVkOxi4X9489SZbfJYlL5P2mjJp05G7OtltKX g==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="417625967" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="417625967" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 06:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="5389329" Received: from lkp-server01.sh.intel.com (HELO 8917679a5d3e) ([10.239.97.150]) by fmviesa001.fm.intel.com with ESMTP; 20 Oct 2023 06:26:12 -0700 Received: from kbuild by 8917679a5d3e with local (Exim 4.96) (envelope-from ) id 1qtpVw-0003Yw-2s; Fri, 20 Oct 2023 13:26:08 +0000 Date: Fri, 20 Oct 2023 21:25:09 +0800 From: kernel test robot To: Pieter Jansen van Vuuren Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Edward Cree Subject: include/linux/netlink.h:116:6: warning: ') out of range, only support mangle action on ipv6.hop_limit' directive output truncated writing 60 bytes into a region of size between 46 and 55 Message-ID: <202310202136.4u7bv0hp-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pieter, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: ce55c22ec8b223a90ff3e084d842f73cfba35588 commit: 9dbc8d2b9a02f938d32741297d56cc364dc0dce6 sfc: add decrement ipv6 hop limit by offloading set hop limit actions date: 8 weeks ago config: x86_64-randconfig-016-20231007 (https://download.01.org/0day-ci/archive/20231020/202310202136.4u7bv0hp-lkp@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/202310202136.4u7bv0hp-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202310202136.4u7bv0hp-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/uapi/linux/neighbour.h:6:0, from include/linux/netdevice.h:45, from include/net/sch_generic.h:5, from include/net/pkt_cls.h:7, from drivers/net/ethernet/sfc/tc.c:12: drivers/net/ethernet/sfc/tc.c: In function 'efx_tc_mangle.isra.17': include/linux/netlink.h:116:6: warning: 'sfc: Unsupported: only support mangle ipv4.ttl when we have an exact match on ttl, mask used for match (' directive output truncated writing 104 bytes into a region of size 80 [-Wformat-truncation=] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:1157:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: directive argument in the range [0, 254] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:1157:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: 'snprintf' output between 107 and 110 bytes into a destination of size 80 if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:1157:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ >> include/linux/netlink.h:116:6: warning: ') out of range, only support mangle action on ipv6.hop_limit' directive output truncated writing 60 bytes into a region of size between 46 and 55 [-Wformat-truncation=] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:1205:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: 'snprintf' output between 86 and 95 bytes into a destination of size 80 if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:1205:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ >> include/linux/netlink.h:116:6: warning: 'sfc: Unsupported: only support mangle ipv6.hop_limit when we have an exact match on ttl, mask used for match (' directive output truncated writing 110 bytes into a region of size 80 [-Wformat-truncation=] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:1216:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: directive argument in the range [0, 254] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:1216:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: 'snprintf' output between 113 and 116 bytes into a destination of size 80 if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:1216:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c: In function 'efx_tc_flower_record_encap_match': include/linux/netlink.h:116:6: warning: ' conflicts with existing pseudo(MASK) entry for TOS mask ' directive output truncated writing 57 bytes into a region of size between 33 and 39 [-Wformat-truncation=] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:627:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: directive argument in the range [0, 2147483647] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:627:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: 'snprintf' output between 103 and 115 bytes into a destination of size 80 if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:627:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: warning: ' conflicts with existing pseudo(MASK) entry for mask ' directive output truncated writing 53 bytes into a region of size between 24 and 33 [-Wformat-truncation=] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:634:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: directive argument in the range [0, 2147483647] if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:634:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:116:6: note: 'snprintf' output between 102 and 120 bytes into a destination of size 80 if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s" fmt "%s", "", ##args, "") >= \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/netlink.h:131:2: note: in expansion of macro 'NL_SET_ERR_MSG_FMT' NL_SET_ERR_MSG_FMT((extack), KBUILD_MODNAME ": " fmt, ##args) ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/sfc/tc.c:634:5: note: in expansion of macro 'NL_SET_ERR_MSG_FMT_MOD' NL_SET_ERR_MSG_FMT_MOD(extack, ^~~~~~~~~~~~~~~~~~~~~~ vim +116 include/linux/netlink.h 2d4bc93368f5a0 Johannes Berg 2017-04-12 107 51c352bdbcd23d Edward Cree 2022-10-18 108 /* We splice fmt with %s at each end even in the snprintf so that both calls 51c352bdbcd23d Edward Cree 2022-10-18 109 * can use the same string constant, avoiding its duplication in .ro 51c352bdbcd23d Edward Cree 2022-10-18 110 */ 51c352bdbcd23d Edward Cree 2022-10-18 111 #define NL_SET_ERR_MSG_FMT(extack, fmt, args...) do { \ 51c352bdbcd23d Edward Cree 2022-10-18 112 struct netlink_ext_ack *__extack = (extack); \ 51c352bdbcd23d Edward Cree 2022-10-18 113 \ 51c352bdbcd23d Edward Cree 2022-10-18 114 if (!__extack) \ 51c352bdbcd23d Edward Cree 2022-10-18 115 break; \ 51c352bdbcd23d Edward Cree 2022-10-18 @116 if (snprintf(__extack->_msg_buf, NETLINK_MAX_FMTMSG_LEN, \ 51c352bdbcd23d Edward Cree 2022-10-18 117 "%s" fmt "%s", "", ##args, "") >= \ 51c352bdbcd23d Edward Cree 2022-10-18 118 NETLINK_MAX_FMTMSG_LEN) \ 51c352bdbcd23d Edward Cree 2022-10-18 119 net_warn_ratelimited("%s" fmt "%s", "truncated extack: ", \ 51c352bdbcd23d Edward Cree 2022-10-18 120 ##args, "\n"); \ 51c352bdbcd23d Edward Cree 2022-10-18 121 \ 51c352bdbcd23d Edward Cree 2022-10-18 122 do_trace_netlink_extack(__extack->_msg_buf); \ 51c352bdbcd23d Edward Cree 2022-10-18 123 \ 51c352bdbcd23d Edward Cree 2022-10-18 124 __extack->_msg = __extack->_msg_buf; \ 51c352bdbcd23d Edward Cree 2022-10-18 125 } while (0) 51c352bdbcd23d Edward Cree 2022-10-18 126 :::::: The code at line 116 was first introduced by commit :::::: 51c352bdbcd23d7ce46b06c1e64c82754dc44044 netlink: add support for formatted extack messages :::::: TO: Edward Cree :::::: CC: Jakub Kicinski -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki