From patchwork Mon Dec 5 18:26:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 86597 Delivered-To: patch@linaro.org Received: by 10.182.112.6 with SMTP id im6csp1830728obb; Mon, 5 Dec 2016 09:27:31 -0800 (PST) X-Received: by 10.55.71.150 with SMTP id u144mr49105783qka.300.1480958851608; Mon, 05 Dec 2016 09:27:31 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u65si9358896qkf.303.2016.12.05.09.27.31; Mon, 05 Dec 2016 09:27:31 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0059062D1E; Mon, 5 Dec 2016 17:27:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7C26962CEF; Mon, 5 Dec 2016 17:27:27 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4B7F062D07; Mon, 5 Dec 2016 17:27:26 +0000 (UTC) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by lists.linaro.org (Postfix) with ESMTPS id 593BF60DC1 for ; Mon, 5 Dec 2016 17:27:25 +0000 (UTC) Received: by mail-lf0-f42.google.com with SMTP id b14so227094280lfg.2 for ; Mon, 05 Dec 2016 09:27:25 -0800 (PST) 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; bh=EoXm7ZLAiCituwQ/kb0RSonvnoUTq551nO6lhzuxotQ=; b=SBFqciywA8Ox85zJfsdQoWPvuS2ejrHC/t/SuOmBAYVeBtSShN0JoX9gECcnRHQ7Pd /BZHfLCXNwlFp8insS4CF6IcdwUEWnzSb8kfNM3bkDLMD7TxukDGcU7KIW10DodKMfMC Wyqcuczg7W8NIzW7mLKTIWmKY/JK40rDeriiwIb3xRVjdDe1+tcdkJwQ/K4NlXjK1Bos 0eLhU+PSRSOka0An2bM9XhJw9G5EgM/xrA1dzy4B8AvRDYhF20MBhlTZRKKBpOJHFIwI cZ3geKWDm/U7p4tSSgAVP7mZIreW283z4qaGZBhxG1qGGcT6oaiaZgSN5ico1EFW8wtD j2EA== X-Gm-Message-State: AKaTC01+OzZFfVXpSITqcBX3u3LL+c4Gi6oA1dBC8kG/a/tj+/phZrJ0bKfpbj5VSJLLm0EtDFM= X-Received: by 10.46.78.26 with SMTP id c26mr27764613ljb.46.1480958843736; Mon, 05 Dec 2016 09:27:23 -0800 (PST) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id 64sm3121688ljf.17.2016.12.05.09.27.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Dec 2016 09:27:23 -0800 (PST) From: Christophe Milard To: maxim.uvarov@linaro.com, mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Mon, 5 Dec 2016 19:26:55 +0100 Message-Id: <1480962415-31899-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [lng-odp] [API-NEXT PATCH] linux-gen: shared_memory: remove flag forcing mlock() X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" The _ishm flag _ODP_ISHM_LOCK is no longer set when doing shm_reserve(), hence enabling non-root user to exceed the 64MB mlock memory limit (ulimit). Signed-off-by: Christophe Milard --- platform/linux-generic/odp_shared_memory.c | 3 --- 1 file changed, 3 deletions(-) -- 2.7.4 diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index d2bb74c..ba32dee 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -58,9 +58,6 @@ odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align, flgs = get_ishm_flags(flags); - /* all mem reserved through this interface is requested to be locked: */ - flgs |= (flags & _ODP_ISHM_LOCK); - block_index = _odp_ishm_reserve(name, size, -1, align, flgs, flags); if (block_index >= 0) return to_handle(block_index);