From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ABE99A0527 for ; Mon, 9 Nov 2020 19:41:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F73669C8; Mon, 9 Nov 2020 19:41:46 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by dpdk.org (Postfix) with ESMTP id 7C55E69C8 for ; Mon, 9 Nov 2020 19:41:44 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id 33so9858437wrl.7 for ; Mon, 09 Nov 2020 10:41:44 -0800 (PST) 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=xb4X7UPrdspkkbnrqCjzbMv0rC1oAcQTPoW4EsGyIgs=; b=LmRUrGzI7CFQHcrldWw1euwGzR04BlOYQSM82wf733b+c4iqs+OYLJ21LrsHsfeTCY dY7k9N34ikPqtmN1ybeok2K5UBiiJ+b2G1Lv1eSvf5qu1m4M0mhQ+OHoAQX9Vsp70FRR EPl0Cu8gSkjredDhXI9LzAxqEl3wzd0+kgraMOhLPok3RFhNmwPu7vIYrhO4JhIwAmCc ALFzH5PA8uwN/v/Rcj4FFf7J6oMgkRrVKRt36bPY90pJmNmYiz/u/YMlUZLL1pVZdgki B1XCBleHa7y1J/2wnvuIDO7zcyQ8A2/+abgeFozfmI11AC7eThrFAxgMvSVb/AX89DOF j12g== 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=xb4X7UPrdspkkbnrqCjzbMv0rC1oAcQTPoW4EsGyIgs=; b=n7oxQw5FBUNjyWUJMcjfEgWZarp4pZLjeL/Zldx3v1eyYIu9wYCdqWo/y1U4++FZ7t G4pErkYIXUps85Dr+SX5oXRx81nR+Gnria8RECloDnyHawdTiL1gQZySCHPWWAQF4QJf Tz9lPn/nrJWNqmd9QVQ5KKAV9PjxPh28dAy7tWtS2pQ+uSBRiwlNOp9awsLNKBkIYkJG 2H6fxvcfurzU4UpqYrHUkTR5SZ+O2K3knF8mCV5aeCjdlY0w5QDwcBMA6Imu/8DqIWJw mJCiz7rJZdsjYoOkcTuTQeDvZkhsI2BbfjPQj+A5ddPmUnZKhFXQ2NtQ4D4mOmVVQknu HESw== X-Gm-Message-State: AOAM530HXtFoeE5OFm/Gl6VSK7J8eX1yX9po0zdCYYgJxsg/diI6CFbE SMhhfSQOLsyaekIqOctwcM8= X-Google-Smtp-Source: ABdhPJwEscqeiUVPIg/jfG/fQF+nAf4x34WMDx1X01s3kpmwWDHY6CfF5G2vvzHm1H1YjNWTqi8tmg== X-Received: by 2002:adf:a54d:: with SMTP id j13mr16222448wrb.132.1604947304282; Mon, 09 Nov 2020 10:41:44 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id w186sm296282wmb.26.2020.11.09.10.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 10:41:43 -0800 (PST) From: luca.boccassi@gmail.com To: Bruce Richardson Cc: David Hunt , dpdk stable Date: Mon, 9 Nov 2020 18:39:56 +0000 Message-Id: <20201109184111.3463090-8-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201109184111.3463090-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-207-luca.boccassi@gmail.com> <20201109184111.3463090-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' has been queued to stable release 19.11.6 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/11/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/d14d8f22ce4ed2672fed1ae174503238f820d726 Thanks. Luca Boccassi --- >From d14d8f22ce4ed2672fed1ae174503238f820d726 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Wed, 28 Oct 2020 16:27:00 +0000 Subject: [PATCH] examples/vm_power: fix build on Ubuntu 20.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit a9f57cfc08810a0936bdc4f4766373a9802bca8e ] When compiling on Ubuntu 20.04, a warning was issued about possible truncation of the path string for the power management socket. channel_manager.c: In function ‘add_all_channels’: channel_manager.c:470:41: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 90 [-Wformat-truncation=] 470 | sizeof(chan_info->channel_path), "%s%s", | ^~ This can be fixed by adding in an explicit truncation check to the code and handling it appropriately. Fixes: e8ae9b662506 ("examples/vm_power: channel manager and monitor in host") Signed-off-by: Bruce Richardson Acked-by: David Hunt --- examples/vm_power_manager/channel_manager.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c index 74a2a677e8..a26315051b 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -467,9 +467,15 @@ add_all_channels(const char *vm_name) continue; } - snprintf(chan_info->channel_path, + if ((size_t)snprintf(chan_info->channel_path, sizeof(chan_info->channel_path), "%s%s", - CHANNEL_MGR_SOCKET_PATH, dir->d_name); + CHANNEL_MGR_SOCKET_PATH, dir->d_name) + >= sizeof(chan_info->channel_path)) { + RTE_LOG(ERR, CHANNEL_MANAGER, "Pathname too long for channel '%s%s'\n", + CHANNEL_MGR_SOCKET_PATH, dir->d_name); + rte_free(chan_info); + continue; + } if (setup_channel_info(&vm_info, &chan_info, channel_num) < 0) { rte_free(chan_info); -- 2.27.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-09 18:40:11.538379585 +0000 +++ 0008-examples-vm_power-fix-build-on-Ubuntu-20.04.patch 2020-11-09 18:40:11.071310349 +0000 @@ -1 +1 @@ -From a9f57cfc08810a0936bdc4f4766373a9802bca8e Mon Sep 17 00:00:00 2001 +From d14d8f22ce4ed2672fed1ae174503238f820d726 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit a9f57cfc08810a0936bdc4f4766373a9802bca8e ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org