From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id B0A5098 for ; Tue, 24 Jul 2018 18:08:29 +0200 (CEST) Received: by mail-wm0-f45.google.com with SMTP id t25-v6so3073004wmi.3 for ; Tue, 24 Jul 2018 09:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dcvc0z0by5JO/K2j3GtSRxdrkGAKdaU7wmP4NasL4eA=; b=hLvbf072NMcxhu8yW6Q0GJlA0f02ws1rglKiXSfaFAtENvK+jRBBLzc0Ah3y4AuG6o 6hs9XrlUdbw61tW9DZLtA3lBgi9rOqhOp6FSPRNIXMh0UzAzww6ClF22C0o3QdgD9rLi BP0oA9zfuG38uxfyITP0cfb+3JxYcd2zrSEZNhFcUUgbRou3Ddn7C7KD/FG49BdCep/h ObmNhVAjzsS6yMdPkYBPMl1NjMEtyNm/P1YgcTc6IOwKiXr9akznJh5nOKNMItJ/dPkl 5wBUX/Uf5FjK1dF86nA7HAkjvf5VdNb1KTPyeAkAwv14dCPcHb/0c5aT/t7GOhd7n51T xrGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dcvc0z0by5JO/K2j3GtSRxdrkGAKdaU7wmP4NasL4eA=; b=YkWsgqbfumSn6t5wQDe0UJMqOXOw6ROHtSqltRIPxzQ4KOhL7kGbFWA1JVelafoCWA fy46UE2w0K1ZUQrSu2DWOKlkidOOTHQvUJqEs08a/Z9TySA5asn0jI0f9yqquS+oXsRl fhv0LWziSLuDaaVsZWtHS2xCqtb11dkaLtPAiOs5yo651OZETgGumRbjopkJeQ9BhoMh eM8h+oJvdPgmG5xvCBmr7IoqM0FNTyprmY0t3ZpBH0Ls0VddY8a52zqwEF2mYCovXwqy iQvRqKhqHbJ5Sr97dxEyC7ynvA15m494a6zOdTlZjONtU39q1fnWy/KWE91d2sgGynoe stTw== X-Gm-Message-State: AOUpUlFSM1JveJoozlTu3loN3PFRG/ZCcWN7Q1K3bEhDKnN5WdpS6KMP HutscvEUTESyQjSaURawBpYDWzLPDPA= X-Google-Smtp-Source: AAOMgpc/gikgisYpNDyz6Q2vW0jM2OjRHE907BQHrwCd1xz4ltsjoaqhm60GnmiInsZlq2V5EmWFcQ== X-Received: by 2002:a1c:4489:: with SMTP id r131-v6mr2262293wma.128.1532448509428; Tue, 24 Jul 2018 09:08:29 -0700 (PDT) Received: from localhost ([2a00:23c5:be94:4600:7b12:f8a0:fd52:f87d]) by smtp.gmail.com with ESMTPSA id e141-v6sm3669348wmd.32.2018.07.24.09.08.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jul 2018 09:08:28 -0700 (PDT) From: luca.boccassi@gmail.com To: Ferruh Yigit Cc: Pablo de Lara , dpdk stable Date: Tue, 24 Jul 2018 17:07:26 +0100 Message-Id: <20180724160752.20287-8-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724160752.20287-1-luca.boccassi@gmail.com> References: <20180724160752.20287-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'kni: fix build with gcc 8.1' has been queued to LTS release 16.11.8 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2018 16:08:29 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From b0d01dc7e4fc20d7e5ec0ba2546bb9b11d0ffb7d Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 26 Jun 2018 12:38:07 +0100 Subject: [PATCH] kni: fix build with gcc 8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit a36b40dd8ecfb61648045e418551f75055ca77f9 ] Error observed when CONFIG_RTE_KNI_KMOD_ETHTOOL config option is enabled. build error: In function ‘strncpy’, inlined from ‘igb_get_drvinfo’ at kernel/linux/kni/igb_ethtool.c:814:2: include/linux/string.h:246:9: error: ‘__builtin_strncpy’ output may be truncated copying 31 bytes from a string of length 42 [-Werror=stringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixed by using strlcpy instead of strncpy. adapter->fw_version size kept same because of c3698192940c ("kni: fix build with gcc 7.1") Also next line strncpy usage replaced with strlcpy while arround. Fixes: c3698192940c ("kni: fix build with gcc 7.1") Signed-off-by: Ferruh Yigit Acked-by: Pablo de Lara --- lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c index d7a987d54..1110bef87 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c @@ -826,9 +826,10 @@ static void igb_get_drvinfo(struct net_device *netdev, strncpy(drvinfo->driver, igb_driver_name, sizeof(drvinfo->driver) - 1); strncpy(drvinfo->version, igb_driver_version, sizeof(drvinfo->version) - 1); - strncpy(drvinfo->fw_version, adapter->fw_version, - sizeof(drvinfo->fw_version) - 1); - strncpy(drvinfo->bus_info, pci_name(adapter->pdev), sizeof(drvinfo->bus_info) -1); + strlcpy(drvinfo->fw_version, adapter->fw_version, + sizeof(drvinfo->fw_version)); + strlcpy(drvinfo->bus_info, pci_name(adapter->pdev), + sizeof(drvinfo->bus_info)); drvinfo->n_stats = IGB_STATS_LEN; drvinfo->testinfo_len = IGB_TEST_LEN; drvinfo->regdump_len = igb_get_regs_len(netdev); -- 2.18.0