From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id E96671B249 for ; Mon, 30 Oct 2017 16:35:54 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id b189so16633187wmd.4 for ; Mon, 30 Oct 2017 08:35:54 -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; bh=YbnqhwnAcdkChvlMAgSF7eF8CEXgi6YPvoQaMeeGm/w=; b=GecFfqkjS2+2rLooKJzb1k9ymkBei4LXXMhVqZYC0zPNMlHiz5sYvC5JqJoc7Iu3/2 /rXqvm7UmDUVGuRXAZ/MdtfcopoGsAQqDVP43pUdeRkMnm0bKCZZbLCIbyTV+TygmnMa Gj5Gf4Ha3L489gc4n505yxMr5FwnS7x1wo3am4Iv6p+0WG9av0WKVJ46SbmlVVoi0Aq1 NyNiC7sOpoa7q87BfrAXCjhqYDh/Fyb8NUN+6VGdZEdKiYy6OebW/CT4QnlxH16RKBZX GgxDIQGrwLxvxsfj1ifySUzJc8unD1gqnnj/xeyML0PX69tBQ2Ya5rBZHbwpVFQkXDw7 /mvA== 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; bh=YbnqhwnAcdkChvlMAgSF7eF8CEXgi6YPvoQaMeeGm/w=; b=fsA4QIbik4UITby9OdpFbEsjXXMMhUc5S4AT/pNVgP1e9NY97vloTf9EI7GPRhK2kk bJ9de6cyVWFr69ekZTRQtfI4263C8fp+jkX3x7tA+QqAfk+z8IVNVbjS+ghNMnxH/o2t FpKyZryDB3x2VArqw93YiG19/zCJ+3XQ76s28/x/0iA/jB6kzQ3Kz49/NsI4kyB75X3k TKrpp6+xtBAi1eKYpdYJu5wzbCxKzfKNmfxZuofzS+jPlV8ms40ZIxcwYJHbsa+Wrul9 3ZXfMcUAPbcgCzqnMYiHGE2SUIb8X+Wjjm+nwX13D19BKFlmrNwwMasCbHAcxbCiWd3d i8fA== X-Gm-Message-State: AMCzsaWikxhKr8csbu4z1Bcqf2ur3yt4woo64yW4RrrF53R7d9jUgXly 7fk6HVwd3V+MeVzchFN8d77iAFaj X-Google-Smtp-Source: ABhQp+RnFrQgWtCdRRCSwin4kFSw8xBLu6pfj2WShsfSODtjIHM9jj91FiQfybUn+BCn9GflE6tK0w== X-Received: by 10.28.211.15 with SMTP id k15mr3968622wmg.33.1509377754635; Mon, 30 Oct 2017 08:35:54 -0700 (PDT) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id m20sm2651779wma.26.2017.10.30.08.35.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Oct 2017 08:35:53 -0700 (PDT) From: luca.boccassi@gmail.com To: Lukasz Majczak Cc: Jan Viktorin , Chao Zhu , dpdk stable Date: Mon, 30 Oct 2017 15:34:07 +0000 Message-Id: <20171030153511.13322-4-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171030153511.13322-1-luca.boccassi@gmail.com> References: <20171030153511.13322-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'eal: fix auxv open check for ARM and PPC' has been queued to LTS release 16.11.4 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: Mon, 30 Oct 2017 15:35:55 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.4 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/01/17. So please shout if anyone has objections. Thanks. Kind regards, Luca Boccassi --- >>From aaae3f20a2e823b15e299d18e6af95211c65e9b5 Mon Sep 17 00:00:00 2001 From: Lukasz Majczak Date: Thu, 28 Sep 2017 08:54:59 +0200 Subject: [PATCH] eal: fix auxv open check for ARM and PPC [ upstream commit 1e0a17ac4c816fc41f6cf8c1fcd56149d8927263 ] The assertion of return value from the open() function is done against 0, while it is a correct value - open() returns -1 in case of an error. It causes problems while trying to run as a daemon, in which case, this call to open() will return 0 as a valid descriptor. Fixes: b94e5c9406b5 ("eal/arm: add CPU flags for ARMv7") Fixes: 97523f822ba9 ("eal/arm: add CPU flags for ARMv8") Fixes: 9ae155385686 ("eal/ppc: cpu flag checks for IBM Power") Signed-off-by: Lukasz Majczak Acked-by: Jan Viktorin Acked-by: Chao Zhu --- lib/librte_eal/common/arch/arm/rte_cpuflags.c | 2 +- lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/arch/arm/rte_cpuflags.c b/lib/librte_eal/common/arch/arm/rte_cpuflags.c index 79160a60c..35338efa2 100644 --- a/lib/librte_eal/common/arch/arm/rte_cpuflags.c +++ b/lib/librte_eal/common/arch/arm/rte_cpuflags.c @@ -137,7 +137,7 @@ rte_cpu_get_features(hwcap_registers_t out) _Elfx_auxv_t auxv; auxv_fd = open("/proc/self/auxv", O_RDONLY); - assert(auxv_fd); + assert(auxv_fd != -1); while (read(auxv_fd, &auxv, sizeof(auxv)) == sizeof(auxv)) { if (auxv.a_type == AT_HWCAP) { out[REG_HWCAP] = auxv.a_un.a_val; diff --git a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c b/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c index fcf96e045..970a61c5e 100644 --- a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c +++ b/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c @@ -108,7 +108,7 @@ rte_cpu_get_features(hwcap_registers_t out) Elf64_auxv_t auxv; auxv_fd = open("/proc/self/auxv", O_RDONLY); - assert(auxv_fd); + assert(auxv_fd != -1); while (read(auxv_fd, &auxv, sizeof(Elf64_auxv_t)) == sizeof(Elf64_auxv_t)) { if (auxv.a_type == AT_HWCAP) -- 2.11.0