All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ernesto A. Fernández" <ernesto.mnd.fernandez@gmail.com>
To: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: "Sergei Antonov" <saproj@gmail.com>,
	"Vyacheslav Dubeyko" <slava@dubeyko.com>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Christoph Hellwig" <hch@infradead.org>,
	"Ernesto A. Fernández" <ernesto.mnd.fernandez@gmail.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] hfsplus: fix segfault when deleting all attrs of a file
Date: Sun, 8 Oct 2017 15:51:37 -0300	[thread overview]
Message-ID: <20171008185136.GA1272@debian.home> (raw)
In-Reply-To: <1676784878.5173672.1507350322487@mail.yahoo.com>

On Sat, Oct 07, 2017 at 04:25:22AM +0000, Hin-Tak Leung wrote:
> 
> --------------------------------------------
> On Sat, 7/10/17, Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com> wrote:
>  
> > A segmentation fault can be triggered by setting many xattrs
> > to a file
> > and then deleting it. The number must be high enough for
> > more than one
> > b-tree node to be needed for storage.
> 
> Sounds like it is easily/reliably reproducible - do you have an estimate/recipe of how many xattrs minimum to trigger this problem, to test and verify this fix?

I did not give a number because it depends on the size of the xattrs, and I
imagine the bnode size as well, though I only tested it with the default
mkfs options. Maybe I should have shared the script I used instead:

touch test.file
i=1
while [ $i -le 250 ]; do
  setfattr -n user.$i test.file
  ((++i))
done
rm test.file

Of course, if you set a value to the xattrs you will need fewer.

> Thanks a lot for the work!

And thank you for your attention.

> Hin-Tak
> 
>  

Ernest

  reply	other threads:[~2017-10-08 18:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1676784878.5173672.1507350322487.ref@mail.yahoo.com>
2017-10-07  4:25 ` [PATCH] hfsplus: fix segfault when deleting all attrs of a file Hin-Tak Leung
2017-10-08 18:51   ` Ernesto A. Fernández [this message]
     [not found] <1601904757.6392039.1507492617972.ref@mail.yahoo.com>
2017-10-08 19:56 ` Hin-Tak Leung
2017-10-06 21:52 Ernesto A. Fernández
2017-10-07  5:03 ` Viacheslav Dubeyko
2017-10-08 19:46   ` Ernesto A. Fernández
2017-10-09 17:03     ` Viacheslav Dubeyko
2017-10-09 19:59       ` Ernesto A. Fernández
2017-10-10 15:07         ` Viacheslav Dubeyko
2017-10-10 21:39         ` Slava Dubeyko
2017-10-11  4:43           ` Ernesto A. Fernández

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=20171008185136.GA1272@debian.home \
    --to=ernesto.mnd.fernandez@gmail.com \
    --cc=hch@infradead.org \
    --cc=htl10@users.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=saproj@gmail.com \
    --cc=slava@dubeyko.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.