From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10941 Path: news.gmane.org!.POSTED!not-for-mail From: Samuel Holland Newsgroups: gmane.linux.lib.musl.general Subject: Re: getrlimit failed (chromium on musl) Date: Wed, 18 Jan 2017 09:51:29 -0600 Message-ID: References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1484755084 23636 195.159.176.226 (18 Jan 2017 15:58:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2017 15:58:04 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 To: musl@lists.openwall.com Original-X-From: musl-return-10955-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 18 16:58:01 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTscZ-0005kb-GL for gllmg-musl@m.gmane.org; Wed, 18 Jan 2017 16:57:59 +0100 Original-Received: (qmail 26172 invoked by uid 550); 18 Jan 2017 15:58:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 18252 invoked from network); 18 Jan 2017 15:51:42 -0000 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sholland.org; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=+IigNDd99MC8wHF vR101tgPiMeI=; b=ClVQjBykIE5sy5o2T0pipQBQL/YhmPmEdHWkpqjnGe5HFFB CrgBzOlRKcYEHupLm6jxfdpZGJw3FymHxC+3Hv5cW0lSUlY+IHzl5fOT/M3BqPra 5Iaa0Xt6aXPSCN7LVoWxgs0u36Vl00YC0zQPGeI+Sqwqxvfx1pt2e+m18NZg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=+IigNDd99MC8wHFvR101tgPiMeI=; b=knYoBc8s636VOmip+Ek+ cFQOLXCoCKnVZh0do4VMCoD2v4cKf44cgutyA3rpTsYZ9z/bpAkPTiJhBv4cIODf jyk/X4BlN2RZDEnMKSO4cAAyoasHHtsYUJFljxz3QJiJELvWFfC0Si+78OZxh/zC GZAHsP/t6g6KBvBbmVnPb1M= X-ME-Sender: X-Sasl-enc: HTVi4Da1ZyOhpw3GypnsK9/v1S3zpJnQ46k1e8CghFBT 1484754690 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:10941 Archived-At: On 01/18/17 08:08, Alba Pompeo wrote: > Hi. > > Running chromium on a musl system spams this message. > > getrlimit(RLIMIT_NOFILE) failed > > Any idea how to figure out what's wrong? The problem is that the sandbox blocks prlimit64 with EPERM, but musl only falls back to getrlimit on ENOSYS. The diff below will fix the error. From the linked bug, the only reason it is blocked in the first place is ChromeOS, and this change should be fine even there. --- chromium-55.0.2883.75/content/common/sandbox_linux/bpf_renderer_policy_linux.cc.orig +++ chromium-55.0.2883.75/content/common/sandbox_linux/bpf_renderer_policy_linux.cc @@ -88,7 +88,7 @@ ResultExpr RendererProcessPolicy::EvaluateSyscall(int sysno) const { case __NR_sched_setscheduler: return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); case __NR_prlimit64: - return Error(EPERM); // See crbug.com/160157. + return Error(ENOSYS); // See crbug.com/160157. default: // Default on the content baseline policy. return SandboxBPFBasePolicy::EvaluateSyscall(sysno); > Thanks. Regards, Samuel