Fix some bugs in the f2fs implementation of the FS_IOC_GETFSLABEL and
FS_IOC_SETFSLABEL ioctls.
Eric Biggers (3):
f2fs: fix buffer overruns in FS_IOC_{GET,SET}FSLABEL
f2fs: fix copying too many bytes in FS_IOC_SETFSLABEL
f2fs: add missing authorization check in FS_IOC_SETFSLABEL
From: Eric Biggers
utf16s_to_utf8s() and utf8s_to_utf16s() take the number of characters,
not the number of bytes.
Fixes: 61a3da4d5ef8 ("f2fs: support FS_IOC_{GET,SET}FSLABEL")
Signed-off-by: Eric Biggers
---
fs/f2fs/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Eric Biggers
FS_IOC_SETFSLABEL modifies the filesystem superblock, so it shouldn't be
allowed to regular users. Require CAP_SYS_ADMIN, like xfs and btrfs do.
Fixes: 61a3da4d5ef8 ("f2fs: support FS_IOC_{GET,SET}FSLABEL")
Signed-off-by: Eric Biggers
---
fs/f2fs/file.c | 3 +++
1 file
From: Eric Biggers
Userspace provides a null-terminated string, so don't assume that the
full FSLABEL_MAX bytes can always be copied.
Fixes: 61a3da4d5ef8 ("f2fs: support FS_IOC_{GET,SET}FSLABEL")
Signed-off-by: Eric Biggers
---
fs/f2fs/file.c | 22 +-
1 file changed, 5
There is one case can cause data corruption.
- write 4k to fileA
- fsync fileA, 4k data is writebacked to lbaA
- write 4k to fileA
- kworker flushs 4k to lbaB; dnode contain lbaB didn't be persisted yet
- write 4k to fileB
- kworker flush 4k to lbaA due to SSR
- SPOR -> dnode with lbaA will be
Signed-off-by: Jaegeuk Kim
---
- Add + flags for now
tools/f2fs_io/f2fs_io.c | 98 +
tools/f2fs_io/f2fs_io.h | 14 ++
2 files changed, 112 insertions(+)
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index a5a9836..add40c4 100644
---
On 08/15, Jaegeuk Kim wrote:
> On 08/12, Chao Yu wrote:
> > On 2019/8/9 23:23, Jaegeuk Kim wrote:
> > > From: Jaegeuk Kim
> > >
> > > Signed-off-by: Jaegeuk Kim
> > > ---
> > > tools/f2fs_io/f2fs_io.c | 91 +
> > > tools/f2fs_io/f2fs_io.h | 14 +++
>
On 08/12, Chao Yu wrote:
> On 2019/8/9 23:23, Jaegeuk Kim wrote:
> > From: Jaegeuk Kim
> >
> > Signed-off-by: Jaegeuk Kim
> > ---
> > tools/f2fs_io/f2fs_io.c | 91 +
> > tools/f2fs_io/f2fs_io.h | 14 +++
> > 2 files changed, 105 insertions(+)
> >
>
On 2019/8/16 9:02, Jaegeuk Kim wrote:
> On 08/16, Chao Yu wrote:
>> On 2019/8/16 6:21, Jaegeuk Kim wrote:
>>> On 08/12, Chao Yu wrote:
On 2019/8/9 23:12, Jaegeuk Kim wrote:
> We actually don't need to issue trim on entire disk by checking first
> blocks having zeros.
In heap
On 2019/8/16 9:06, Jaegeuk Kim wrote:
> On 08/12, Chao Yu wrote:
>> We should always set c.bug_on whenever found a bug, then fix them
>> if c.fix_on is on, otherwise, some bugs won't be shown unless we
>> enable debug log.
>>
>> Signed-off-by: Chao Yu
>> ---
>> fsck/fsck.c | 137
On 08/12, Chao Yu wrote:
> We should always set c.bug_on whenever found a bug, then fix them
> if c.fix_on is on, otherwise, some bugs won't be shown unless we
> enable debug log.
>
> Signed-off-by: Chao Yu
> ---
> fsck/fsck.c | 137 +++-
> 1 file
On 08/15, Jaegeuk Kim wrote:
> On 08/12, Chao Yu wrote:
> > It tries to let fsck be noticed wrong inline size, and do the fix.
> >
> > Signed-off-by: Chao Yu
> > ---
> > fsck/fsck.c | 8
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/fsck/fsck.c b/fsck/fsck.c
> > index
On 08/16, Chao Yu wrote:
> On 2019/8/16 6:21, Jaegeuk Kim wrote:
> > On 08/12, Chao Yu wrote:
> >> On 2019/8/9 23:12, Jaegeuk Kim wrote:
> >>> We actually don't need to issue trim on entire disk by checking first
> >>> blocks having zeros.
> >>
> >> In heap mode, we locate node log header to tail
On 2019/8/16 6:21, Jaegeuk Kim wrote:
> On 08/12, Chao Yu wrote:
>> On 2019/8/9 23:12, Jaegeuk Kim wrote:
>>> We actually don't need to issue trim on entire disk by checking first
>>> blocks having zeros.
>>
>> In heap mode, we locate node log header to tail end of device, should we
>> consider to
On 08/12, Chao Yu wrote:
> It tries to let fsck be noticed wrong inline size, and do the fix.
>
> Signed-off-by: Chao Yu
> ---
> fsck/fsck.c | 8
> 1 file changed, 8 insertions(+)
>
> diff --git a/fsck/fsck.c b/fsck/fsck.c
> index d53317c..7eb599d 100644
> --- a/fsck/fsck.c
> +++
On Thu, 15 Aug 2019, Mark Salyzyn wrote:
> Good Idea, but using the same argument structure for set and get I would be
> concerned about the loss of compiler protection for the buffer argument;
Agreed, I missed that.
> struct getxattr_args {
> struct dentry *dentry;
> struct inode
On 08/12, Chao Yu wrote:
> On 2019/8/9 23:12, Jaegeuk Kim wrote:
> > We actually don't need to issue trim on entire disk by checking first
> > blocks having zeros.
>
> In heap mode, we locate node log header to tail end of device, should we
> consider to check block contain according to heap
On Fri, Aug 16, 2019 at 05:20:36AM +1000, James Morris wrote:
> On Tue, 13 Aug 2019, Greg Kroah-Hartman wrote:
>
> > On Mon, Aug 12, 2019 at 12:32:49PM -0700, Mark Salyzyn wrote:
> > > --- a/include/linux/xattr.h
> > > +++ b/include/linux/xattr.h
> > > @@ -30,10 +30,10 @@ struct xattr_handler {
>
On Tue, 13 Aug 2019, Greg Kroah-Hartman wrote:
> On Mon, Aug 12, 2019 at 12:32:49PM -0700, Mark Salyzyn wrote:
> > --- a/include/linux/xattr.h
> > +++ b/include/linux/xattr.h
> > @@ -30,10 +30,10 @@ struct xattr_handler {
> > const char *prefix;
> > int flags; /* fs private flags */
Add a flag option to get xattr method that could have a bit flag of
XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is generally then
set in the __vfs_getxattr path.
This handles the case of a union filesystem driver that is being
requested by the security layer to report back the xattr data.
On Wed 14-08-19 07:54:16, Mark Salyzyn wrote:
> On 8/14/19 4:00 AM, Jan Kara wrote:
> > On Tue 13-08-19 07:55:06, Mark Salyzyn wrote:
> > ...
> > > diff --git a/fs/xattr.c b/fs/xattr.c
> > > index 90dd78f0eb27..71f887518d6f 100644
> > > --- a/fs/xattr.c
> > > +++ b/fs/xattr.c
> > ...
> > >
Just cleanup, no logic change.
Signed-off-by: Chao Yu
---
fs/f2fs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 5d78f2db7a67..88af85e0db62 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -706,7 +706,7 @@ void
EOPNOTSUPP is widely used as error number indicating operation is
not supported in syscall, and ENOTSUPP was defined and only used
for NFSv3 protocol, so use EOPNOTSUPP instead.
Fixes: 0a2aa8fbb969 ("f2fs: refactor __exchange_data_block for speed up")
Signed-off-by: Chao Yu
---
fs/f2fs/file.c |
Just cleanup, no logic change.
Signed-off-by: Chao Yu
---
fs/f2fs/f2fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 73e007dca3bb..d2b718e33f88 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3706,7 +3706,7 @@ static inline bool
Hi Ju Hyung,
On 2019/8/14 17:22, Ju Hyung Park wrote:
> Hi Chao,
>
> You're right and Android will never use those types.
>
> But then again, what's the point of separating the list?
I'm just thinking to use extension list space more efficiently to avoid free
slot exhaustion.
And in android,
25 matches
Mail list logo