All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tiger Yang <tiger.yang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 0/2] ocfs2: two bug fixes about xattr and inline-data
Date: Mon, 09 Mar 2009 14:35:36 +0800	[thread overview]
Message-ID: <49B4B8B8.7030108@oracle.com> (raw)
In-Reply-To: <1236579270.6816.39.camel@tristan-laptop.cn.oracle.com>

Hi, all,

I found these two bugs in latest mainline kernel not other branch.

thanks,
tiger

tristan.ye wrote:
> On Mon, 2009-03-09 at 13:42 +0800, Tao Ma wrote:
>> tristan.ye wrote:
>>> On Mon, 2009-03-09 at 12:57 +0800, Tao Ma wrote:
>>>> Hi tristan,
>>>> 	the first bug should happen when you create a directory with acl. So do 
>>>> you have the test case for that?
>>> Yes, I can add this.
>>>> 	The second one should happen when you try to try to the inline file and 
>>>> then you will lose the xattr entry you set.
>>> Actually, I've had similar testcase, and it never failed to me, that
>>> means a previously set xattr entry which has reserved 256 bytes in inode
>>> never be affected or overwriten by the following inline-data writing
>>> attempt when i_size > MAX_INLINE_SIZE - 256.
>> Just go through the code and guess  ;) the process should be:
>> 1. fill in some inline data.
>> 2. set entry
>> 3. write i_size > MAX_INLINE_SIZE - 256.
> 
> I still can not reproduce this bug with your testing step on joel's
> cacheme branch, maybe it is a regression bug on mainline kernel, tiger,
> how did you think about it?
> 
> 
>> I guess your case miss step 1.
>>
>> Tiger,
>> 	Can bug 2 reproduced by my guess steps?
>>
>> Regards,
>> Tao
>>>
>>> Regards,
>>> Tristan
>>>
>>>
>>>
>>>
>>>> Regards,
>>>> Tao
>>>>
>>>> tristan.ye wrote:
>>>>> On Wed, 2009-03-04 at 18:36 -0800, Joel Becker wrote:
>>>>>> On Wed, Mar 04, 2009 at 11:18:19AM +0800, Tiger Yang wrote:
>>>>>>> I found two serious bugs about xattr and inline-data.
>>>>>> Tristan,
>>>>>> 	Can you add tests for this in the xattr suite?  Thanks!
>>>>> Of course, I'll be looking back to my testcases, and add these if
>>>>> missed.
>>>>>
>>>>> Actually, I've already had inline-data&inline-xattr combination tests in
>>>>> xattr testing suite, how can I misse such boundary cases?
>>>>>
>>>>> Tiger,
>>>>>
>>>>> Thanks for posting the cases:)
>>>>>
>>>>> Regards,
>>>>> Tristan
>>>>>
>>>>>
>>>>>
>>>>>> Joel
>>>>>>
>>>>>>> the first bug:
>>>>>>> in ocfs2_mknod(), we check and found the ACL or security xattr entry  
>>>>>>> could be set into inode in ocfs2_calc_xattr_init(), then don't reserve  
>>>>>>> block for them. But in ocfs2_mknod_locked(), if we found ocfs2 support  
>>>>>>> inline-data, then set id_count with the max_inline_data. After that, we  
>>>>>>> set acl/security xattr entry in ocfs2_init_acl() or  
>>>>>>> ocfs2_init_security_set(), but in there we found inode is full, then  
>>>>>>> panic at ocfs2_claim_metadata in ocfs2_xattr_block_set.
>>>>>>>
>>>>>>> the second bug:
>>>>>>> we don't check inline xattr in ocfs2_try_to_write_inline_data(), so the  
>>>>>>> inline data may overwrite the xattr entries which have already in inode.
>>>>>>>
>>>>>>>
>>>>>>> thanks,
>>>>>>> tiger
>>>>> _______________________________________________
>>>>> Ocfs2-devel mailing list
>>>>> Ocfs2-devel at oss.oracle.com
>>>>> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel

  reply	other threads:[~2009-03-09  6:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04  3:18 [Ocfs2-devel] [PATCH 0/2] ocfs2: two bug fixes about xattr and inline-data Tiger Yang
2009-03-04  3:21 ` [Ocfs2-devel] [PATCH 1/2] ocfs2: reserve xattr block for directory inode in mknod Tiger Yang
2009-03-05  1:37   ` Joel Becker
2009-03-04  3:21 ` [Ocfs2-devel] [PATCH 2/2] ocfs2: fix check condition of max inline data Tiger Yang
2009-03-04  3:43   ` Tao Ma
2009-03-04  5:47     ` Tiger Yang
2009-03-04  5:49       ` Tao Ma
2009-03-05  1:44         ` Joel Becker
2009-03-05  2:36 ` [Ocfs2-devel] [PATCH 0/2] ocfs2: two bug fixes about xattr and inline-data Joel Becker
2009-03-09  4:17   ` tristan.ye
2009-03-09  4:57     ` Tao Ma
2009-03-09  5:04       ` tristan.ye
2009-03-09  5:42         ` Tao Ma
2009-03-09  6:14           ` tristan.ye
2009-03-09  6:35             ` Tiger Yang [this message]
2009-03-09  6:47               ` Joel Becker
2009-03-09  6:54                 ` tristan.ye
2009-03-09  7:02                   ` Tao Ma
2009-03-09  7:24                     ` Tiger Yang
2009-03-09 10:36                       ` Tiger Yang
2009-03-09 10:39                         ` Wengang Wang
2009-03-09 10:48                           ` Tao Ma
2009-03-09 10:57                         ` tristan.ye
2009-03-09  6:28   ` tristan.ye

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=49B4B8B8.7030108@oracle.com \
    --to=tiger.yang@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.