linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge.hallyn@ubuntu.com>
To: Seth Forshee <seth.forshee@canonical.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Theodore Ts'o <tytso@mit.edu>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: Drop CAP_SYS_RAWIO requirement for FIBMAP
Date: Wed, 9 Dec 2015 16:52:22 -0600	[thread overview]
Message-ID: <20151209225222.GA31596@mail.hallyn.com> (raw)
In-Reply-To: <1449296116-14527-1-git-send-email-seth.forshee@canonical.com>

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" <serge@hallyn.com>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>

> ---
>  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

      reply	other threads:[~2015-12-09 22:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-05  6:15 [PATCH] fs: Drop CAP_SYS_RAWIO requirement for FIBMAP Seth Forshee
2015-12-09 22:52 ` Serge E. Hallyn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151209225222.GA31596@mail.hallyn.com \
    --to=serge.hallyn@ubuntu.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=seth.forshee@canonical.com \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).