From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Anatoly Pugachev <matorola@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
linux-ext4@vger.kernel.org,
debian-sparc <debian-sparc@lists.debian.org>
Subject: Re: [sparc64] sigbus in e2fsck
Date: Tue, 30 Aug 2016 13:25:10 -0700 [thread overview]
Message-ID: <20160830202510.GA8258@birch.djwong.org> (raw)
In-Reply-To: <CADxRZqx1QQNPXyzw7qXKPGH40yA9UsvZPYHaW0=i=z_tAix2Aw@mail.gmail.com>
On Tue, Aug 30, 2016 at 11:17:07PM +0300, Anatoly Pugachev wrote:
> On Tue, Aug 30, 2016 at 10:16 PM, Theodore Ts'o <tytso@mit.edu> wrote:
> > On Tue, Aug 30, 2016 at 06:12:39PM +0300, Anatoly Pugachev wrote:
> >>
> >> (gdb) p bh->b_data
> >> $1 = "\300;9\230\000\000\000\005\000\000\253\204\000\000\000\070\000\000\000\000\000\000$\022\000\000\000\000\000\000$<\000\000\000\000\000\000$\270\000\000\000\000\000\000$]\000\000\000\000\000\000$\024",
> >> '\000' <repeats 967 times>
> >> (gdb) p offset
> >> $2 = 16
> >> (gdb) p *bh->b_data
> >> $3 = -64 '\300'
> >> (gdb) p *(bh->b_data+offset)
> >> $6 = 0 '\000'
> >
> > Can you give us "p &bh->b_data" (so we can get the starting address of
> > b_data to make sure it's aligned) and "p offset" (so we can check and
> > make sure offset is sane)?
>
> (gdb) p &bh->b_data
> $7 = (char (*)[1024]) 0x2e9b9c
> (gdb) p offset
> $8 = 16
AFAICT, each bh is malloc'd via e2fsck_allocate_memory and nothing seems
to guarantee that the char b_data[1024] will be aligned to a multiple of
8 (it certainly isn't on x64), so I guess this isn't much of a surprise.
We could change b_data to a pointer and then posix_memalign it.
--D
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-08-30 20:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 12:42 [sparc64] sigbus in e2fsck Anatoly Pugachev
2016-08-30 12:56 ` John Paul Adrian Glaubitz
2016-08-30 14:58 ` Theodore Ts'o
2016-08-30 15:03 ` John Paul Adrian Glaubitz
2016-08-30 15:12 ` Anatoly Pugachev
2016-08-30 19:16 ` Theodore Ts'o
2016-08-30 20:17 ` Anatoly Pugachev
2016-08-30 20:25 ` Darrick J. Wong [this message]
2016-09-01 1:26 ` Theodore Ts'o
2016-08-30 16:45 ` Jose E. Marchesi
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=20160830202510.GA8258@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=debian-sparc@lists.debian.org \
--cc=linux-ext4@vger.kernel.org \
--cc=matorola@gmail.com \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox