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 E1D20A04DD for ; Wed, 18 Nov 2020 17:38:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5F6FC970; Wed, 18 Nov 2020 17:37:34 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 72CD3C956 for ; Wed, 18 Nov 2020 17:37:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605717452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oPDLB4vG5OVnIl5IvGbzC/QOEldM5TM1pgbWCjlf37o=; b=OVxTF2vsEPvQDzGjB9gXAuhZUxfxKpuS1haW9Igt/gNsM95NJHMu66cXB+n7itucyl26gB pX+94UvxwxwC+Ro4QWinBw9Oq1gKgzybEU+rVhQoer9x2jjAJpz1to+//1CZtiyhOdlXCp 3UqOlWdk7MqK3c+HO48eeZdUkn9HMNw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-404-UH0SCQZGNW6tPChGIJmsPw-1; Wed, 18 Nov 2020 11:37:29 -0500 X-MC-Unique: UH0SCQZGNW6tPChGIJmsPw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7014410766C2; Wed, 18 Nov 2020 16:37:27 +0000 (UTC) Received: from rh.redhat.com (ovpn-113-249.ams2.redhat.com [10.36.113.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6404C5C1A3; Wed, 18 Nov 2020 16:37:26 +0000 (UTC) From: Kevin Traynor To: Bruce Richardson Cc: David Hunt , dpdk stable Date: Wed, 18 Nov 2020 16:35:28 +0000 Message-Id: <20201118163558.1101823-42-ktraynor@redhat.com> In-Reply-To: <20201118163558.1101823-1-ktraynor@redhat.com> References: <20201118163558.1101823-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 LTS release 18.11.11 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 LTS release 18.11.11 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/24/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/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/0c91ae2ac58c6da03616fafa85ff05e69d483312 Thanks. Kevin. --- >From 0c91ae2ac58c6da03616fafa85ff05e69d483312 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 c53ad4bf1b..acd2896ed2 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -462,7 +462,13 @@ add_all_channels(const char *vm_name) } - 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) { -- 2.26.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-18 16:33:38.726388854 +0000 +++ 0042-examples-vm_power-fix-build-on-Ubuntu-20.04.patch 2020-11-18 16:33:37.942215070 +0000 @@ -1 +1 @@ -From a9f57cfc08810a0936bdc4f4766373a9802bca8e Mon Sep 17 00:00:00 2001 +From 0c91ae2ac58c6da03616fafa85ff05e69d483312 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit a9f57cfc08810a0936bdc4f4766373a9802bca8e ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -32 +33 @@ -index 74a2a677e8..a26315051b 100644 +index c53ad4bf1b..acd2896ed2 100644 @@ -35 +36 @@ -@@ -468,7 +468,13 @@ add_all_channels(const char *vm_name) +@@ -462,7 +462,13 @@ add_all_channels(const char *vm_name)