From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=MnwHAUC6vd+vGTccuPhpaJdoQeeeM5TgwXDpjLu4aRI=; b=Wg7OAOcfeB2vCdmPhSZhu14xgDqgU5B75bPI5sWcyJWzj5T1XwDPoSjnE1W4LevbDM dvSgXCInyHDflLG/opWlAWgcCQwtPWJvlMMAD06qQbATdvwp6nYDfy3wTuY/0u4l3KMQ 7jL6CcqOS2H8j3Aoxi1XOs+UUln2v+L4inu4imQrYDK8KbV4URazMg/HkNUk6YPXYp7L hqhtvAjfDIrqCa5lfoh8Q96vyawx1UYG/j4L2eKzjpaSZtKnI6Y1rgofJtH8nMOk2Jnj u0pxFOCPQGi4BSl1qgeJqi06niA7Q4f0AY3aYquR4TWvJp8xcqKX5eWchw1k01DmvNjj 9nZw== X-Gm-Message-State: ALoCoQnTd+sf3h1EJ7CV02e1q+E1D2sZipfld4bqgUO4g0mQWtalXUVT9UMxU8g5c1JlEhpksRWH X-Received: by 10.180.77.107 with SMTP id r11mr1605424wiw.74.1436564694746; Fri, 10 Jul 2015 14:44:54 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id d5sm752310wiz.24.2015.07.10.14.44.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2015 14:44:54 -0700 (PDT) From: Thomas Monjalon To: Simon Kagstrom Date: Fri, 10 Jul 2015 23:43:45 +0200 Message-ID: <23551222.oNXA63GnvA@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <20150624103352.58d20fb3@miho> References: <20150624103352.58d20fb3@miho> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] mem: Warn once if /proc/self/pagemap is unreadable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 21:44:55 -0000 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