linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Huang Jianan via Linux-erofs <linux-erofs@lists.ozlabs.org>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: yh@oppo.com, kevin.liw@oppo.com, guoweichao@oppo.com,
	linux-erofs@lists.ozlabs.org, guanyuwei@oppo.com
Subject: Re: [PATCH] uerofs-utils: fix random data for block-aligned uncompressed file
Date: Tue, 7 Sep 2021 10:54:50 +0800	[thread overview]
Message-ID: <ca78e376-b4f2-d5d2-89f2-36218beccbd3@oppo.com> (raw)
In-Reply-To: <YTa2YLuTBwvHCSAf@B-P7TQMD6M-0146.local>

在 2021/9/7 8:46, Gao Xiang 写道:
> On Tue, Sep 07, 2021 at 08:10:45AM +0800, Gao Xiang wrote:
>> On Mon, Sep 06, 2021 at 04:13:59PM +0800, Huang Jianan via Linux-erofs wrote:
>>> If the file size is block-aligned for uncompressed files, i_u is
>>> meaningless for erofs_inode on disk, but it's not cleared when
>>> datalayout is seted in erofs_prepare_inode_buffer. Clear the entire
>>> erofs_inode to zero to fix this.
>>>
>>> Signed-off-by: Huang Jianan <huangjianan@oppo.com>
>>> ---
>>>   lib/inode.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/lib/inode.c b/lib/inode.c
>>> index 0ad703d..1397cc5 100644
>>> --- a/lib/inode.c
>>> +++ b/lib/inode.c
>>> @@ -834,7 +834,7 @@ static struct erofs_inode *erofs_new_inode(void)
>>>   	static unsigned int counter;
>>>   	struct erofs_inode *inode;
>>>   
>>> -	inode = malloc(sizeof(struct erofs_inode));
>>> +	inode = calloc(1, sizeof(struct erofs_inode));
>> If we decide to do this, how about removing all
>> 	inode->idata_size = 0;
>> 	inode->xattr_isize = 0;
>> 	inode->extent_isize = 0;
>>
>> 	inode->bh = inode->bh_inline = inode->bh_data = NULL;
>> 	inode->idata = NULL;
> Please also add a note that this only impacts OTA packages in the
> commit message about the background since it has some impact to
> the reproducible builds.
I think this won't impact ota packages, mainly it will affect the 
reproducible
builds.

Thanks,
Jianan
> Thanks,
> Gao Xiang
>
>> ?
>>
>> Thanks,
>> Gao Xiang
>>
>>>   	if (!inode)
>>>   		return ERR_PTR(-ENOMEM);
>>>   
>>> -- 
>>> 2.25.1
>>>


  reply	other threads:[~2021-09-07  2:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06  8:13 [PATCH] erofs-utils: remove unnecessary "\n" Huang Jianan via Linux-erofs
2021-09-06  8:13 ` [PATCH] uerofs-utils: fix random data for block-aligned uncompressed file Huang Jianan via Linux-erofs
2021-09-07  0:10   ` Gao Xiang
2021-09-07  0:46     ` Gao Xiang
2021-09-07  2:54       ` Huang Jianan via Linux-erofs [this message]
2021-09-07  3:53   ` [PATCH V2] erofs-utils: " Huang Jianan via Linux-erofs
2021-09-07 13:20     ` Gao Xiang
2021-09-07 13:54       ` Huang Jianan via Linux-erofs
2021-09-07  0:08 ` [PATCH] erofs-utils: remove unnecessary "\n" Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca78e376-b4f2-d5d2-89f2-36218beccbd3@oppo.com \
    --to=linux-erofs@lists.ozlabs.org \
    --cc=guanyuwei@oppo.com \
    --cc=guoweichao@oppo.com \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=huangjianan@oppo.com \
    --cc=kevin.liw@oppo.com \
    --cc=yh@oppo.com \
    --subject='Re: [PATCH] uerofs-utils: fix random data for block-aligned uncompressed file' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).