From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E916C43219 for ; Thu, 2 May 2019 14:24:44 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA09F205C9 for ; Thu, 2 May 2019 14:24:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="NC8fsYMX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="i6jyi9bZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA09F205C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1hMCdP-00079c-OM; Thu, 02 May 2019 10:24:27 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hMCdN-00079W-FU for kernelnewbies@kernelnewbies.org; Thu, 02 May 2019 10:24:25 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E0C1325BED; Thu, 2 May 2019 10:24:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 02 May 2019 10:24:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=eziFoHktjIMk7cMxGfRxEI5FV9r ySDTD6k39b7KoF94=; b=NC8fsYMXEHg3Xm4XjLED18rtL7abt5Cjn5gTOUIv+ZB p5j3/gGZqWnZhHLdKDUWTnui9k/ZBDjGZSzu9mxR+45To0GmXFz1tRutyiDvX8sA e/99t19MVQhajIl0z9cnGuG8pOWeKowfmyKk3GD05SHK1P0rj9kvlMrBQUqYlH2o QP9GaWd1foZjSJLTHJrJdAUFLemDQnTwUnG1NoQlB2oXFGGf1FDk7c/O8dJk3g1Q EWYybGJ7E27WBaINYsd7frfhlTv0AkgkulR63KWbwQNOJ2oBMBiA3y6XBt1CECdo tuU+qQTIRCj4Zoz5u9/S401wcexQ1y1fpqY1TxT1+Jw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=eziFoH ktjIMk7cMxGfRxEI5FV9rySDTD6k39b7KoF94=; b=i6jyi9bZ2RmddJ/SmB3kQ2 8xZdyvUmgZhmzZuxi30X1gfhatQJaQfuZ1wqxjvrS+3ntA9mT+FP+hhZ9wmw9q2d ch9ZvB7kONX84juwuFnZV6XExYzFB3o4ZOCISqVzwYfmxZKMiENoYzZh9q/Zd+Sp IWxYI8f1Oy4UqfK5Qn24K3gM7Su+lP9DvbLbkKJvRylf/XqCTMb/PVehfu1ZpX1N PsK8SJtCUUuRaNx8ccW5SiXbNRnf5e8BhB4Bfoye5otUirwOqUHCeSETTPMOPMiy 0tjtj32ZaS4tkA9sJ3+G8VH5sOU7WMFgZ1We16UzO4J6N4ubrMoYd46UgYrkdfBg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrieelgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjfgesthdtre dttdervdenucfhrhhomhepifhrvghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheq necuffhomhgrihhnpehssheigedrtghomhdplhifnhdrnhgvthenucfkphepkeefrdekie drkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdr tghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id E2567E4805; Thu, 2 May 2019 10:24:22 -0400 (EDT) Date: Thu, 2 May 2019 16:24:19 +0200 From: Greg KH To: Karaoui mohamed lamine Subject: Re: ULIMIT: limiting user virtual address space (stack inluded) Message-ID: <20190502142419.GB17577@kroah.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Thu, May 02, 2019 at 09:06:09AM -0400, Karaoui mohamed lamine wrote: > Hi all, > > According to the man page of "ulimit", it is possible to limit the virtual > address space of a user process: https://ss64.com/bash/ulimit.html > To limit the virtual address space to 2 GB: > $ ulimit -SH -v 1048576 > > However, it seems that "stack" allocation ignores this limit (I tried with > both kernel 4.4 and 4.15). > > I found this article (patch) that seems to fix the problem: > https://lwn.net/Articles/373701/ > > My questions are: > - Why is the stack allocation not placed within the "ulimit" limit? (is it > a bug?) > - Is there a way, in user space, to force the stack to be allocated at a > certain address? > - Will the patch above (or similar) ever be integrated into the Linux > kernel? The patch above was integrated into the 2.6.33 kernel, and backported to 2.6.32.9 and fixed in 2.6.32.10. All of those kernels were released in 2010, quite a long time ago. Are you sure you are hitting the same "problem"? thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies