* [PATCH] f2fs: relax permission for atomic/volatile ioctls
@ 2017-07-06 2:23 Jaegeuk Kim
2017-07-07 0:04 ` Chao Yu
2017-07-07 2:08 ` Eric Biggers
0 siblings, 2 replies; 13+ messages in thread
From: Jaegeuk Kim @ 2017-07-06 2:23 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim
This patch allows atomic/volatile ioctls for sqlite under sdcardfs.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
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;
--
2.13.0.rc1.294.g07d810a77f-goog
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
2017-07-06 2:23 [PATCH] f2fs: relax permission for atomic/volatile ioctls Jaegeuk Kim
@ 2017-07-07 0:04 ` Chao Yu
2017-07-07 2:08 ` Eric Biggers
1 sibling, 0 replies; 13+ messages in thread
From: Chao Yu @ 2017-07-07 0:04 UTC (permalink / raw)
To: Jaegeuk Kim, linux-kernel, linux-fsdevel, linux-f2fs-devel
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?
Thanks,
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
> 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;
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] f2fs: relax permission for atomic/volatile ioctls
@ 2017-07-07 0:04 ` Chao Yu
0 siblings, 0 replies; 13+ messages in thread
From: Chao Yu @ 2017-07-07 0:04 UTC (permalink / raw)
To: Jaegeuk Kim, linux-kernel, linux-fsdevel, linux-f2fs-devel
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?
Thanks,
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
> 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;
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
2017-07-07 0:04 ` Chao Yu
@ 2017-07-07 0:16 ` Jaegeuk Kim
-1 siblings, 0 replies; 13+ messages in thread
From: Jaegeuk Kim @ 2017-07-07 0:16 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-kernel, linux-fsdevel, linux-f2fs-devel
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 <jaegeuk@kernel.org>> ---
> > 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;
> >
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] f2fs: relax permission for atomic/volatile ioctls
@ 2017-07-07 0:16 ` Jaegeuk Kim
0 siblings, 0 replies; 13+ messages in thread
From: Jaegeuk Kim @ 2017-07-07 0:16 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel
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 <jaegeuk@kernel.org>> ---
> > 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;
> >
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
2017-07-07 0:16 ` Jaegeuk Kim
(?)
@ 2017-07-07 0:58 ` Chao Yu
2017-07-07 1:19 ` 答复: " gaoxiang (P)
-1 siblings, 1 reply; 13+ messages in thread
From: Chao Yu @ 2017-07-07 0:58 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-kernel, linux-fsdevel, linux-f2fs-devel
On 2017/7/7 8:16, Jaegeuk Kim wrote:
> 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.
Oh, is that really allowed? if the sqlite database is public in sdcard directory,
application needs to apply WRITE_EXTERNAL_STORAGE in order to add itself to
sdcard_rw group, then it can access the database. Right?
Thanks,
>
> Thanks,
>
>>
>> Thanks,
>>
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
>>> 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;
>>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* 答复: [PATCH] f2fs: relax permission for atomic/volatile ioctls
2017-07-07 0:58 ` [f2fs-dev] " Chao Yu
@ 2017-07-07 1:19 ` gaoxiang (P)
2017-07-07 2:12 ` Jaegeuk Kim
0 siblings, 1 reply; 13+ messages in thread
From: gaoxiang (P) @ 2017-07-07 1:19 UTC (permalink / raw)
To: Chao Yu, Jaegeuk Kim; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel
Hi,
I think Sdcardfs should override task_struct cred fsuid/fsgid before calling the underlay fs operation.
And it seems sdcardfs implementations misses override cred fsuid/fsgid before the ioctl operation.
Thanks.
-----邮件原件-----
发件人: Chao Yu [mailto:chao@kernel.org]
发送时间: 2017年7月7日 8:58
收件人: Jaegeuk Kim
抄送: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
主题: Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
On 2017/7/7 8:16, Jaegeuk Kim wrote:
> 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.
Oh, is that really allowed? if the sqlite database is public in sdcard directory,
application needs to apply WRITE_EXTERNAL_STORAGE in order to add itself to
sdcard_rw group, then it can access the database. Right?
Thanks,
>
> Thanks,
>
>>
>> Thanks,
>>
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
>>> 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;
>>>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] f2fs: relax permission for atomic/volatile ioctls
2017-07-06 2:23 [PATCH] f2fs: relax permission for atomic/volatile ioctls Jaegeuk Kim
2017-07-07 0:04 ` Chao Yu
@ 2017-07-07 2:08 ` Eric Biggers
1 sibling, 0 replies; 13+ messages in thread
From: Eric Biggers @ 2017-07-07 2:08 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-kernel, linux-fsdevel, linux-f2fs-devel
On Wed, Jul 05, 2017 at 07:23:26PM -0700, Jaegeuk Kim wrote:
> This patch allows atomic/volatile ioctls for sqlite under sdcardfs.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> 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;
> -
Why not require that the file be open for writing (FMODE_WRITE)?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 答复: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
2017-07-07 1:19 ` 答复: " gaoxiang (P)
@ 2017-07-07 2:12 ` Jaegeuk Kim
0 siblings, 0 replies; 13+ messages in thread
From: Jaegeuk Kim @ 2017-07-07 2:12 UTC (permalink / raw)
To: gaoxiang (P); +Cc: Chao Yu, linux-fsdevel, linux-kernel, linux-f2fs-devel
On 07/07, gaoxiang (P) wrote:
> Hi,
> I think Sdcardfs should override task_struct cred fsuid/fsgid before calling the underlay fs operation.
> And it seems sdcardfs implementations misses override cred fsuid/fsgid before the ioctl operation.
Oh, good catch!
Thank you. ;)
>
> Thanks.
>
> -----邮件原件-----
> 发件人: Chao Yu [mailto:chao@kernel.org]
> 发送时间: 2017年7月7日 8:58
> 收件人: Jaegeuk Kim
> 抄送: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
> 主题: Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
>
> On 2017/7/7 8:16, Jaegeuk Kim wrote:
> > 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.
>
> Oh, is that really allowed? if the sqlite database is public in sdcard directory,
> application needs to apply WRITE_EXTERNAL_STORAGE in order to add itself to
> sdcard_rw group, then it can access the database. Right?
>
> Thanks,
>
> >
> > Thanks,
> >
> >>
> >> Thanks,
> >>
> >>>
> >>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
> >>> 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;
> >>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 答复: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
@ 2017-07-07 2:12 ` Jaegeuk Kim
0 siblings, 0 replies; 13+ messages in thread
From: Jaegeuk Kim @ 2017-07-07 2:12 UTC (permalink / raw)
To: gaoxiang (P); +Cc: Chao Yu, linux-fsdevel, linux-kernel, linux-f2fs-devel
On 07/07, gaoxiang (P) wrote:
> Hi,
> I think Sdcardfs should override task_struct cred fsuid/fsgid before calling the underlay fs operation.
> And it seems sdcardfs implementations misses override cred fsuid/fsgid before the ioctl operation.
Oh, good catch!
Thank you. ;)
>
> Thanks.
>
> -----邮件原件-----
> 发件人: Chao Yu [mailto:chao@kernel.org]
> 发送时间: 2017年7月7日 8:58
> 收件人: Jaegeuk Kim
> 抄送: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
> 主题: Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
>
> On 2017/7/7 8:16, Jaegeuk Kim wrote:
> > 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.
>
> Oh, is that really allowed? if the sqlite database is public in sdcard directory,
> application needs to apply WRITE_EXTERNAL_STORAGE in order to add itself to
> sdcard_rw group, then it can access the database. Right?
>
> Thanks,
>
> >
> > Thanks,
> >
> >>
> >> Thanks,
> >>
> >>>
> >>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
> >>> 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;
> >>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 答复: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
2017-07-07 2:12 ` Jaegeuk Kim
(?)
@ 2017-07-07 2:19 ` gaoxiang (P)
-1 siblings, 0 replies; 13+ messages in thread
From: gaoxiang (P) @ 2017-07-07 2:19 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: Chao Yu, linux-fsdevel, linux-kernel, linux-f2fs-devel
-----邮件原件-----
发件人: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
发送时间: 2017年7月7日 10:12
收件人: gaoxiang (P)
抄送: Chao Yu; linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
主题: Re: 答复: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
On 07/07, gaoxiang (P) wrote:
> Hi,
> I think Sdcardfs should override task_struct cred fsuid/fsgid before calling the underlay fs operation.
> And it seems sdcardfs implementations misses override cred fsuid/fsgid before the ioctl operation.
Oh, good catch!
Thank you. ;)
;) We are fixing it internally. And the AOSP sdcardfs patch would be
https://android-review.googlesource.com/#/c/431259/
It is none of f2fs business. :) :)
Thanks.
>
> Thanks.
>
> -----邮件原件-----
> 发件人: Chao Yu [mailto:chao@kernel.org]
> 发送时间: 2017年7月7日 8:58
> 收件人: Jaegeuk Kim
> 抄送: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net
> 主题: Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile
> ioctls
>
> On 2017/7/7 8:16, Jaegeuk Kim wrote:
> > 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.
>
> Oh, is that really allowed? if the sqlite database is public in sdcard
> directory, application needs to apply WRITE_EXTERNAL_STORAGE in order
> to add itself to sdcard_rw group, then it can access the database. Right?
>
> Thanks,
>
> >
> > Thanks,
> >
> >>
> >> Thanks,
> >>
> >>>
> >>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
> >>> 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;
> >>>
>
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 答复: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
@ 2017-07-07 2:19 ` gaoxiang (P)
0 siblings, 0 replies; 13+ messages in thread
From: gaoxiang (P) @ 2017-07-07 2:19 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: Chao Yu, linux-fsdevel, linux-kernel, linux-f2fs-devel
-----邮件原件-----
发件人: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
发送时间: 2017年7月7日 10:12
收件人: gaoxiang (P)
抄送: Chao Yu; linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
主题: Re: 答复: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
On 07/07, gaoxiang (P) wrote:
> Hi,
> I think Sdcardfs should override task_struct cred fsuid/fsgid before calling the underlay fs operation.
> And it seems sdcardfs implementations misses override cred fsuid/fsgid before the ioctl operation.
Oh, good catch!
Thank you. ;)
;) We are fixing it internally. And the AOSP sdcardfs patch would be
https://android-review.googlesource.com/#/c/431259/
It is none of f2fs business. :) :)
Thanks.
>
> Thanks.
>
> -----邮件原件-----
> 发件人: Chao Yu [mailto:chao@kernel.org]
> 发送时间: 2017年7月7日 8:58
> 收件人: Jaegeuk Kim
> 抄送: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net
> 主题: Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile
> ioctls
>
> On 2017/7/7 8:16, Jaegeuk Kim wrote:
> > 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.
>
> Oh, is that really allowed? if the sqlite database is public in sdcard
> directory, application needs to apply WRITE_EXTERNAL_STORAGE in order
> to add itself to sdcard_rw group, then it can access the database. Right?
>
> Thanks,
>
> >
> > Thanks,
> >
> >>
> >> Thanks,
> >>
> >>>
> >>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
> >>> 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;
> >>>
>
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 答复: [PATCH] f2fs: relax permission for atomic/volatile ioctls
@ 2017-07-07 2:19 ` gaoxiang (P)
0 siblings, 0 replies; 13+ messages in thread
From: gaoxiang (P) @ 2017-07-07 2:19 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-fsdevel, Chao Yu, linux-kernel, linux-f2fs-devel
-----邮件原件-----
发件人: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
发送时间: 2017年7月7日 10:12
收件人: gaoxiang (P)
抄送: Chao Yu; linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net
主题: Re: 答复: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile ioctls
On 07/07, gaoxiang (P) wrote:
> Hi,
> I think Sdcardfs should override task_struct cred fsuid/fsgid before calling the underlay fs operation.
> And it seems sdcardfs implementations misses override cred fsuid/fsgid before the ioctl operation.
Oh, good catch!
Thank you. ;)
;) We are fixing it internally. And the AOSP sdcardfs patch would be
https://android-review.googlesource.com/#/c/431259/
It is none of f2fs business. :) :)
Thanks.
>
> Thanks.
>
> -----邮件原件-----
> 发件人: Chao Yu [mailto:chao@kernel.org]
> 发送时间: 2017年7月7日 8:58
> 收件人: Jaegeuk Kim
> 抄送: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net
> 主题: Re: [f2fs-dev] [PATCH] f2fs: relax permission for atomic/volatile
> ioctls
>
> On 2017/7/7 8:16, Jaegeuk Kim wrote:
> > 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.
>
> Oh, is that really allowed? if the sqlite database is public in sdcard
> directory, application needs to apply WRITE_EXTERNAL_STORAGE in order
> to add itself to sdcard_rw group, then it can access the database. Right?
>
> Thanks,
>
> >
> > Thanks,
> >
> >>
> >> Thanks,
> >>
> >>>
> >>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>> ---
> >>> 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;
> >>>
>
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-07-07 2:19 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 2:23 [PATCH] f2fs: relax permission for atomic/volatile ioctls Jaegeuk Kim
2017-07-07 0:04 ` [f2fs-dev] " Chao Yu
2017-07-07 0:04 ` Chao Yu
2017-07-07 0:16 ` [f2fs-dev] " Jaegeuk Kim
2017-07-07 0:16 ` Jaegeuk Kim
2017-07-07 0:58 ` [f2fs-dev] " Chao Yu
2017-07-07 1:19 ` 答复: " gaoxiang (P)
2017-07-07 2:12 ` 答复: [f2fs-dev] " Jaegeuk Kim
2017-07-07 2:12 ` Jaegeuk Kim
2017-07-07 2:19 ` gaoxiang (P)
2017-07-07 2:19 ` 答复: " gaoxiang (P)
2017-07-07 2:19 ` 答复: [f2fs-dev] " gaoxiang (P)
2017-07-07 2:08 ` Eric Biggers
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.