From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [patch 5/9] unprivileged mounts: allow unprivileged bind mounts Date: Tue, 08 Jan 2008 11:15:10 -0800 Message-ID: <1199819710.9834.74.camel@localhost> References: <20080108113502.184459371@szeredi.hu> <20080108113626.895583537@szeredi.hu> <1199815958.9834.58.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: util-linux-ng-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Miklos Szeredi Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org, viro-rfM+Q5joDG/XmaaqVzeoHQ@public.gmane.org, ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org, kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: containers.vger.kernel.org On Tue, 2008-01-08 at 20:08 +0100, Miklos Szeredi wrote: > > The logic behind EPERM, is that this failure is only for unprivileged > callers. ENOMEM is too specifically about OOM. It could be changed > to ENOSPC, ENFILE, EMFILE, or it could remain EPERM. What do others > think? Since you're patching mount anyway, maybe you could add a little pointer for people to go check the sysctl if they get a certain error code back from here. -- Dave From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756012AbYAHTPp (ORCPT ); Tue, 8 Jan 2008 14:15:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755642AbYAHTP3 (ORCPT ); Tue, 8 Jan 2008 14:15:29 -0500 Received: from e5.ny.us.ibm.com ([32.97.182.145]:38002 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755573AbYAHTP1 (ORCPT ); Tue, 8 Jan 2008 14:15:27 -0500 Subject: Re: [patch 5/9] unprivileged mounts: allow unprivileged bind mounts From: Dave Hansen To: Miklos Szeredi Cc: akpm@linux-foundation.org, hch@infradead.org, serue@us.ibm.com, viro@ftp.linux.org.uk, ebiederm@xmission.com, kzak@redhat.com, linux-fsdevel@vger.kernel.org, containers@lists.osdl.org, util-linux-ng@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: <20080108113502.184459371@szeredi.hu> <20080108113626.895583537@szeredi.hu> <1199815958.9834.58.camel@localhost> Content-Type: text/plain Date: Tue, 08 Jan 2008 11:15:10 -0800 Message-Id: <1199819710.9834.74.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2008-01-08 at 20:08 +0100, Miklos Szeredi wrote: > > The logic behind EPERM, is that this failure is only for unprivileged > callers. ENOMEM is too specifically about OOM. It could be changed > to ENOSPC, ENFILE, EMFILE, or it could remain EPERM. What do others > think? Since you're patching mount anyway, maybe you could add a little pointer for people to go check the sysctl if they get a certain error code back from here. -- Dave