Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbbLIWw0 (ORCPT ); Wed, 9 Dec 2015 17:52:26 -0500 Received: from h2.hallyn.com ([78.46.35.8]:42277 "EHLO h2.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbbLIWwX (ORCPT ); Wed, 9 Dec 2015 17:52:23 -0500 Date: Wed, 9 Dec 2015 16:52:22 -0600 From: "Serge E. Hallyn" To: Seth Forshee Cc: Alexander Viro , "Serge E. Hallyn" , "Theodore Ts'o" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: Drop CAP_SYS_RAWIO requirement for FIBMAP Message-ID: <20151209225222.GA31596@mail.hallyn.com> References: <1449296116-14527-1-git-send-email-seth.forshee@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449296116-14527-1-git-send-email-seth.forshee@canonical.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1408 Lines: 40 On Sat, Dec 05, 2015 at 12:15:16AM -0600, Seth Forshee wrote: > The information exposed by FIBMAP is not privileged and is > similar to the information provided by FIEMAP, which does not > require privileges. According to [1] the reason the capability > check was originally added was to prevent crashing the kernel > by passing invalid arguments, but this should no longer be a > problem, so this requirement can be removed. > > [1] http://www.gossamer-threads.com/lists/linux/kernel/103611 > > Cc: "Serge E. Hallyn" > Cc: Theodore Ts'o > Signed-off-by: Seth Forshee Acked-by: Serge Hallyn > --- > fs/ioctl.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/fs/ioctl.c b/fs/ioctl.c > index 5d01d2638ca5..c963d82b0de8 100644 > --- a/fs/ioctl.c > +++ b/fs/ioctl.c > @@ -55,8 +55,6 @@ static int ioctl_fibmap(struct file *filp, int __user *p) > /* do we support this mess? */ > if (!mapping->a_ops->bmap) > return -EINVAL; > - if (!capable(CAP_SYS_RAWIO)) > - return -EPERM; > res = get_user(block, p); > if (res) > return res; > -- > 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/