From: Brian Norris <computersforpeace@gmail.com>
To: ispamyou <ispamyou@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Kernel segfault when using nandsim on Debian kernel 4.1
Date: Tue, 6 Oct 2015 14:26:47 +0100 [thread overview]
Message-ID: <20151006132647.GA26818@localhost> (raw)
In-Reply-To: <CAKA5=i-JCDkYAfwLde=QhCSg7E4y-7cXDLMKhy2A_Pd1oPDnOA@mail.gmail.com>
On Thu, Oct 01, 2015 at 08:25:04AM +0800, ispamyou wrote:
> Hi,
>
> when I try and use nandsim to emulate "SDTNRGAMA 64G 3.3V 8-bit" using
> the following command I get a segmentation fault:
>
> modprobe nandsim id_bytes=0x45,0xde,0x94,0x93,0x76,0x50 cache_file=./test.img
>
> [ 142.734637] [nandsim] warning: read_byte: unexpected data output
> cycle, state is STATE_READY return 0x0
> [ 142.734637] [nandsim] warning: read_byte: unexpected data output
> cycle, state is STATE_READY return 0x0
> [ 142.734640] nand: device found, Manufacturer ID: 0x45, Chip ID: 0xde
> [ 142.734641] nand: SanDisk SDTNRGAMA 64G 3.3V 8-bit
> [ 142.734644] nand: 8192 MiB, MLC, erase size: 4096 KiB, page size:
> 16384, OOB size: 1280
> [ 142.734650] nand: No oob scheme defined for oobsize 1280
^^ this is the key
> [ 142.734672] ------------[ cut here ]------------
> [ 142.734674] kernel BUG at
> /build/linux-PoJsUp/linux-4.1.6/drivers/mtd/nand/nand_base.c:3952!
^^ and this too. You could look up your source code to find the exact
code context that triggers this BUG().
[...]
> I have also witnessed this segmentation fault on Ubuntu 14.04 LTS with
> an older kernel (3.19).
>
> Is there any more information I can provide to try and help fix this issue?
The problem is that nand_base doesn't provide a default ECC layout for
odd/large OOB sizes on soft (Hamming) ECC (the default for nandsim). If
you want to use odd OOB sizes, I think you'll have better luck with soft
BCH, which generates ECC layouts dynamically. You can get this by using
the 'bch' module parameter to nandsim. See 'modinfo nandsim'.
Brian
prev parent reply other threads:[~2015-10-06 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 0:25 Kernel segfault when using nandsim on Debian kernel 4.1 ispamyou
2015-10-06 13:26 ` Brian Norris [this message]
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=20151006132647.GA26818@localhost \
--to=computersforpeace@gmail.com \
--cc=ispamyou@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).