From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] mem: Warn once if /proc/self/pagemap is unreadable Date: Fri, 10 Jul 2015 23:43:45 +0200 Message-ID: <23551222.oNXA63GnvA@xps13> References: <20150624103352.58d20fb3@miho> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Simon Kagstrom Return-path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id E2299C43A for ; Fri, 10 Jul 2015 23:44:54 +0200 (CEST) Received: by wgxm20 with SMTP id m20so75526352wgx.3 for ; Fri, 10 Jul 2015 14:44:54 -0700 (PDT) In-Reply-To: <20150624103352.58d20fb3@miho> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-06-24 10:33, Simon Kagstrom: > Newer kernels make this unreadable for security reasons for non-roots. > Running the application will then fill the logs with > > rte_mem_virt2phy: cannot open /proc/self/pagemap > > messages. > > However, there are cases when DPDK is and should be run as non-root, > without the need for virtual-to-physical address translations: a > typical example is when working with PCAP input/output. This patch > adds a start-time check for /proc/self/pagemap readability, and > directly returns an error code from rte_mem_virt2phy(). > > This way, there is only a one-time warning at startup instead of > constant warnings all the time. > > Signed-off-by: Simon Kagstrom > Signed-off-by: Johan Faltstrom Applied, thanks