lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHB1Naiwv6SXMwfPWzB6xf0xPd08QwNvxwKFwRFD-=208avU=Q@mail.gmail.com>
Date: Tue, 7 Jan 2025 10:53:39 +0800
From: Julian Sun <sunjunchao2870@...il.com>
To: Jan Kara <jack@...e.cz>
Cc: linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org, tytso@....edu, 
	adilger.kernel@...ger.ca, boyu.mt@...bao.com, tm@....ma
Subject: Re: [PATCH 1/7] ext4: Modify ei->i_flags before calling ext4_mark_iloc_dirty()

Jan Kara <jack@...e.cz> 于2025年1月6日周一 23:25写道:
>
> On Fri 20-12-24 23:16:19, Julian Sun wrote:
> > Modify ei->i_flags before calling ext4_mark_iloc_dirty() so that
> > the modifications to ei->i_flags can be reflected in the raw_inode
> > during the call to ext4_mark_iloc_dirty()->ext4_do_update_inode()
> >
> > Signed-off-by: Julian Sun <sunjunchao2870@...il.com>
> > ---
> >  fs/ext4/inline.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
> > index 3536ca7e4fcc..d479495d03aa 100644
> > --- a/fs/ext4/inline.c
> > +++ b/fs/ext4/inline.c
> > @@ -465,11 +465,10 @@ static int ext4_destroy_inline_data_nolock(handle_t *handle,
> >       ext4_clear_inode_flag(inode, EXT4_INODE_INLINE_DATA);
> >
> >       get_bh(is.iloc.bh);
> > -     error = ext4_mark_iloc_dirty(handle, inode, &is.iloc);
> > -
> >       EXT4_I(inode)->i_inline_off = 0;
> >       EXT4_I(inode)->i_inline_size = 0;
> >       ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA);
> > +     error = ext4_mark_iloc_dirty(handle, inode, &is.iloc);
>
> I don't see what difference this makes since ext4_clear_inode_state() does
> not modify ei->i_flags but ei->i_state_flags which is not stored on disk...

Yes, you are correct. On my machine, BITS_PER_LONG is 64, so
ext4_clear_inode_state() modifies the high 32 bits of ei->i_flags
which are also not stored on disk.
>
>                                                                 Honza
> --
> Jan Kara <jack@...e.com>
> SUSE Labs, CR


Thanks,
-- 
Julian Sun <sunjunchao2870@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ