Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3228274ybc; Mon, 18 Nov 2019 11:38:45 -0800 (PST) X-Google-Smtp-Source: APXvYqy8Ip0V64+UWrCMU1Ehh+ATaBBY+ZFqj7s7my/MvZuP1+TCyYG3byqLCu5rKIjjqc+J4JhO X-Received: by 2002:a17:906:1e02:: with SMTP id g2mr28455873ejj.6.1574105925145; Mon, 18 Nov 2019 11:38:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574105925; cv=none; d=google.com; s=arc-20160816; b=xPImC0dtMrIrKXF4M6YBJ2fHVeakYRYT5C4/c7nVyadNkvgiYU90nYvZwZvAn2l3XY qs8zYxWEd+VTs0aKohxZCZu9yemE3E12+IMFl5UwuAev2MTZBDVXgocSDZsAMjCVwATK mZ3FvVUfxXy5WQeXJAi/dR39fWZHmX6KDSQlSku/RTUbFUbTfzEShcxYTSYJVfxrUMHN lnJFOu/m26ECnV3Ao8VDRU14WgKH8WcHcfHlDgMS1E7eJcWB94Ix9sn2FsG8gZ6SZ7vV dFpws/mKiKR4puy+vbtzwJfNjmZolWEMG6vMpcg1Bt4suwNOkw9CUU1A1SKDtVNSYRjy ifhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oUl0aHWxnRdGIJQaaNYqf/1e2TYCVGxY+g4UhFUHwCk=; b=v1Vy+uAoh0IJwPuORX58HK7a5/HHK/xfglftHQVbJpEVhysobG12qVxv05pH1WUtDu ixsniFNjx858dx9mE7e+OrIsjk89HOQW7OgRUFPtwneuJpMJ1b3AsVjMp4BngL7w+MTH 6eAfd72FpbfPdMPFSR8T3gcEQhBQI3XCz+RMH0AtSN7P8zoJmvPhyJEwPHcvFX/mCq4/ s4pqVNi74Qoo2mIQkVNDbYwLqdFFiGgr4DbyiwnBpJUGXXkjx7bdtGAHxk03AXPhybxn 4+FcUvVkkwAgHs088pNvS6lLE4CpQZRe8nUAqEpooYXJapzBsx5BFU8h4i7CvQI5t2u+ UhdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="KUk/R1TQ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si12536932ejb.380.2019.11.18.11.38.21; Mon, 18 Nov 2019 11:38:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="KUk/R1TQ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726705AbfKRTgv (ORCPT + 99 others); Mon, 18 Nov 2019 14:36:51 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:35777 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726435AbfKRTgv (ORCPT ); Mon, 18 Nov 2019 14:36:51 -0500 Received: by mail-ot1-f67.google.com with SMTP id c14so8603754oth.2 for ; Mon, 18 Nov 2019 11:36:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oUl0aHWxnRdGIJQaaNYqf/1e2TYCVGxY+g4UhFUHwCk=; b=KUk/R1TQPGb+tLW1IrCyhIFesOsAWIogNaBJJZDsZ90Jun0S7sQT/xNmr44phxdfxY 01FCu4hwcinKCuvU6ySkH61de4ZUGUhe0jOWYIq/39Fi5cz3TPG436FnAJHa4t3/FNA8 FITQpQbQ5sDJaRkO9cpy2pAvR7DNRX+WSa/o8QCI/vdNF6YeN6bydh8N7MEdUlEoOTWp +LPCzqV8waygLHdwUsWYEDqh2HhK70b+7EczlnYTsPs3NQoectm0XTnzLF1feeAqBXAD tRjLkCVm89rRaaiBaLdiMptw3sihutzBhpxVwHQnKy9UhWEePeYBLbMeQYMnLZoT3jMz g0lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oUl0aHWxnRdGIJQaaNYqf/1e2TYCVGxY+g4UhFUHwCk=; b=QiH8/iLY474RBqOwY5TlKfqZGF6N83UvcSZGW4BJnUm6O65HTeLtk0D4ykGiCRxO/5 SbiK04h56z2/siTzpcC+0cXdD3+qi7xIatQoAQYNYS9gZiRcsGY7VqzlYrCJQlTAUsEK /SQRazHDUfVhw0MsXpsDlw283FMURxaWiw0cJs7ZSuzXt2uQ1YqUdZ8JvGwj88nu37MN UxB50W0NILLlEIPbSJXR0sEbu10nh5eebyTLtnHxj2ypTDMAOo2fEqv5sAoPNCe1Y/pv dU/e6tDSwbyr6BkQlsjdpdAEM/93d6tk6pMhsf3h70WSgXEZ0fL0wpVkGTLNPjd3f6UZ RNTQ== X-Gm-Message-State: APjAAAX1ENdGcEp+w/lSujbfCWfIynGxZEALvebS2rmltYRXLYjWsySC bRK+nSoVBSFW7x6+nkQ1y4SpwZaGWh+x6gHCY8Ktaw== X-Received: by 2002:a9d:37e6:: with SMTP id x93mr704063otb.183.1574105808669; Mon, 18 Nov 2019 11:36:48 -0800 (PST) MIME-Version: 1.0 References: <1574096478-11520-1-git-send-email-prakash.sangappa@oracle.com> In-Reply-To: <1574096478-11520-1-git-send-email-prakash.sangappa@oracle.com> From: Jann Horn Date: Mon, 18 Nov 2019 20:36:22 +0100 Message-ID: Subject: Re: [RESEND RFC PATCH 0/1] CAP_SYS_NICE inside user namespace To: Prakash Sangappa Cc: kernel list , Linux API , "Eric W. Biederman" , Thomas Gleixner , Peter Zijlstra , "Serge E. Hallyn" , Christian Brauner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 18, 2019 at 6:04 PM Prakash Sangappa wrote: > Some of the capabilities(7) which affect system wide resources, are ineffective > inside user namespaces. This restriction applies even to root user( uid 0) > from init namespace mapped into the user namespace. One such capability > is CAP_SYS_NICE which is required to change process priority. As a result of > which the root user cannot perform operations like increase a process priority > using -ve nice value or set RT priority on processes inside the user namespace. > A workaround to deal with this restriction is to use the help of a process / > daemon running outside the user namespace to change process priority, which is > a an inconvenience. What is the goal here, in the big picture? Is your goal to allow container admins to control the priorities of their tasks *relative to each other*, or do you actually explicitly want container A to be able to decide that its current workload is more timing-sensitive than container B's?