From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753107AbdGGAQL (ORCPT ); Thu, 6 Jul 2017 20:16:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:49452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752987AbdGGAQK (ORCPT ); Thu, 6 Jul 2017 20:16:10 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB7DA2133F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jaegeuk@kernel.org Date: Thu, 6 Jul 2017 17:16:09 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls Message-ID: <20170707001609.GA8300@jaegeuk-macbookpro.roam.corp.google.com> References: <20170706022326.52594-1-jaegeuk@kernel.org> <8346aeca-c28b-e5b9-5973-b5648b015c88@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8346aeca-c28b-e5b9-5973-b5648b015c88@kernel.org> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/07, Chao Yu wrote: > On 2017/7/6 10:23, Jaegeuk Kim wrote: > > This patch allows atomic/volatile ioctls for sqlite under sdcardfs. > > Out of curiosity, we will lose some capable when passing through sdcardfs? I don't think so. But, it seems a test applicaion tries to access database from difference uid. Thanks, > > Thanks, > > > > > Signed-off-by: Jaegeuk Kim > --- > > fs/f2fs/file.c | 15 --------------- > > 1 file changed, 15 deletions(-) > > > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > > index f5d6357e8360..dd8f5d2caa48 100644 > > --- a/fs/f2fs/file.c > > +++ b/fs/f2fs/file.c > > @@ -1587,9 +1587,6 @@ static int f2fs_ioc_start_atomic_write(struct file *filp) > > struct inode *inode = file_inode(filp); > > int ret; > > > > - if (!inode_owner_or_capable(inode)) > > - return -EACCES; > > - > > if (!S_ISREG(inode->i_mode)) > > return -EINVAL; > > > > @@ -1636,9 +1633,6 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp) > > struct inode *inode = file_inode(filp); > > int ret; > > > > - if (!inode_owner_or_capable(inode)) > > - return -EACCES; > > - > > ret = mnt_want_write_file(filp); > > if (ret) > > return ret; > > @@ -1672,9 +1666,6 @@ static int f2fs_ioc_start_volatile_write(struct file *filp) > > struct inode *inode = file_inode(filp); > > int ret; > > > > - if (!inode_owner_or_capable(inode)) > > - return -EACCES; > > - > > if (!S_ISREG(inode->i_mode)) > > return -EINVAL; > > > > @@ -1707,9 +1698,6 @@ static int f2fs_ioc_release_volatile_write(struct file *filp) > > struct inode *inode = file_inode(filp); > > int ret; > > > > - if (!inode_owner_or_capable(inode)) > > - return -EACCES; > > - > > ret = mnt_want_write_file(filp); > > if (ret) > > return ret; > > @@ -1736,9 +1724,6 @@ static int f2fs_ioc_abort_volatile_write(struct file *filp) > > struct inode *inode = file_inode(filp); > > int ret; > > > > - if (!inode_owner_or_capable(inode)) > > - return -EACCES; > > - > > ret = mnt_want_write_file(filp); > > if (ret) > > return ret; > >