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
| ||
|
Message-ID: <20221207105819.jmirjhh6ygknsbcm@quack3> Date: Wed, 7 Dec 2022 11:58:19 +0100 From: Jan Kara <jack@...e.cz> To: Ye Bin <yebin@...weicloud.com> Cc: tytso@....edu, adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org, jack@...e.cz, Ye Bin <yebin10@...wei.com> Subject: Re: [PATCH v2 4/6] ext4: allocate extended attribute value in vmalloc area On Wed 07-12-22 15:40:41, Ye Bin wrote: > From: Ye Bin <yebin10@...wei.com> > > Now, extended attribute value maxium length is 64K. The memory requested here > does not need continuous physical addresses, so it is appropriate to use > kvmalloc to request memory. At the same time, it can also cope with the > situation that the extended attribute will become longer in the future. > > Signed-off-by: Ye Bin <yebin10@...wei.com> Looks good. Feel free to add: Reviewed-by: Jan Kara <jack@...e.cz> Thanks! Honza > --- > fs/ext4/xattr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c > index 75287422c36c..efa623658c12 100644 > --- a/fs/ext4/xattr.c > +++ b/fs/ext4/xattr.c > @@ -2579,7 +2579,7 @@ static int ext4_xattr_move_to_block(handle_t *handle, struct inode *inode, > > is = kzalloc(sizeof(struct ext4_xattr_ibody_find), GFP_NOFS); > bs = kzalloc(sizeof(struct ext4_xattr_block_find), GFP_NOFS); > - buffer = kmalloc(value_size, GFP_NOFS); > + buffer = kvmalloc(value_size, GFP_NOFS); > b_entry_name = kmalloc(entry->e_name_len + 1, GFP_NOFS); > if (!is || !bs || !buffer || !b_entry_name) { > error = -ENOMEM; > @@ -2631,7 +2631,7 @@ static int ext4_xattr_move_to_block(handle_t *handle, struct inode *inode, > error = 0; > out: > kfree(b_entry_name); > - kfree(buffer); > + kvfree(buffer); > if (is) > brelse(is->iloc.bh); > if (bs) > -- > 2.31.1 > -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists