* 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
@ 2019-03-21 20:17 Martin Blumenstingl
2019-03-21 21:44 ` Matthew Wilcox
0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-03-21 20:17 UTC (permalink / raw)
To: linux-mm, linux-kernel, linux-arm-kernel
Cc: mhocko, linux, willy, rppt, liang.yang, linux-mtd, linux-amlogic, akpm
Hello,
I am experiencing the following crash:
------------[ cut here ]------------
kernel BUG at mm/slub.c:3950!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted
5.1.0-rc1-00080-g37b8cb064293-dirty #4252
Hardware name: Amlogic Meson platform
PC is at kfree+0x250/0x274
LR is at meson_nfc_exec_op+0x3b0/0x408
...
my goal is to add support for the 32-bit Amlogic Meson SoCs (ARM
Cortex-A5 / Cortex-A9 cores) in the meson-nand driver.
I have traced this crash to the kfree() in meson_nfc_read_buf().
my observation is as follows:
- meson_nfc_read_buf() is called 7 times without any crash, the
kzalloc() call returns 0xe9e6c600 (virtual address) / 0x29e6c600
(physical address)
- the eight time meson_nfc_read_buf() is called kzalloc() call returns
0xee39a38b (virtual address) / 0x2e39a38b (physical address) and the
final kfree() crashes
- changing the size in the kzalloc() call from PER_INFO_BYTE (= 8) to
PAGE_SIZE works around that crash
- disabling the meson-nand driver makes my board boot just fine
- Liang has tested the unmodified code on a 64-bit Amlogic SoC (ARM
Cortex-A53 cores) and he doesn't see the crash there
in case the selected SLAB allocator is relevant:
CONFIG_SLUB=y
the following printk statement is used to print the addresses returned
by the kzalloc() call in meson_nfc_read_buf():
printk("%s 0x%px 0x%08x\n", __func__, info, virt_to_phys(info));
my questions are:
- why does kzalloc() return an unaligned address 0xee39a38b (virtual
address) / 0x2e39a38b (physical address)?
- how can further analyze this issue?
- (I don't know where to start analyzing: in mm/, arch/arm/mm, the
meson-nand driver seems to work fine on the 64-bit SoCs but that
doesn't fully rule it out, ...)
Regards
Martin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-03-21 20:17 32-bit Amlogic (ARM) SoC: kernel BUG in kfree() Martin Blumenstingl
@ 2019-03-21 21:44 ` Matthew Wilcox
2019-03-22 21:07 ` Martin Blumenstingl
0 siblings, 1 reply; 13+ messages in thread
From: Matthew Wilcox @ 2019-03-21 21:44 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: mhocko, linux, linux-kernel, rppt, linux-mm, liang.yang,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
On Thu, Mar 21, 2019 at 09:17:34PM +0100, Martin Blumenstingl wrote:
> Hello,
>
> I am experiencing the following crash:
> ------------[ cut here ]------------
> kernel BUG at mm/slub.c:3950!
if (unlikely(!PageSlab(page))) {
BUG_ON(!PageCompound(page));
You called kfree() on the address of a page which wasn't allocated by slab.
> I have traced this crash to the kfree() in meson_nfc_read_buf().
> my observation is as follows:
> - meson_nfc_read_buf() is called 7 times without any crash, the
> kzalloc() call returns 0xe9e6c600 (virtual address) / 0x29e6c600
> (physical address)
> - the eight time meson_nfc_read_buf() is called kzalloc() call returns
> 0xee39a38b (virtual address) / 0x2e39a38b (physical address) and the
> final kfree() crashes
> - changing the size in the kzalloc() call from PER_INFO_BYTE (= 8) to
> PAGE_SIZE works around that crash
I suspect you're doing something which corrupts memory. Overrunning
the end of your allocation or something similar. Have you tried KASAN
or even the various slab debugging (eg redzones)?
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-03-21 21:44 ` Matthew Wilcox
@ 2019-03-22 21:07 ` Martin Blumenstingl
2019-03-25 10:04 ` Liang Yang
0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-03-22 21:07 UTC (permalink / raw)
To: Matthew Wilcox, liang.yang
Cc: mhocko, linux, linux-kernel, rppt, linux-mm, linux-mtd,
linux-amlogic, akpm, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]
Hi Matthew,
On Thu, Mar 21, 2019 at 10:44 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Thu, Mar 21, 2019 at 09:17:34PM +0100, Martin Blumenstingl wrote:
> > Hello,
> >
> > I am experiencing the following crash:
> > ------------[ cut here ]------------
> > kernel BUG at mm/slub.c:3950!
>
> if (unlikely(!PageSlab(page))) {
> BUG_ON(!PageCompound(page));
>
> You called kfree() on the address of a page which wasn't allocated by slab.
>
> > I have traced this crash to the kfree() in meson_nfc_read_buf().
> > my observation is as follows:
> > - meson_nfc_read_buf() is called 7 times without any crash, the
> > kzalloc() call returns 0xe9e6c600 (virtual address) / 0x29e6c600
> > (physical address)
> > - the eight time meson_nfc_read_buf() is called kzalloc() call returns
> > 0xee39a38b (virtual address) / 0x2e39a38b (physical address) and the
> > final kfree() crashes
> > - changing the size in the kzalloc() call from PER_INFO_BYTE (= 8) to
> > PAGE_SIZE works around that crash
>
> I suspect you're doing something which corrupts memory. Overrunning
> the end of your allocation or something similar. Have you tried KASAN
> or even the various slab debugging (eg redzones)?
KASAN is not available on 32-bit ARM. there was some progress last
year [0] but it didn't make it into mainline. I tried to make the
patches apply again and got it to compile (and my kernel is still
booting) but I have no idea if it's still working. for anyone
interested, my patches are here: [1] (I consider this a HACK because I
don't know anything about the code which is being touched in the
patches, I only made it compile)
SLAB debugging (redzones) were a great hint, thank you very much for
that Matthew! I enabled:
CONFIG_SLUB_DEBUG=y
CONFIG_SLUB_DEBUG_ON=y
and with that I now get "BUG kmalloc-64 (Not tainted): Redzone
overwritten" (a larger kernel log extract is attached).
I'm starting to wonder if the NAND controller (hardware) writes more
than 8 bytes.
some context: the "info" buffer allocated in meson_nfc_read_buf is
then passed to the NAND controller IP (after using dma_map_single).
Liang, how does the NAND controller know that it only has to send
PER_INFO_BYTE (= 8) bytes when called from meson_nfc_read_buf? all
other callers of meson_nfc_dma_buffer_setup (which passes the info
buffer to the hardware) are using (nand->ecc.steps * PER_INFO_BYTE)
bytes?
Regards
Martin
[0] https://lore.kernel.org/patchwork/cover/913212/
[1] https://github.com/xdarklight/linux/tree/arm-kasan-hack-v5.1-rc1
[-- Attachment #2: slub-redzones.txt --]
[-- Type: text/plain, Size: 23501 bytes --]
[ 2.742070] meson_nfc_read_buf e95e7d00 0x295e7d00
[ 2.742155] meson_nfc_read_buf e95e7d00 0x295e7d00
[ 2.746056] meson_nfc_read_buf e95e62c0 0x295e62c0
[ 2.750947] meson_nfc_read_buf e95e7d00 0x295e7d00
[ 2.755530] =============================================================================
[ 2.763673] BUG kmalloc-64 (Not tainted): Redzone overwritten
[ 2.769392] -----------------------------------------------------------------------------
[ 2.769392]
[ 2.779013] Disabling lock debugging due to kernel taint
[ 2.784303] INFO: 0x(ptrval)-0x(ptrval). First byte 0xff instead of 0xcc
[ 2.790982] INFO: Allocated in 0xffffffff age=4294937574 cpu=4294967295 pid=-1
[ 2.798171] 0xffffffff
[ 2.800598] 0xffffffff
[ 2.803024] 0xffffffff
[ 2.805451] 0xffffffff
[ 2.807879] 0xffffffff
[ 2.810306] 0xffffffff
[ 2.812733] 0xffffffff
[ 2.815160] 0xffffffff
[ 2.817587] 0xffffffff
[ 2.820014] 0xffffffff
[ 2.822441] 0xffffffff
[ 2.824869] 0xffffffff
[ 2.827296] 0xffffffff
[ 2.829722] 0xffffffff
[ 2.832150] 0xffffffff
[ 2.834577] 0xffffffff
[ 2.837006] INFO: Freed in 0xffffffff age=4294937574 cpu=4294967295 pid=-1
[ 2.843852] 0xffffffff
[ 2.846279] 0xffffffff
[ 2.848706] 0xffffffff
[ 2.851133] 0xffffffff
[ 2.853560] 0xffffffff
[ 2.855987] 0xffffffff
[ 2.858414] 0xffffffff
[ 2.860842] 0xffffffff
[ 2.863269] 0xffffffff
[ 2.865696] 0xffffffff
[ 2.868123] 0xffffffff
[ 2.870550] 0xffffffff
[ 2.872977] 0xffffffff
[ 2.875404] 0xffffffff
[ 2.877831] 0xffffffff
[ 2.880258] 0xffffffff
[ 2.882687] INFO: Slab 0x(ptrval) objects=25 used=4 fp=0x(ptrval) flags=0x10201
[ 2.889968] INFO: Object 0x(ptrval) @offset=7424 fp=0x(ptrval)
[ 2.889968]
[ 2.897251] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 2.905917] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 2.914585] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 2.923253] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 2.931922] Object (ptrval): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 2.940503] Object (ptrval): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 2.949085] Object (ptrval): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
[ 2.957666] Object (ptrval): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
[ 2.966248] Redzone (ptrval): ff ff ff ff ....
[ 2.973876] Padding (ptrval): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
[ 2.982544] Padding (ptrval): ff ff ff ff ff ff ff ff ........
[ 2.990523] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G B 5.1.0-rc1-00088-g406014e081b4-dirty #4272
[ 3.000574] Hardware name: Amlogic Meson platform
[ 3.005269] [<c0311bb8>] (unwind_backtrace) from [<c030ca68>] (show_stack+0x10/0x14)
[ 3.012976] [<c030ca68>] (show_stack) from [<c0ccba28>] (dump_stack+0xa4/0xb8)
[ 3.020171] [<c0ccba28>] (dump_stack) from [<c0487fe0>] (check_bytes_and_report+0xcc/0x104)
[ 3.028490] [<c0487fe0>] (check_bytes_and_report) from [<c04881d4>] (check_object+0x194/0x28c)
[ 3.037072] [<c04881d4>] (check_object) from [<c048a658>] (free_debug_processing+0x12c/0x420)
[ 3.045566] [<c048a658>] (free_debug_processing) from [<c048ac5c>] (__slab_free+0x310/0x4a0)
[ 3.053974] [<c048ac5c>] (__slab_free) from [<c048b1c4>] (kfree+0x184/0x274)
[ 3.060997] [<c048b1c4>] (kfree) from [<c08b861c>] (meson_nfc_exec_op+0x3b0/0x408)
[ 3.068541] [<c08b861c>] (meson_nfc_exec_op) from [<c08a424c>] (nand_read_data_op+0xb8/0x154)
[ 3.077034] [<c08a424c>] (nand_read_data_op) from [<c08ae394>] (nand_onfi_detect+0xdc/0x644)
[ 3.085440] [<c08ae394>] (nand_onfi_detect) from [<c08aa4d0>] (nand_scan_with_ids+0x900/0x171c)
[ 3.094111] [<c08aa4d0>] (nand_scan_with_ids) from [<c08b7a04>] (meson_nfc_probe+0x46c/0x694)
[ 3.102606] [<c08b7a04>] (meson_nfc_probe) from [<c081f430>] (platform_drv_probe+0x48/0x98)
[ 3.110924] [<c081f430>] (platform_drv_probe) from [<c081d4b8>] (really_probe+0x1e0/0x2cc)
[ 3.119158] [<c081d4b8>] (really_probe) from [<c081d704>] (driver_probe_device+0x60/0x16c)
[ 3.127393] [<c081d704>] (driver_probe_device) from [<c081d9b0>] (device_driver_attach+0x58/0x60)
[ 3.136235] [<c081d9b0>] (device_driver_attach) from [<c081da10>] (__driver_attach+0x58/0xcc)
[ 3.144734] [<c081da10>] (__driver_attach) from [<c081b87c>] (bus_for_each_dev+0x74/0xb4)
[ 3.152879] [<c081b87c>] (bus_for_each_dev) from [<c081c8ec>] (bus_add_driver+0x1b8/0x1d8)
[ 3.161113] [<c081c8ec>] (bus_add_driver) from [<c081e53c>] (driver_register+0x74/0x108)
[ 3.169176] [<c081e53c>] (driver_register) from [<c0302f54>] (do_one_initcall+0x54/0x284)
[ 3.177324] [<c0302f54>] (do_one_initcall) from [<c1001180>] (kernel_init_freeable+0x2d4/0x36c)
[ 3.185991] [<c1001180>] (kernel_init_freeable) from [<c0ce2a38>] (kernel_init+0x8/0x110)
[ 3.194139] [<c0ce2a38>] (kernel_init) from [<c03010f0>] (ret_from_fork+0x14/0x24)
[ 3.201678] Exception stack(0xe983ffb0 to 0xe983fff8)
[ 3.206707] ffa0: 00000000 00000000 00000000 00000000
[ 3.214856] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 3.223003] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 3.229591] FIX kmalloc-64: Restoring 0x(ptrval)-0x(ptrval)=0xcc
[ 3.229591]
[ 3.237097] FIX kmalloc-64: Object at 0x(ptrval) not freed
[ 3.242545] meson_nfc_read_buf e95e6400 0x295e6400
[ 3.247278] =============================================================================
[ 3.255421] BUG kmalloc-64 (Tainted: G B ): Redzone overwritten
[ 3.262527] -----------------------------------------------------------------------------
[ 3.262527]
[ 3.272151] INFO: 0x(ptrval)-0x(ptrval). First byte 0xff instead of 0xcc
[ 3.278827] INFO: Allocated in 0xfedfffff age=4294937620 cpu=0 pid=27697
[ 3.285499] 0xffef6f7f
[ 3.287926] 0xffffffff
[ 3.290353] 0xffffffef
[ 3.292780] 0xdf777fef
[ 3.295207] 0xffffffff
[ 3.297636] INFO: Freed in 0x80840052 age=4294937617 cpu=0 pid=33554432
[ 3.304223] INFO: Slab 0x(ptrval) objects=25 used=5 fp=0x(ptrval) flags=0x10201
[ 3.311504] INFO: Object 0x(ptrval) @offset=1024 fp=0x(ptrval)
[ 3.311504]
[ 3.318786] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 3.327454] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 3.336122] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 3.344790] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 3.353458] Object (ptrval): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 3.362040] Object (ptrval): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 3.370621] Object (ptrval): ff ff ff ff ff ff ff ff ff fd fb bf ff ff ff ff ................
[ 3.379203] Object (ptrval): ef ff f7 ff ff ff ff ff fb ff fe ff ff ff ff ff ................
[ 3.387784] Redzone (ptrval): ff ff ff ff ....
[ 3.395412] Padding (ptrval): 00 00 00 00 02 00 00 00 01 00 00 02 e0 8b ff ff ................
[ 3.404080] Padding (ptrval): 00 00 00 00 00 00 00 00 ........
[ 3.412057] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G B 5.1.0-rc1-00088-g406014e081b4-dirty #4272
[ 3.422110] Hardware name: Amlogic Meson platform
[ 3.426797] [<c0311bb8>] (unwind_backtrace) from [<c030ca68>] (show_stack+0x10/0x14)
[ 3.434510] [<c030ca68>] (show_stack) from [<c0ccba28>] (dump_stack+0xa4/0xb8)
[ 3.441705] [<c0ccba28>] (dump_stack) from [<c0487fe0>] (check_bytes_and_report+0xcc/0x104)
[ 3.450026] [<c0487fe0>] (check_bytes_and_report) from [<c04881d4>] (check_object+0x194/0x28c)
[ 3.458607] [<c04881d4>] (check_object) from [<c048a658>] (free_debug_processing+0x12c/0x420)
[ 3.467102] [<c048a658>] (free_debug_processing) from [<c048ac5c>] (__slab_free+0x310/0x4a0)
[ 3.475510] [<c048ac5c>] (__slab_free) from [<c048b1c4>] (kfree+0x184/0x274)
[ 3.482531] [<c048b1c4>] (kfree) from [<c08b861c>] (meson_nfc_exec_op+0x3b0/0x408)
[ 3.490074] [<c08b861c>] (meson_nfc_exec_op) from [<c08a424c>] (nand_read_data_op+0xb8/0x154)
[ 3.498569] [<c08a424c>] (nand_read_data_op) from [<c08ae394>] (nand_onfi_detect+0xdc/0x644)
[ 3.506976] [<c08ae394>] (nand_onfi_detect) from [<c08aa4d0>] (nand_scan_with_ids+0x900/0x171c)
[ 3.515645] [<c08aa4d0>] (nand_scan_with_ids) from [<c08b7a04>] (meson_nfc_probe+0x46c/0x694)
[ 3.524140] [<c08b7a04>] (meson_nfc_probe) from [<c081f430>] (platform_drv_probe+0x48/0x98)
[ 3.532460] [<c081f430>] (platform_drv_probe) from [<c081d4b8>] (really_probe+0x1e0/0x2cc)
[ 3.540695] [<c081d4b8>] (really_probe) from [<c081d704>] (driver_probe_device+0x60/0x16c)
[ 3.548930] [<c081d704>] (driver_probe_device) from [<c081d9b0>] (device_driver_attach+0x58/0x60)
[ 3.557771] [<c081d9b0>] (device_driver_attach) from [<c081da10>] (__driver_attach+0x58/0xcc)
[ 3.566267] [<c081da10>] (__driver_attach) from [<c081b87c>] (bus_for_each_dev+0x74/0xb4)
[ 3.574415] [<c081b87c>] (bus_for_each_dev) from [<c081c8ec>] (bus_add_driver+0x1b8/0x1d8)
[ 3.582649] [<c081c8ec>] (bus_add_driver) from [<c081e53c>] (driver_register+0x74/0x108)
[ 3.590711] [<c081e53c>] (driver_register) from [<c0302f54>] (do_one_initcall+0x54/0x284)
[ 3.598859] [<c0302f54>] (do_one_initcall) from [<c1001180>] (kernel_init_freeable+0x2d4/0x36c)
[ 3.607527] [<c1001180>] (kernel_init_freeable) from [<c0ce2a38>] (kernel_init+0x8/0x110)
[ 3.615675] [<c0ce2a38>] (kernel_init) from [<c03010f0>] (ret_from_fork+0x14/0x24)
[ 3.623214] Exception stack(0xe983ffb0 to 0xe983fff8)
[ 3.628243] ffa0: 00000000 00000000 00000000 00000000
[ 3.636392] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 3.644539] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 3.651126] FIX kmalloc-64: Restoring 0x(ptrval)-0x(ptrval)=0xcc
[ 3.651126]
[ 3.658617] FIX kmalloc-64: Object at 0x(ptrval) not freed
[ 3.664070] meson_nfc_read_buf e95e62c0 0x295e62c0
[ 3.668825] =============================================================================
[ 3.676957] BUG kmalloc-64 (Tainted: G B ): Redzone overwritten
[ 3.684064] -----------------------------------------------------------------------------
[ 3.684064]
[ 3.693687] INFO: 0x(ptrval)-0x(ptrval). First byte 0x0 instead of 0xcc
[ 3.700277] INFO: Freed in 0xfe55620 age=536841280 cpu=4294967263 pid=-1048577
[ 3.707469] INFO: Slab 0x(ptrval) objects=25 used=6 fp=0x(ptrval) flags=0x10201
[ 3.714750] INFO: Object 0x(ptrval) @offset=704 fp=0x(ptrval)
[ 3.714750]
[ 3.721945] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 3.730613] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 3.739281] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 3.747949] Redzone (ptrval): cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
[ 3.756618] Object (ptrval): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 3.765199] Object (ptrval): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 3.773781] Object (ptrval): ff ff ff ff ff ff ff ff ff bf ff ff 7f ff ff ff ................
[ 3.782362] Object (ptrval): ff ff ff ff ff ff ff ff ff ff df ff 2f ff ff ff ............/...
[ 3.790944] Redzone (ptrval): 00 00 00 00 ....
[ 3.798572] Padding (ptrval): ff ff ff ff ff ff d7 fe ff ff ff ff ff ff ff ff ................
[ 3.807240] Padding (ptrval): db ff ff ff 5e 7b ff ff ....^{..
[ 3.815217] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G B 5.1.0-rc1-00088-g406014e081b4-dirty #4272
[ 3.825269] Hardware name: Amlogic Meson platform
[ 3.829957] [<c0311bb8>] (unwind_backtrace) from [<c030ca68>] (show_stack+0x10/0x14)
[ 3.837669] [<c030ca68>] (show_stack) from [<c0ccba28>] (dump_stack+0xa4/0xb8)
[ 3.844865] [<c0ccba28>] (dump_stack) from [<c0487fe0>] (check_bytes_and_report+0xcc/0x104)
[ 3.853186] [<c0487fe0>] (check_bytes_and_report) from [<c04881d4>] (check_object+0x194/0x28c)
[ 3.861767] [<c04881d4>] (check_object) from [<c048a658>] (free_debug_processing+0x12c/0x420)
[ 3.870262] [<c048a658>] (free_debug_processing) from [<c048ac5c>] (__slab_free+0x310/0x4a0)
[ 3.878670] [<c048ac5c>] (__slab_free) from [<c048b1c4>] (kfree+0x184/0x274)
[ 3.885691] [<c048b1c4>] (kfree) from [<c08b861c>] (meson_nfc_exec_op+0x3b0/0x408)
[ 3.893233] [<c08b861c>] (meson_nfc_exec_op) from [<c08a424c>] (nand_read_data_op+0xb8/0x154)
[ 3.901728] [<c08a424c>] (nand_read_data_op) from [<c08ae394>] (nand_onfi_detect+0xdc/0x644)
[ 3.910135] [<c08ae394>] (nand_onfi_detect) from [<c08aa4d0>] (nand_scan_with_ids+0x900/0x171c)
[ 3.918805] [<c08aa4d0>] (nand_scan_with_ids) from [<c08b7a04>] (meson_nfc_probe+0x46c/0x694)
[ 3.927300] [<c08b7a04>] (meson_nfc_probe) from [<c081f430>] (platform_drv_probe+0x48/0x98)
[ 3.935619] [<c081f430>] (platform_drv_probe) from [<c081d4b8>] (really_probe+0x1e0/0x2cc)
[ 3.943854] [<c081d4b8>] (really_probe) from [<c081d704>] (driver_probe_device+0x60/0x16c)
[ 3.952089] [<c081d704>] (driver_probe_device) from [<c081d9b0>] (device_driver_attach+0x58/0x60)
[ 3.960931] [<c081d9b0>] (device_driver_attach) from [<c081da10>] (__driver_attach+0x58/0xcc)
[ 3.969427] [<c081da10>] (__driver_attach) from [<c081b87c>] (bus_for_each_dev+0x74/0xb4)
[ 3.977575] [<c081b87c>] (bus_for_each_dev) from [<c081c8ec>] (bus_add_driver+0x1b8/0x1d8)
[ 3.985808] [<c081c8ec>] (bus_add_driver) from [<c081e53c>] (driver_register+0x74/0x108)
[ 3.993871] [<c081e53c>] (driver_register) from [<c0302f54>] (do_one_initcall+0x54/0x284)
[ 4.002019] [<c0302f54>] (do_one_initcall) from [<c1001180>] (kernel_init_freeable+0x2d4/0x36c)
[ 4.010686] [<c1001180>] (kernel_init_freeable) from [<c0ce2a38>] (kernel_init+0x8/0x110)
[ 4.018834] [<c0ce2a38>] (kernel_init) from [<c03010f0>] (ret_from_fork+0x14/0x24)
[ 4.026373] Exception stack(0xe983ffb0 to 0xe983fff8)
[ 4.031402] ffa0: 00000000 00000000 00000000 00000000
[ 4.039552] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 4.047699] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 4.054286] FIX kmalloc-64: Restoring 0x(ptrval)-0x(ptrval)=0xcc
[ 4.054286]
[ 4.061773] FIX kmalloc-64: Object at 0x(ptrval) not freed
[ 4.067212] Could not find a valid ONFI parameter page, trying bit-wise majority to recover it
[ 4.075833] ONFI parameter recovery failed, aborting
[ 4.080773] meson_nfc_read_buf e95e7bc0 0x295e7bc0
[ 4.085578] meson_nfc_read_buf e95e7bc0 0x295e7bc0
[ 4.090336] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xde
[ 4.096586] nand: Hynix NAND 8GiB 3,3V 8-bit
[ 4.100847] nand: 8192 MiB, MLC, erase size: 4096 KiB, page size: 16384, OOB size: 1280
[ 4.108873] meson_nfc_read_buf e95e7bc0 0x295e7bc0
[ 4.116115] Unable to handle kernel paging request at virtual address fffffffe
[ 4.120770] pgd = (ptrval)
[ 4.123457] [fffffffe] *pgd=2bfde861, *pte=00000000, *ppte=00000000
[ 4.129703] Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM
[ 4.135593] Modules linked in:
[ 4.138630] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G B 5.1.0-rc1-00088-g406014e081b4-dirty #4272
[ 4.148681] Hardware name: Amlogic Meson platform
[ 4.153364] PC is at 0xfffffffe
[ 4.156491] LR is at __handle_irq_event_percpu+0x7c/0x2c4
[ 4.161858] pc : [<fffffffe>] lr : [<c037c878>] psr: 600001b3
[ 4.168099] sp : c1101e48 ip : ea001ee8 fp : c11c32a0
[ 4.173300] r10: c11c32b4 r9 : c1101f10 r8 : c1101e90
[ 4.178501] r7 : 00000033 r6 : 00000000 r5 : e9a566a8 r4 : e95e4f40
[ 4.185002] r3 : ffffffff r2 : c1108cb4 r1 : ffffffff r0 : 00000033
[ 4.191505] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment none
[ 4.198872] Control: 10c5387d Table: 0020404a DAC: 00000051
[ 4.204592] Process swapper/0 (pid: 0, stack limit = 0x(ptrval))
[ 4.210573] Stack: (0xc1101e48 to 0xc1102000)
[ 4.214910] 1e40: 00000080 c11c3264 eaf86680 c11c32b4 ffffe000 e9a56640
[ 4.223059] 1e60: c1108cb4 c11c2d03 eaf85580 c1108c88 e9a566a8 e9a56640 00000001 00000000
[ 4.231207] 1e80: c1101f10 c021f540 c0f40060 c037caec 00000000 5b1da9e9 e9a56640 e9a566a8
[ 4.239355] 1ea0: c11093a0 c037cb78 e9a56640 e9a566a8 c11093a0 c0380d90 c108d1b4 00000000
[ 4.247503] 1ec0: 00000033 c037ba34 c108d1b4 c037c014 c11093a0 c11579c8 f080210c f0802100
[ 4.255651] 1ee0: c1101f10 f0803100 c108c970 c06fe26c c030946c 60000013 ffffffff c1101f44
[ 4.263799] 1f00: c1108c88 c1100000 c108c970 c0301a8c 00000000 0000a974 eaf8ade0 c031aee0
[ 4.271948] 1f20: ffffe000 c1108cb4 c1108cf8 00000001 c1108c88 00000000 c108c970 c0f40060
[ 4.280096] 1f40: c1108d9c c1101f60 c0309468 c030946c 60000013 ffffffff 00000051 00000000
[ 4.288244] 1f60: ffffe000 c0356de4 00000000 c1108c88 00000041 5b1da9e9 c1112210 000000c9
[ 4.296392] 1f80: 00000001 ffffffff c11d7640 c1108c88 00000041 c11d7640 c106da40 c0357168
[ 4.304540] 1fa0: c11d7698 c1000e80 ffffffff ffffffff 00000000 c1000584 00000000 ebfffd00
[ 4.312688] 1fc0: 00000000 c106da40 5b18a8e9 00000000 00000000 c1000330 00000051 10c0387d
[ 4.320836] 1fe0: 00000f81 1f164000 414fc091 10c5387d 00000000 00000000 00000000 00000000
[ 4.328989] [<c037c878>] (__handle_irq_event_percpu) from [<c037caec>] (handle_irq_event_percpu+0x2c/0x80)
[ 4.338608] [<c037caec>] (handle_irq_event_percpu) from [<c037cb78>] (handle_irq_event+0x38/0x5c)
[ 4.347451] [<c037cb78>] (handle_irq_event) from [<c0380d90>] (handle_fasteoi_irq+0xcc/0x17c)
[ 4.355943] [<c0380d90>] (handle_fasteoi_irq) from [<c037ba34>] (generic_handle_irq+0x24/0x34)
[ 4.364525] [<c037ba34>] (generic_handle_irq) from [<c037c014>] (__handle_domain_irq+0x7c/0xec)
[ 4.373196] [<c037c014>] (__handle_domain_irq) from [<c06fe26c>] (gic_handle_irq+0x4c/0x90)
[ 4.381515] [<c06fe26c>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0xa8)
[ 4.388966] Exception stack(0xc1101f10 to 0xc1101f58)
[ 4.393995] 1f00: 00000000 0000a974 eaf8ade0 c031aee0
[ 4.402145] 1f20: ffffe000 c1108cb4 c1108cf8 00000001 c1108c88 00000000 c108c970 c0f40060
[ 4.410292] 1f40: c1108d9c c1101f60 c0309468 c030946c 60000013 ffffffff
[ 4.416883] [<c0301a8c>] (__irq_svc) from [<c030946c>] (arch_cpu_idle+0x38/0x3c)
[ 4.424252] [<c030946c>] (arch_cpu_idle) from [<c0356de4>] (do_idle+0x1e4/0x290)
[ 4.431618] [<c0356de4>] (do_idle) from [<c0357168>] (cpu_startup_entry+0x18/0x1c)
[ 4.439158] [<c0357168>] (cpu_startup_entry) from [<c1000e80>] (start_kernel+0x45c/0x488)
[ 4.447305] [<c1000e80>] (start_kernel) from [<00000000>] ( (null))
[ 4.453631] Code: bad PC value
[ 4.456674] ---[ end trace eaad995c3018501e ]---
[ 4.461259] Kernel panic - not syncing: Fatal exception in interrupt
[ 4.467592] CPU3: stopping
[ 4.470277] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G B D 5.1.0-rc1-00088-g406014e081b4-dirty #4272
[ 4.480328] Hardware name: Amlogic Meson platform
[ 4.485017] [<c0311bb8>] (unwind_backtrace) from [<c030ca68>] (show_stack+0x10/0x14)
[ 4.492729] [<c030ca68>] (show_stack) from [<c0ccba28>] (dump_stack+0xa4/0xb8)
[ 4.499924] [<c0ccba28>] (dump_stack) from [<c03100d4>] (handle_IPI+0x418/0x444)
[ 4.507292] [<c03100d4>] (handle_IPI) from [<c06fe2ac>] (gic_handle_irq+0x8c/0x90)
[ 4.514832] [<c06fe2ac>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0xa8)
[ 4.522283] Exception stack(0xe987df60 to 0xe987dfa8)
[ 4.527315] df60: 00000000 00003658 eafc0de0 c031aee0 ffffe000 c1108cb4 c1108cf8 00000008
[ 4.535462] df80: c1108c88 00000000 c108c970 c0f40060 00000001 e987dfb0 c0309468 c030946c
[ 4.543607] dfa0: 600c0013 ffffffff
[ 4.547079] [<c0301a8c>] (__irq_svc) from [<c030946c>] (arch_cpu_idle+0x38/0x3c)
[ 4.554447] [<c030946c>] (arch_cpu_idle) from [<c0356de4>] (do_idle+0x1e4/0x290)
[ 4.561814] [<c0356de4>] (do_idle) from [<c0357168>] (cpu_startup_entry+0x18/0x1c)
[ 4.569355] [<c0357168>] (cpu_startup_entry) from [<003026ac>] (0x3026ac)
[ 4.576113] CPU1: stopping
[ 4.578803] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G B D 5.1.0-rc1-00088-g406014e081b4-dirty #4272
[ 4.588855] Hardware name: Amlogic Meson platform
[ 4.593543] [<c0311bb8>] (unwind_backtrace) from [<c030ca68>] (show_stack+0x10/0x14)
[ 4.601254] [<c030ca68>] (show_stack) from [<c0ccba28>] (dump_stack+0xa4/0xb8)
[ 4.608449] [<c0ccba28>] (dump_stack) from [<c03100d4>] (handle_IPI+0x418/0x444)
[ 4.615817] [<c03100d4>] (handle_IPI) from [<c06fe2ac>] (gic_handle_irq+0x8c/0x90)
[ 4.623358] [<c06fe2ac>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0xa8)
[ 4.630809] Exception stack(0xe9877f60 to 0xe9877fa8)
[ 4.635841] 7f60: 00000000 00005464 eaf9cde0 c031aee0 ffffe000 c1108cb4 c1108cf8 00000002
[ 4.643989] 7f80: c1108c88 00000000 c108c970 c0f40060 00000001 e9877fb0 c0309468 c030946c
[ 4.652133] 7fa0: 600c0013 ffffffff
[ 4.655605] [<c0301a8c>] (__irq_svc) from [<c030946c>] (arch_cpu_idle+0x38/0x3c)
[ 4.662973] [<c030946c>] (arch_cpu_idle) from [<c0356de4>] (do_idle+0x1e4/0x290)
[ 4.670341] [<c0356de4>] (do_idle) from [<c0357168>] (cpu_startup_entry+0x18/0x1c)
[ 4.677881] [<c0357168>] (cpu_startup_entry) from [<003026ac>] (0x3026ac)
[ 4.684640] CPU2: stopping
[ 4.687329] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G B D 5.1.0-rc1-00088-g406014e081b4-dirty #4272
[ 4.697381] Hardware name: Amlogic Meson platform
[ 4.702069] [<c0311bb8>] (unwind_backtrace) from [<c030ca68>] (show_stack+0x10/0x14)
[ 4.709781] [<c030ca68>] (show_stack) from [<c0ccba28>] (dump_stack+0xa4/0xb8)
[ 4.716975] [<c0ccba28>] (dump_stack) from [<c03100d4>] (handle_IPI+0x418/0x444)
[ 4.724344] [<c03100d4>] (handle_IPI) from [<c06fe2ac>] (gic_handle_irq+0x8c/0x90)
[ 4.731884] [<c06fe2ac>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0xa8)
[ 4.739336] Exception stack(0xe987bf60 to 0xe987bfa8)
[ 4.744367] bf60: 00000000 00009844 eafaede0 c031aee0 ffffe000 c1108cb4 c1108cf8 00000004
[ 4.752515] bf80: c1108c88 00000000 c108c970 c0f40060 eafaab34 e987bfb0 c0309468 c030946c
[ 4.760660] bfa0: 600c0013 ffffffff
[ 4.764132] [<c0301a8c>] (__irq_svc) from [<c030946c>] (arch_cpu_idle+0x38/0x3c)
[ 4.771499] [<c030946c>] (arch_cpu_idle) from [<c0356de4>] (do_idle+0x1e4/0x290)
[ 4.778867] [<c0356de4>] (do_idle) from [<c0357168>] (cpu_startup_entry+0x18/0x1c)
[ 4.786408] [<c0357168>] (cpu_startup_entry) from [<003026ac>] (0x3026ac)
[ 4.793171] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-03-22 21:07 ` Martin Blumenstingl
@ 2019-03-25 10:04 ` Liang Yang
2019-03-25 18:31 ` Martin Blumenstingl
0 siblings, 1 reply; 13+ messages in thread
From: Liang Yang @ 2019-03-25 10:04 UTC (permalink / raw)
To: Martin Blumenstingl, Matthew Wilcox
Cc: mhocko, linux, linux-kernel, rppt, linux-mm, linux-mtd,
linux-amlogic, akpm, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 3161 bytes --]
Hi Martin,
On 2019/3/23 5:07, Martin Blumenstingl wrote:
> Hi Matthew,
>
> On Thu, Mar 21, 2019 at 10:44 PM Matthew Wilcox <willy@infradead.org> wrote:
>>
>> On Thu, Mar 21, 2019 at 09:17:34PM +0100, Martin Blumenstingl wrote:
>>> Hello,
>>>
>>> I am experiencing the following crash:
>>> ------------[ cut here ]------------
>>> kernel BUG at mm/slub.c:3950!
>>
>> if (unlikely(!PageSlab(page))) {
>> BUG_ON(!PageCompound(page));
>>
>> You called kfree() on the address of a page which wasn't allocated by slab.
>>
>>> I have traced this crash to the kfree() in meson_nfc_read_buf().
>>> my observation is as follows:
>>> - meson_nfc_read_buf() is called 7 times without any crash, the
>>> kzalloc() call returns 0xe9e6c600 (virtual address) / 0x29e6c600
>>> (physical address)
>>> - the eight time meson_nfc_read_buf() is called kzalloc() call returns
>>> 0xee39a38b (virtual address) / 0x2e39a38b (physical address) and the
>>> final kfree() crashes
>>> - changing the size in the kzalloc() call from PER_INFO_BYTE (= 8) to
>>> PAGE_SIZE works around that crash
>>
>> I suspect you're doing something which corrupts memory. Overrunning
>> the end of your allocation or something similar. Have you tried KASAN
>> or even the various slab debugging (eg redzones)?
> KASAN is not available on 32-bit ARM. there was some progress last
> year [0] but it didn't make it into mainline. I tried to make the
> patches apply again and got it to compile (and my kernel is still
> booting) but I have no idea if it's still working. for anyone
> interested, my patches are here: [1] (I consider this a HACK because I
> don't know anything about the code which is being touched in the
> patches, I only made it compile)
>
> SLAB debugging (redzones) were a great hint, thank you very much for
> that Matthew! I enabled:
> CONFIG_SLUB_DEBUG=y
> CONFIG_SLUB_DEBUG_ON=y
> and with that I now get "BUG kmalloc-64 (Not tainted): Redzone
> overwritten" (a larger kernel log extract is attached).
>
> I'm starting to wonder if the NAND controller (hardware) writes more
> than 8 bytes.
> some context: the "info" buffer allocated in meson_nfc_read_buf is
> then passed to the NAND controller IP (after using dma_map_single).
>
> Liang, how does the NAND controller know that it only has to send
> PER_INFO_BYTE (= 8) bytes when called from meson_nfc_read_buf? all
> other callers of meson_nfc_dma_buffer_setup (which passes the info
> buffer to the hardware) are using (nand->ecc.steps * PER_INFO_BYTE)
> bytes?
>
NFC_CMD_N2M and CMDRWGEN are different commands. CMDRWGEN needs to set
the ecc page size (1KB or 512B) and Pages(2, 4, 8, ...), so
PER_INFO_BYTE(= 8) bytes for each ecc page.
I have never used NFC_CMD_N2M to transfer data before, because it is
very low efficient. And I do a experiment with the attachment and find
on overwritten on my meson axg platform.
Martin, I would appreciate it very much if you would try the attachment
on your meson m8b platform.
>
> Regards
> Martin
>
>
> [0] https://lore.kernel.org/patchwork/cover/913212/
> [1] https://github.com/xdarklight/linux/tree/arm-kasan-hack-v5.1-rc1
>
[-- Attachment #2: nand_debug.diff --]
[-- Type: text/plain, Size: 1104 bytes --]
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
old mode 100644
new mode 100755
index e858d58..905ef39
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -527,11 +527,12 @@ static void meson_nfc_dma_buffer_release(struct nand_chip *nand,
static int meson_nfc_read_buf(struct nand_chip *nand, u8 *buf, int len)
{
struct meson_nfc *nfc = nand_get_controller_data(nand);
- int ret = 0;
+ int ret = 0, i;
u32 cmd;
u8 *info;
- info = kzalloc(PER_INFO_BYTE, GFP_KERNEL);
+ info = kzalloc(2 * PER_INFO_BYTE, GFP_KERNEL);
+ memset(info, 0xFD, 2 * PER_INFO_BYTE);
ret = meson_nfc_dma_buffer_setup(nand, buf, len, info,
PER_INFO_BYTE, DMA_FROM_DEVICE);
if (ret)
@@ -543,6 +544,12 @@ static int meson_nfc_read_buf(struct nand_chip *nand, u8 *buf, int len)
meson_nfc_drain_cmd(nfc);
meson_nfc_wait_cmd_finish(nfc, 1000);
meson_nfc_dma_buffer_release(nand, len, PER_INFO_BYTE, DMA_FROM_DEVICE);
+
+ for (i = 0; i < 2 * PER_INFO_BYTE; i++){
+ printk("0x%x ", info[i]);
+ }
+ printk("\n");
+
kfree(info);
return ret;
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-03-25 10:04 ` Liang Yang
@ 2019-03-25 18:31 ` Martin Blumenstingl
2019-03-27 8:53 ` Liang Yang
0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-03-25 18:31 UTC (permalink / raw)
To: Liang Yang
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 4426 bytes --]
Hi Liang,
On Mon, Mar 25, 2019 at 11:03 AM Liang Yang <liang.yang@amlogic.com> wrote:
>
> Hi Martin,
>
> On 2019/3/23 5:07, Martin Blumenstingl wrote:
> > Hi Matthew,
> >
> > On Thu, Mar 21, 2019 at 10:44 PM Matthew Wilcox <willy@infradead.org> wrote:
> >>
> >> On Thu, Mar 21, 2019 at 09:17:34PM +0100, Martin Blumenstingl wrote:
> >>> Hello,
> >>>
> >>> I am experiencing the following crash:
> >>> ------------[ cut here ]------------
> >>> kernel BUG at mm/slub.c:3950!
> >>
> >> if (unlikely(!PageSlab(page))) {
> >> BUG_ON(!PageCompound(page));
> >>
> >> You called kfree() on the address of a page which wasn't allocated by slab.
> >>
> >>> I have traced this crash to the kfree() in meson_nfc_read_buf().
> >>> my observation is as follows:
> >>> - meson_nfc_read_buf() is called 7 times without any crash, the
> >>> kzalloc() call returns 0xe9e6c600 (virtual address) / 0x29e6c600
> >>> (physical address)
> >>> - the eight time meson_nfc_read_buf() is called kzalloc() call returns
> >>> 0xee39a38b (virtual address) / 0x2e39a38b (physical address) and the
> >>> final kfree() crashes
> >>> - changing the size in the kzalloc() call from PER_INFO_BYTE (= 8) to
> >>> PAGE_SIZE works around that crash
> >>
> >> I suspect you're doing something which corrupts memory. Overrunning
> >> the end of your allocation or something similar. Have you tried KASAN
> >> or even the various slab debugging (eg redzones)?
> > KASAN is not available on 32-bit ARM. there was some progress last
> > year [0] but it didn't make it into mainline. I tried to make the
> > patches apply again and got it to compile (and my kernel is still
> > booting) but I have no idea if it's still working. for anyone
> > interested, my patches are here: [1] (I consider this a HACK because I
> > don't know anything about the code which is being touched in the
> > patches, I only made it compile)
> >
> > SLAB debugging (redzones) were a great hint, thank you very much for
> > that Matthew! I enabled:
> > CONFIG_SLUB_DEBUG=y
> > CONFIG_SLUB_DEBUG_ON=y
> > and with that I now get "BUG kmalloc-64 (Not tainted): Redzone
> > overwritten" (a larger kernel log extract is attached).
> >
> > I'm starting to wonder if the NAND controller (hardware) writes more
> > than 8 bytes.
> > some context: the "info" buffer allocated in meson_nfc_read_buf is
> > then passed to the NAND controller IP (after using dma_map_single).
> >
> > Liang, how does the NAND controller know that it only has to send
> > PER_INFO_BYTE (= 8) bytes when called from meson_nfc_read_buf? all
> > other callers of meson_nfc_dma_buffer_setup (which passes the info
> > buffer to the hardware) are using (nand->ecc.steps * PER_INFO_BYTE)
> > bytes?
> >
> NFC_CMD_N2M and CMDRWGEN are different commands. CMDRWGEN needs to set
> the ecc page size (1KB or 512B) and Pages(2, 4, 8, ...), so
> PER_INFO_BYTE(= 8) bytes for each ecc page.
> I have never used NFC_CMD_N2M to transfer data before, because it is
> very low efficient. And I do a experiment with the attachment and find
> on overwritten on my meson axg platform.
>
> Martin, I would appreciate it very much if you would try the attachment
> on your meson m8b platform.
thank you for your debug patch! on my board 2 * PER_INFO_BYTE is not enough.
I took the idea from your patch and adapted it so I could print a
buffer with 256 bytes (which seems to be "big enough" for my board).
see the attached, modified patch
in the output I see that sometimes the first 32 bytes are not touched
by the controller, but everything beyond 32 bytes is modified in the
info buffer.
I also tried to increase the buffer size to 512, but that didn't make
a difference (I never saw any info buffer modification beyond 256
bytes).
also I just noticed that I didn't give you much details on my NAND chip yet.
from Amlogic vendor u-boot on Meson8m2 (all my Meson8b boards have
eMMC flash, but I believe the NAND controller on Meson8 to GXBB is
identical):
m8m2_n200_v1#amlnf chipinfo
flash info
name:B revision 20nm NAND 8GiB H27UCG8T2B, id:ad de 94 eb 74 44 0 0
pagesize:0x4000, blocksize:0x400000, oobsize:0x500, chipsize:0x2000,
option:0x8, T_REA:16, T_RHOH:15
hw controller info
chip_num:1, onfi_mode:0, page_shift:14, block_shift:22, option:0xc2
ecc_unit:1024, ecc_bytes:70, ecc_steps:16, ecc_max:40
bch_mode:5, user_mode:2, oobavail:32, oobtail:64384
Regards
Martin
[-- Attachment #2: debug-256-buffer-output.txt --]
[-- Type: text/plain, Size: 8077 bytes --]
...
[ 2.716885] 00000000: 0000 8005 2800 2945 fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.720464] 00000020: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.729689] 00000040: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.738847] 00000060: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.748065] 00000080: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.757228] 000000a0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.766404] 000000c0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.775602] 000000e0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.784780]
[ 2.786306] 00000000: 0000 801b 2800 2945 fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.795455] 00000020: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.804638] 00000040: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.813828] 00000060: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.823014] 00000080: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.832203] 000000a0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.841390] 000000c0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.850580] 000000e0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.859759]
[ 2.861303] 00000000: 0000 8011 3d00 295e fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.870435] 00000020: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.879618] 00000040: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.888812] 00000060: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.897996] 00000080: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.907184] 000000a0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.916364] 000000c0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.925559] 000000e0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.934741]
[ 2.936367] 00000000: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 2.945413] 00000020: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 2.954600] 00000040: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 2.963803] 00000060: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 2.972978] 00000080: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 2.982163] 000000a0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 2.991352] 000000c0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.000539] 000000e0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b a56b
[ 3.009722]
[ 3.011233] 00000000: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.020390] 00000020: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.029580] 00000040: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.038766] 00000060: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.047971] 00000080: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.057145] 000000a0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.066325] 000000c0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.075521] 000000e0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b a56b
[ 3.084700]
[ 3.086213] 00000000: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.095373] 00000020: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.104558] 00000040: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.113748] 00000060: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.122934] 00000080: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.132124] 000000a0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.141311] 000000c0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b
[ 3.150505] 000000e0: 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b 6b6b a56b
[ 3.159681]
[ 3.161171] Could not find a valid ONFI parameter page, trying bit-wise majority to recover it
[ 3.169786] ONFI parameter recovery failed, aborting
[ 3.174740] 00000000: 0000 8010 3d00 295e fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.183877] 00000020: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.193064] 00000040: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.202249] 00000060: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.211439] 00000080: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.220626] 000000a0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.229815] 000000c0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.239002] 000000e0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.248184]
[ 3.249743] 00000000: 0000 8010 22c0 295e fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.258857] 00000020: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.268044] 00000040: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.277231] 00000060: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.286411] 00000080: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.295607] 000000a0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.304794] 000000c0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.313984] 000000e0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.323163]
[ 3.324657] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xde
[ 3.330968] nand: Hynix NAND 8GiB 3,3V 8-bit
[ 3.335210] nand: 8192 MiB, MLC, erase size: 4096 KiB, page size: 16384, OOB size: 1280
[ 3.343274] 00000000: 0000 8010 2400 295e fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.352390] 00000020: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.361572] 00000040: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.370762] 00000060: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.379963] 00000080: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.389140] 000000a0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.398326] 000000c0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.407519] 000000e0: fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd fdfd
[ 3.416695]
...
[-- Attachment #3: nand_debug_martin.patch --]
[-- Type: application/x-patch, Size: 986 bytes --]
[-- Attachment #4: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-03-25 18:31 ` Martin Blumenstingl
@ 2019-03-27 8:53 ` Liang Yang
2019-03-28 18:03 ` Martin Blumenstingl
0 siblings, 1 reply; 13+ messages in thread
From: Liang Yang @ 2019-03-27 8:53 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 5513 bytes --]
Hi Martin,
Thanks a lot.
On 2019/3/26 2:31, Martin Blumenstingl wrote:
> Hi Liang,
>
> On Mon, Mar 25, 2019 at 11:03 AM Liang Yang <liang.yang@amlogic.com> wrote:
>>
>> Hi Martin,
>>
>> On 2019/3/23 5:07, Martin Blumenstingl wrote:
>>> Hi Matthew,
>>>
>>> On Thu, Mar 21, 2019 at 10:44 PM Matthew Wilcox <willy@infradead.org> wrote:
>>>>
>>>> On Thu, Mar 21, 2019 at 09:17:34PM +0100, Martin Blumenstingl wrote:
>>>>> Hello,
>>>>>
>>>>> I am experiencing the following crash:
>>>>> ------------[ cut here ]------------
>>>>> kernel BUG at mm/slub.c:3950!
>>>>
>>>> if (unlikely(!PageSlab(page))) {
>>>> BUG_ON(!PageCompound(page));
>>>>
>>>> You called kfree() on the address of a page which wasn't allocated by slab.
>>>>
>>>>> I have traced this crash to the kfree() in meson_nfc_read_buf().
>>>>> my observation is as follows:
>>>>> - meson_nfc_read_buf() is called 7 times without any crash, the
>>>>> kzalloc() call returns 0xe9e6c600 (virtual address) / 0x29e6c600
>>>>> (physical address)
>>>>> - the eight time meson_nfc_read_buf() is called kzalloc() call returns
>>>>> 0xee39a38b (virtual address) / 0x2e39a38b (physical address) and the
>>>>> final kfree() crashes
>>>>> - changing the size in the kzalloc() call from PER_INFO_BYTE (= 8) to
>>>>> PAGE_SIZE works around that crash
>>>>
>>>> I suspect you're doing something which corrupts memory. Overrunning
>>>> the end of your allocation or something similar. Have you tried KASAN
>>>> or even the various slab debugging (eg redzones)?
>>> KASAN is not available on 32-bit ARM. there was some progress last
>>> year [0] but it didn't make it into mainline. I tried to make the
>>> patches apply again and got it to compile (and my kernel is still
>>> booting) but I have no idea if it's still working. for anyone
>>> interested, my patches are here: [1] (I consider this a HACK because I
>>> don't know anything about the code which is being touched in the
>>> patches, I only made it compile)
>>>
>>> SLAB debugging (redzones) were a great hint, thank you very much for
>>> that Matthew! I enabled:
>>> CONFIG_SLUB_DEBUG=y
>>> CONFIG_SLUB_DEBUG_ON=y
>>> and with that I now get "BUG kmalloc-64 (Not tainted): Redzone
>>> overwritten" (a larger kernel log extract is attached).
>>>
>>> I'm starting to wonder if the NAND controller (hardware) writes more
>>> than 8 bytes.
>>> some context: the "info" buffer allocated in meson_nfc_read_buf is
>>> then passed to the NAND controller IP (after using dma_map_single).
>>>
>>> Liang, how does the NAND controller know that it only has to send
>>> PER_INFO_BYTE (= 8) bytes when called from meson_nfc_read_buf? all
>>> other callers of meson_nfc_dma_buffer_setup (which passes the info
>>> buffer to the hardware) are using (nand->ecc.steps * PER_INFO_BYTE)
>>> bytes?
>>>
>> NFC_CMD_N2M and CMDRWGEN are different commands. CMDRWGEN needs to set
>> the ecc page size (1KB or 512B) and Pages(2, 4, 8, ...), so
>> PER_INFO_BYTE(= 8) bytes for each ecc page.
>> I have never used NFC_CMD_N2M to transfer data before, because it is
>> very low efficient. And I do a experiment with the attachment and find
>> on overwritten on my meson axg platform.
>>
>> Martin, I would appreciate it very much if you would try the attachment
>> on your meson m8b platform.
> thank you for your debug patch! on my board 2 * PER_INFO_BYTE is not enough.
> I took the idea from your patch and adapted it so I could print a
> buffer with 256 bytes (which seems to be "big enough" for my board).
it only needs PER_INFO_BYTE (= 8) bytes, because NFC_CMD_N2M don't set
*Pages*, that is not like CMDRWGEN which needs Pages*PER_INFO_BYTE (= 8)
bytes when setting *Pages* parameter. I have been thinking that
NFC_CMD_N2M only occupis PER_INFO_BYTE (= 8) bytes. And i have tried to
not set the info address, the machine would crash.
> see the attached, modified patch
>
> in the output I see that sometimes the first 32 bytes are not touched
> by the controller, but everything beyond 32 bytes is modified in the
> info buffer.
>
it really makes sense that the controller sometimes fills the space
beyond the first 8 bytes. However i expect the controller should only
take the first 8 bytes when using NFC_CMD_N2M.
> I also tried to increase the buffer size to 512, but that didn't make
> a difference (I never saw any info buffer modification beyond 256
> bytes).
>
> also I just noticed that I didn't give you much details on my NAND chip yet.
> from Amlogic vendor u-boot on Meson8m2 (all my Meson8b boards have
> eMMC flash, but I believe the NAND controller on Meson8 to GXBB is
> identical):
> m8m2_n200_v1#amlnf chipinfo
> flash info
> name:B revision 20nm NAND 8GiB H27UCG8T2B, id:ad de 94 eb 74 44 0 0
> pagesize:0x4000, blocksize:0x400000, oobsize:0x500, chipsize:0x2000,
> option:0x8, T_REA:16, T_RHOH:15
> hw controller info
> chip_num:1, onfi_mode:0, page_shift:14, block_shift:22, option:0xc2
> ecc_unit:1024, ecc_bytes:70, ecc_steps:16, ecc_max:40
> bch_mode:5, user_mode:2, oobavail:32, oobtail:64384
>
I don't think it is caused by a different NAND type, but i have followed
the some test on my GXL platform. we can see the result from the
attachment. By the way, i don't find any information about this on meson
NFC datasheet, so i will ask our VLSI.
Martin, May you reproduce it with the new patch on meson8b platform ? I
need a more clear and easier compared log like gxl.txt. Thanks.
>
> Regards
>
> Martin
>
[-- Attachment #2: nand_debug.diff --]
[-- Type: text/plain, Size: 3399 bytes --]
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
old mode 100644
new mode 100755
index e858d58..4f2d709
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -527,11 +527,12 @@ static void meson_nfc_dma_buffer_release(struct nand_chip *nand,
static int meson_nfc_read_buf(struct nand_chip *nand, u8 *buf, int len)
{
struct meson_nfc *nfc = nand_get_controller_data(nand);
- int ret = 0;
+ int ret = 0, i;
u32 cmd;
u8 *info;
- info = kzalloc(PER_INFO_BYTE, GFP_KERNEL);
+ info = kzalloc(256, GFP_KERNEL);
+ memset(info, 0xFD, 256);
ret = meson_nfc_dma_buffer_setup(nand, buf, len, info,
PER_INFO_BYTE, DMA_FROM_DEVICE);
if (ret)
@@ -543,6 +544,14 @@ static int meson_nfc_read_buf(struct nand_chip *nand, u8 *buf, int len)
meson_nfc_drain_cmd(nfc);
meson_nfc_wait_cmd_finish(nfc, 1000);
meson_nfc_dma_buffer_release(nand, len, PER_INFO_BYTE, DMA_FROM_DEVICE);
+
+ for (i = 0; i < 256; i++) {
+ if (i > 0 && i % 16 == 0)
+ pr_info("");
+ printk(KERN_CONT "0x%x ", info[i]);
+ }
+ pr_info("");
+
kfree(info);
return ret;
@@ -899,6 +908,8 @@ static int meson_nfc_exec_op(struct nand_chip *nand,
int i;
meson_nfc_select_chip(nand, op->cs);
+
+ printk("Executing operation [%d instructions]:", op->ninstrs);
for (op_id = 0; op_id < op->ninstrs; op_id++) {
instr = &op->instrs[op_id];
delay_idle = DIV_ROUND_UP(PSEC_TO_NSEC(instr->delay_ns),
@@ -906,6 +917,7 @@ static int meson_nfc_exec_op(struct nand_chip *nand,
NFC_CLK_CYCLE);
switch (instr->type) {
case NAND_OP_CMD_INSTR:
+ printk(" ->CMD [0x%02x]", instr->ctx.cmd.opcode);
cmd = nfc->param.chip_select | NFC_CMD_CLE;
cmd |= instr->ctx.cmd.opcode & 0xff;
writel(cmd, nfc->reg_base + NFC_REG_CMD);
@@ -913,6 +925,7 @@ static int meson_nfc_exec_op(struct nand_chip *nand,
break;
case NAND_OP_ADDR_INSTR:
+ printk(" ->ADDR [%d cyc]", instr->ctx.addr.naddrs);
for (i = 0; i < instr->ctx.addr.naddrs; i++) {
cmd = nfc->param.chip_select | NFC_CMD_ALE;
cmd |= instr->ctx.addr.addrs[i] & 0xff;
@@ -922,6 +935,9 @@ static int meson_nfc_exec_op(struct nand_chip *nand,
break;
case NAND_OP_DATA_IN_INSTR:
+ printk(" ->DATA_IN [%d B%s]\n", instr->ctx.data.len,
+ instr->ctx.data.force_8bit ?
+ ", force 8-bit" : "");
buf = meson_nand_op_get_dma_safe_input_buf(instr);
if (!buf)
return -ENOMEM;
@@ -930,6 +946,9 @@ static int meson_nfc_exec_op(struct nand_chip *nand,
break;
case NAND_OP_DATA_OUT_INSTR:
+ printk(" ->DATA_OUT [%d B%s]", instr->ctx.data.len,
+ instr->ctx.data.force_8bit ?
+ ", force 8-bit" : "");
buf = meson_nand_op_get_dma_safe_output_buf(instr);
if (!buf)
return -ENOMEM;
@@ -938,6 +957,8 @@ static int meson_nfc_exec_op(struct nand_chip *nand,
break;
case NAND_OP_WAITRDY_INSTR:
+ printk(" ->WAITRDY [max %d ms]",
+ instr->ctx.waitrdy.timeout_ms);
meson_nfc_queue_rb(nfc, instr->ctx.waitrdy.timeout_ms);
if (instr->delay_ns)
meson_nfc_cmd_idle(nfc, delay_idle);
@@ -1191,6 +1212,8 @@ static int meson_nand_attach_chip(struct nand_chip *nand)
if (ret)
return -EINVAL;
+ mtd_set_ooblayout(mtd, &meson_ooblayout_ops);
+
nand->ecc.mode = NAND_ECC_HW;
nand->ecc.write_page_raw = meson_nfc_write_page_raw;
nand->ecc.write_page = meson_nfc_write_page_hwecc;
[-- Attachment #3: gxl.txt --]
[-- Type: text/plain, Size: 26417 bytes --]
[ 0.978447] loop: module loaded
[ 1.000143] Executing operation [2 instructions]:
[ 1.000147] ->CMD [0xff]
[ 1.000173] ->WAITRDY [max 250 ms]
[ 1.002334] Executing operation [3 instructions]:
[ 1.005953] ->CMD [0x90]
[ 1.010610] ->ADDR [1 cyc]
[ 1.013715] ->DATA_IN [2 B, force 8-bit]
[ 1.021079] 0x55 0xaa 0x5 0x80 0x38 0xb6 0xc4 0x74 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.029329] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.037692] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.046058] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.054424] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.062790] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.071156] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.079523] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.087889] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.096255] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 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xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.410896] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.419262] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.427629] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.435999] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.444366] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.452731] Executing operation [3 instructions]:
[ 1.452733] ->CMD [0xec]
[ 1.457386] ->ADDR [1 cyc]
[ 1.460490] ->WAITRDY [max 200000 ms]
[ 1.463691] Executing operation [1 instructions]:
[ 1.467563] ->DATA_IN [256 B, force 8-bit]
[ 1.476535] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.484899] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.493265] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.501631] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.509997] 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d 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.812390] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.820756] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.829122] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.837488] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.845854] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.854221] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.862587] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.870953] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.879353] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.887687] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 1.896067] Could not find a valid ONFI parameter page, trying bit-wise majority to recover it
[ 1.904626] ONFI parameter recovery failed, aborting
[ 1.909508] Executing operation [3 instructions]:
[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fd 0xfd 0xfd 0xfd
[ 2.016630] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.024996] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.033362] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.041728] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.050094] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.058464] Executing operation [3 instructions]:
[ 2.058465] ->CMD [0xec]
[ 2.063119] ->ADDR [1 cyc]
[ 2.066224] ->WAITRDY [max 200000 ms]
[ 2.069422] Executing operation [1 instructions]:
[ 2.073297] ->DATA_IN [512 B, force 8-bit]
[ 2.082268] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.090632] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.098998] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.107364] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.115731] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0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0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.426490] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.434856] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.443222] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.451588] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.459954] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.468321] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.476690] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.485053] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.493420] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.501813] Could not find valid JEDEC parameter page; aborting
[ 2.507654] Executing operation [3 instructions]:
[ 2.507656] ->CMD [0x90]
[ 2.512309] ->ADDR [1 cyc]
[ 2.515408] ->DATA_IN [5 B, force 8-bit]
[ 2.522766] 0x55 0xaa 0x1a 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 0xfd 0xfd 0xfd
[ 2.623053] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.631419] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.639786] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.648152] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.656522] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xde
[ 2.662816] nand: Hynix NAND 8GiB 3,3V 8-bit
[ 2.667043] nand: 8192 MiB, MLC, erase size: 4096 KiB, page size: 16384, OOB size: 1664
[ 2.674989] Executing operation [3 instructions]:
[ 2.674991] ->CMD [0x90]
[ 2.679635] ->ADDR [1 cyc]
[ 2.682733] ->DATA_IN [5 B, force 8-bit]
[ 2.690091] 0x55 0xaa 0x1a 0x80 0x0 0xa8 0x24 0x74 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.698352] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.706716] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.715082] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.723448] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0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[ 2.828501] ->WAITRDY [max 250 ms]
[ 2.831613] Executing operation [1 instructions]:
[ 2.835222] ->CMD [0x36]
[ 2.839887] Executing operation [2 instructions]:
[ 2.842984] ->ADDR [1 cyc]
[ 2.847649] ->DATA_OUT [1 B, force 8-bit]
[ 2.850855] Executing operation [1 instructions]:
[ 2.854983] ->CMD [0x16]
[ 2.859638] Executing operation [1 instructions]:
[ 2.862736] ->CMD [0x17]
[ 2.867401] Executing operation [1 instructions]:
[ 2.870505] ->CMD [0x04]
[ 2.875163] Executing operation [1 instructions]:
[ 2.878267] ->CMD [0x19]
[ 2.882927] Executing operation [5 instructions]:
[ 2.886030] ->CMD [0x00]
[ 2.890688] ->ADDR [5 cyc]
[ 2.893793] ->CMD [0x30]
[ 2.896998] ->WAITRDY [max 200000 ms]
[ 2.900096] ->DATA_IN [784 B]
[ 2.907176] 0x0 0x0 0x0 0x80 0x0 0x48 0x2c 0x74 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.915185] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.923549] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.931915] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.940281] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.948647] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.957013] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.965380] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.973746] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.982112] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.990482] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.998845] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.007211] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.015577] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.023943] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.032309] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.040677] Executing operation [2 instructions]:
[ 3.040678] ->CMD [0xff]
[ 3.045334] ->WAITRDY [max 250 ms]
[ 3.048446] Executing operation [1 instructions]:
[ 3.052062] ->CMD [0x36]
[ 3.056720] Executing operation [2 instructions]:
[ 3.059824] ->ADDR [1 cyc]
[ 3.064482] ->DATA_OUT [1 B, force 8-bit]
[ 3.067694] Executing operation [1 instructions]:
[ 3.071815] ->CMD [0x16]
[ 3.076471] Executing operation [4 instructions]:
[ 3.079575] ->CMD [0x00]
[ 3.084233] ->ADDR [5 cyc]
[ 3.087332] ->CMD [0x30]
[ 3.090529] ->WAITRDY [max 200000 ms]
[ 3.103876] Bad block table found at page 524032, version 0x01
[ 3.109667] Bad block table found at page 523776, version 0x01
[ 3.115456] nand_read_bbt: bad block at 0x0001f0400000
[ 3.119760] 5 fixed-partitions partitions found on MTD device d0074800.nfc
[ 3.125640] Creating 5 MTD partitions on "d0074800.nfc":
[ 3.130899] 0x000000000000-0x000000200000 : "boot"
[ 3.136618] 0x000000200000-0x000000600000 : "env"
[ 3.140305] mtd: partition "env" doesn't start on an erase/write block boundary -- force read-only
[ 3.150090] 0x000000600000-0x000001000000 : "system"
[ 3.154119] mtd: partition "system" doesn't start on an erase/write block boundary -- force read-only
[ 3.164193] 0x000001000000-0x000004000000 : "rootfs"
[ 3.169076] 0x000004000000-0x00000c000000 : "media"
[ 3.176404] libphy: Fixed MDIO Bus: probed
[ 3.177574] tun: Universal TUN/TAP device driver, 1.6
[ 3.183262] thunder_xcv, ver 1.0
[ 3.185307] thunder_bgx, ver 1.0
[ 3.188466] nicpf, ver 1.0
[ 3.191862] hclge is initializing
[ 3.194370] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 3.201546] hns3: Copyright (c) 2017 Huawei Corporation.
[ 3.206860] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 3.212577] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 3.218482] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[ 3.225342] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 3.230907] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 3.238623] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 3.245070] sky2: driver version 1.30
[ 3.249140] VFIO - User Level meta-driver version: 0.3
[ 3.255206] dwc3 c9000000.dwc3: Failed to get clk 'ref': -2
[ 3.261085] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.265199] ehci-pci: EHCI PCI platform driver
[ 3.269643] ehci-platform: EHCI generic platform driver
[-- Attachment #4: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-03-27 8:53 ` Liang Yang
@ 2019-03-28 18:03 ` Martin Blumenstingl
2019-03-29 7:44 ` Liang Yang
0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-03-28 18:03 UTC (permalink / raw)
To: Liang Yang
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 6400 bytes --]
Hi Liang,
On Wed, Mar 27, 2019 at 9:52 AM Liang Yang <liang.yang@amlogic.com> wrote:
>
> Hi Martin,
>
> Thanks a lot.
> On 2019/3/26 2:31, Martin Blumenstingl wrote:
> > Hi Liang,
> >
> > On Mon, Mar 25, 2019 at 11:03 AM Liang Yang <liang.yang@amlogic.com> wrote:
> >>
> >> Hi Martin,
> >>
> >> On 2019/3/23 5:07, Martin Blumenstingl wrote:
> >>> Hi Matthew,
> >>>
> >>> On Thu, Mar 21, 2019 at 10:44 PM Matthew Wilcox <willy@infradead.org> wrote:
> >>>>
> >>>> On Thu, Mar 21, 2019 at 09:17:34PM +0100, Martin Blumenstingl wrote:
> >>>>> Hello,
> >>>>>
> >>>>> I am experiencing the following crash:
> >>>>> ------------[ cut here ]------------
> >>>>> kernel BUG at mm/slub.c:3950!
> >>>>
> >>>> if (unlikely(!PageSlab(page))) {
> >>>> BUG_ON(!PageCompound(page));
> >>>>
> >>>> You called kfree() on the address of a page which wasn't allocated by slab.
> >>>>
> >>>>> I have traced this crash to the kfree() in meson_nfc_read_buf().
> >>>>> my observation is as follows:
> >>>>> - meson_nfc_read_buf() is called 7 times without any crash, the
> >>>>> kzalloc() call returns 0xe9e6c600 (virtual address) / 0x29e6c600
> >>>>> (physical address)
> >>>>> - the eight time meson_nfc_read_buf() is called kzalloc() call returns
> >>>>> 0xee39a38b (virtual address) / 0x2e39a38b (physical address) and the
> >>>>> final kfree() crashes
> >>>>> - changing the size in the kzalloc() call from PER_INFO_BYTE (= 8) to
> >>>>> PAGE_SIZE works around that crash
> >>>>
> >>>> I suspect you're doing something which corrupts memory. Overrunning
> >>>> the end of your allocation or something similar. Have you tried KASAN
> >>>> or even the various slab debugging (eg redzones)?
> >>> KASAN is not available on 32-bit ARM. there was some progress last
> >>> year [0] but it didn't make it into mainline. I tried to make the
> >>> patches apply again and got it to compile (and my kernel is still
> >>> booting) but I have no idea if it's still working. for anyone
> >>> interested, my patches are here: [1] (I consider this a HACK because I
> >>> don't know anything about the code which is being touched in the
> >>> patches, I only made it compile)
> >>>
> >>> SLAB debugging (redzones) were a great hint, thank you very much for
> >>> that Matthew! I enabled:
> >>> CONFIG_SLUB_DEBUG=y
> >>> CONFIG_SLUB_DEBUG_ON=y
> >>> and with that I now get "BUG kmalloc-64 (Not tainted): Redzone
> >>> overwritten" (a larger kernel log extract is attached).
> >>>
> >>> I'm starting to wonder if the NAND controller (hardware) writes more
> >>> than 8 bytes.
> >>> some context: the "info" buffer allocated in meson_nfc_read_buf is
> >>> then passed to the NAND controller IP (after using dma_map_single).
> >>>
> >>> Liang, how does the NAND controller know that it only has to send
> >>> PER_INFO_BYTE (= 8) bytes when called from meson_nfc_read_buf? all
> >>> other callers of meson_nfc_dma_buffer_setup (which passes the info
> >>> buffer to the hardware) are using (nand->ecc.steps * PER_INFO_BYTE)
> >>> bytes?
> >>>
> >> NFC_CMD_N2M and CMDRWGEN are different commands. CMDRWGEN needs to set
> >> the ecc page size (1KB or 512B) and Pages(2, 4, 8, ...), so
> >> PER_INFO_BYTE(= 8) bytes for each ecc page.
> >> I have never used NFC_CMD_N2M to transfer data before, because it is
> >> very low efficient. And I do a experiment with the attachment and find
> >> on overwritten on my meson axg platform.
> >>
> >> Martin, I would appreciate it very much if you would try the attachment
> >> on your meson m8b platform.
> > thank you for your debug patch! on my board 2 * PER_INFO_BYTE is not enough.
> > I took the idea from your patch and adapted it so I could print a
> > buffer with 256 bytes (which seems to be "big enough" for my board).
> it only needs PER_INFO_BYTE (= 8) bytes, because NFC_CMD_N2M don't set
> *Pages*, that is not like CMDRWGEN which needs Pages*PER_INFO_BYTE (= 8)
> bytes when setting *Pages* parameter. I have been thinking that
> NFC_CMD_N2M only occupis PER_INFO_BYTE (= 8) bytes. And i have tried to
> not set the info address, the machine would crash.
thank you for the explanation. the command is built using:
cmd = NFC_CMD_N2M | (len & GENMASK(5, 0));
> > see the attached, modified patch
> >
> > in the output I see that sometimes the first 32 bytes are not touched
> > by the controller, but everything beyond 32 bytes is modified in the
> > info buffer.
> >
> it really makes sense that the controller sometimes fills the space
> beyond the first 8 bytes. However i expect the controller should only
> take the first 8 bytes when using NFC_CMD_N2M.
in my tests (see the attached log output) it seems that the info
buffer size has the following constraints:
- use the "len" which is passed to meson_nfc_read_buf
- if "len" is smaller than PER_INFO_BYTE then use PER_INFO_BYTE (= 8)
> > I also tried to increase the buffer size to 512, but that didn't make
> > a difference (I never saw any info buffer modification beyond 256
> > bytes).
> >
> > also I just noticed that I didn't give you much details on my NAND chip yet.
> > from Amlogic vendor u-boot on Meson8m2 (all my Meson8b boards have
> > eMMC flash, but I believe the NAND controller on Meson8 to GXBB is
> > identical):
> > m8m2_n200_v1#amlnf chipinfo
> > flash info
> > name:B revision 20nm NAND 8GiB H27UCG8T2B, id:ad de 94 eb 74 44 0 0
> > pagesize:0x4000, blocksize:0x400000, oobsize:0x500, chipsize:0x2000,
> > option:0x8, T_REA:16, T_RHOH:15
> > hw controller info
> > chip_num:1, onfi_mode:0, page_shift:14, block_shift:22, option:0xc2
> > ecc_unit:1024, ecc_bytes:70, ecc_steps:16, ecc_max:40
> > bch_mode:5, user_mode:2, oobavail:32, oobtail:64384
> >
> I don't think it is caused by a different NAND type, but i have followed
> the some test on my GXL platform. we can see the result from the
> attachment. By the way, i don't find any information about this on meson
> NFC datasheet, so i will ask our VLSI.
> Martin, May you reproduce it with the new patch on meson8b platform ? I
> need a more clear and easier compared log like gxl.txt. Thanks.
your gxl.txt is great, finally I can also compare my own results with
something that works for you!
in my results (see attachment) the "DATA_IN [256 B, force 8-bit]"
instructions result in a different info buffer output.
does this make any sense to you?
Regards
Martin
[-- Attachment #2: nand-debug-output-operations-and-info-buffer.txt --]
[-- Type: text/plain, Size: 15800 bytes --]
[ 2.726921] Executing operation [2 instructions]:
[ 2.726924] ->CMD [0xff]
[ 2.726950] ->WAITRDY [max 250 ms]
[ 2.729131] Executing operation [3 instructions]:
[ 2.732748] ->CMD [0x90]
[ 2.737480] ->ADDR [1 cyc]
[ 2.740550] ->DATA_IN [2 B, force 8-bit]
[ 2.747963] 0x0 0x0 0x5 0x80 0x0 0x28 0x45 0x29 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.755978] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.764431] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.772805] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.781211] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 2.789617] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0x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xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.105308] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.113722] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.122132] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.130539] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.138948] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.147356] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.155757] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.164172] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.172579] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.181048] Executing operation [3 instructions]:
[ 3.181050] ->CMD [0xec]
[ 3.185663] ->ADDR [1 cyc]
[ 3.188793] ->WAITRDY [max 200000 ms]
[ 3.192013] Executing operation [1 instructions]:
[ 3.195893] ->DATA_IN [256 B, force 8-bit]
[ 3.204923] 0xfd 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3.601326] 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b
[ 3.609720] 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b
[ 3.618129] 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0x6b 0xa5
[ 3.626560] Could not find a valid ONFI parameter page, trying bit-wise majority to recover it
[ 3.635155] ONFI parameter recovery failed, aborting
[ 3.640073] Executing operation [3 instructions]:
[ 3.640075] ->CMD [0x90]
[ 3.644733] ->ADDR [1 cyc]
[ 3.647863] ->DATA_IN [5 B, force 8-bit]
[ 3.655269] 0x0 0x0 0x10 0x80 0x0 0x3d 0x5e 0x29 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.663381] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.671784] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.680193] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.688601] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.697009] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.705410] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xf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fd 0xfd
[ 3.913800] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.922210] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.930616] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.939053] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xde
[ 3.945348] nand: Hynix NAND 8GiB 3,3V 8-bit
[ 3.949604] nand: 8192 MiB, MLC, erase size: 4096 KiB, page size: 16384, OOB size: 1280
[ 3.957611] Executing operation [3 instructions]:
[ 3.957613] ->CMD [0x90]
[ 3.962251] ->ADDR [1 cyc]
[ 3.965372] ->DATA_IN [5 B, force 8-bit]
[ 3.972787] 0x0 0x0 0x10 0x80 0x0 0x24 0x5e 0x29 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.980899] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.989302] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 3.997711] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.006111] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.014539] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.022950] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.031343] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.039752] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.048159] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.056567] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.064968] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.073382] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.081792] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.090199] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[ 4.098608] 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd 0xfd
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-03-28 18:03 ` Martin Blumenstingl
@ 2019-03-29 7:44 ` Liang Yang
2019-04-05 4:30 ` Martin Blumenstingl
0 siblings, 1 reply; 13+ messages in thread
From: Liang Yang @ 2019-03-29 7:44 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
Hi Martin,
On 2019/3/29 2:03, Martin Blumenstingl wrote:
> Hi Liang,
[......]
>> I don't think it is caused by a different NAND type, but i have followed
>> the some test on my GXL platform. we can see the result from the
>> attachment. By the way, i don't find any information about this on meson
>> NFC datasheet, so i will ask our VLSI.
>> Martin, May you reproduce it with the new patch on meson8b platform ? I
>> need a more clear and easier compared log like gxl.txt. Thanks.
> your gxl.txt is great, finally I can also compare my own results with
> something that works for you!
> in my results (see attachment) the "DATA_IN [256 B, force 8-bit]"
> instructions result in a different info buffer output.
> does this make any sense to you?
>
I have asked our VLSI designer for explanation or simulation result by
an e-mail. Thanks.
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-03-29 7:44 ` Liang Yang
@ 2019-04-05 4:30 ` Martin Blumenstingl
2019-04-10 11:08 ` Liang Yang
0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-04-05 4:30 UTC (permalink / raw)
To: Liang Yang
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
Hi Liang,
On Fri, Mar 29, 2019 at 8:44 AM Liang Yang <liang.yang@amlogic.com> wrote:
>
> Hi Martin,
>
> On 2019/3/29 2:03, Martin Blumenstingl wrote:
> > Hi Liang,
> [......]
> >> I don't think it is caused by a different NAND type, but i have followed
> >> the some test on my GXL platform. we can see the result from the
> >> attachment. By the way, i don't find any information about this on meson
> >> NFC datasheet, so i will ask our VLSI.
> >> Martin, May you reproduce it with the new patch on meson8b platform ? I
> >> need a more clear and easier compared log like gxl.txt. Thanks.
> > your gxl.txt is great, finally I can also compare my own results with
> > something that works for you!
> > in my results (see attachment) the "DATA_IN [256 B, force 8-bit]"
> > instructions result in a different info buffer output.
> > does this make any sense to you?
> >
> I have asked our VLSI designer for explanation or simulation result by
> an e-mail. Thanks.
do you have any update on this?
Martin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-04-05 4:30 ` Martin Blumenstingl
@ 2019-04-10 11:08 ` Liang Yang
2019-04-10 17:54 ` Martin Blumenstingl
0 siblings, 1 reply; 13+ messages in thread
From: Liang Yang @ 2019-04-10 11:08 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
Hi Martin,
On 2019/4/5 12:30, Martin Blumenstingl wrote:
> Hi Liang,
>
> On Fri, Mar 29, 2019 at 8:44 AM Liang Yang <liang.yang@amlogic.com> wrote:
>>
>> Hi Martin,
>>
>> On 2019/3/29 2:03, Martin Blumenstingl wrote:
>>> Hi Liang,
>> [......]
>>>> I don't think it is caused by a different NAND type, but i have followed
>>>> the some test on my GXL platform. we can see the result from the
>>>> attachment. By the way, i don't find any information about this on meson
>>>> NFC datasheet, so i will ask our VLSI.
>>>> Martin, May you reproduce it with the new patch on meson8b platform ? I
>>>> need a more clear and easier compared log like gxl.txt. Thanks.
>>> your gxl.txt is great, finally I can also compare my own results with
>>> something that works for you!
>>> in my results (see attachment) the "DATA_IN [256 B, force 8-bit]"
>>> instructions result in a different info buffer output.
>>> does this make any sense to you?
>>>
>> I have asked our VLSI designer for explanation or simulation result by
>> an e-mail. Thanks.
> do you have any update on this?
> Sorry. I haven't got reply from VLSI designer yet. We tried to improve
priority yesterday, but i still can't estimate the time. There is no
document or change list showing the difference between m8/b and gxl/axg
serial chips. Now it seems that we can't use command NFC_CMD_N2M on nand
initialization for m8/b chips and use *read byte from NFC fifo register*
instead.
>
> Martin
>
> .
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-04-10 11:08 ` Liang Yang
@ 2019-04-10 17:54 ` Martin Blumenstingl
2019-04-11 3:00 ` Liang Yang
0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-04-10 17:54 UTC (permalink / raw)
To: Liang Yang
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
Hi Liang,
On Wed, Apr 10, 2019 at 1:08 PM Liang Yang <liang.yang@amlogic.com> wrote:
>
> Hi Martin,
>
> On 2019/4/5 12:30, Martin Blumenstingl wrote:
> > Hi Liang,
> >
> > On Fri, Mar 29, 2019 at 8:44 AM Liang Yang <liang.yang@amlogic.com> wrote:
> >>
> >> Hi Martin,
> >>
> >> On 2019/3/29 2:03, Martin Blumenstingl wrote:
> >>> Hi Liang,
> >> [......]
> >>>> I don't think it is caused by a different NAND type, but i have followed
> >>>> the some test on my GXL platform. we can see the result from the
> >>>> attachment. By the way, i don't find any information about this on meson
> >>>> NFC datasheet, so i will ask our VLSI.
> >>>> Martin, May you reproduce it with the new patch on meson8b platform ? I
> >>>> need a more clear and easier compared log like gxl.txt. Thanks.
> >>> your gxl.txt is great, finally I can also compare my own results with
> >>> something that works for you!
> >>> in my results (see attachment) the "DATA_IN [256 B, force 8-bit]"
> >>> instructions result in a different info buffer output.
> >>> does this make any sense to you?
> >>>
> >> I have asked our VLSI designer for explanation or simulation result by
> >> an e-mail. Thanks.
> > do you have any update on this?
> Sorry. I haven't got reply from VLSI designer yet. We tried to improve
> priority yesterday, but i still can't estimate the time. There is no
> document or change list showing the difference between m8/b and gxl/axg
> serial chips. Now it seems that we can't use command NFC_CMD_N2M on nand
> initialization for m8/b chips and use *read byte from NFC fifo register*
> instead.
thank you for the status update!
I am trying to understand your suggestion not to use NFC_CMD_N2M:
the documentation (public S922X datasheet from Hardkernel: [0]) states
that P_NAND_BUF (NFC_REG_BUF in the meson_nand driver) can hold up to
four bytes of data. is this the "read byte from NFC FIFO register" you
mentioned?
Before I spend time changing the code to use the FIFO register I would
like to wait for an answer from your VLSI designer.
Setting the "correct" info buffer length for NFC_CMD_N2M on the 32-bit
SoCs seems like an easier solution compared to switching to the FIFO
register. Keeping NFC_CMD_N2M on the 32-bit SoCs also allows us to
have only one code-path for 32 and 64 bit SoCs, meaning we don't have
to maintain two separate code-paths for basically the same
functionality (assuming that NFC_CMD_N2M is not completely broken on
the 32-bit SoCs, we just don't know how to use it yet).
Regards
Martin
[0] https://dn.odroid.com/S922X/ODROID-N2/Datasheet/S922X_Public_Datasheet_V0.2.pdf
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-04-10 17:54 ` Martin Blumenstingl
@ 2019-04-11 3:00 ` Liang Yang
2019-06-08 20:00 ` Martin Blumenstingl
0 siblings, 1 reply; 13+ messages in thread
From: Liang Yang @ 2019-04-11 3:00 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
Hi Martin,
On 2019/4/11 1:54, Martin Blumenstingl wrote:
> Hi Liang,
>
> On Wed, Apr 10, 2019 at 1:08 PM Liang Yang <liang.yang@amlogic.com> wrote:
>>
>> Hi Martin,
>>
>> On 2019/4/5 12:30, Martin Blumenstingl wrote:
>>> Hi Liang,
>>>
>>> On Fri, Mar 29, 2019 at 8:44 AM Liang Yang <liang.yang@amlogic.com> wrote:
>>>>
>>>> Hi Martin,
>>>>
>>>> On 2019/3/29 2:03, Martin Blumenstingl wrote:
>>>>> Hi Liang,
>>>> [......]
>>>>>> I don't think it is caused by a different NAND type, but i have followed
>>>>>> the some test on my GXL platform. we can see the result from the
>>>>>> attachment. By the way, i don't find any information about this on meson
>>>>>> NFC datasheet, so i will ask our VLSI.
>>>>>> Martin, May you reproduce it with the new patch on meson8b platform ? I
>>>>>> need a more clear and easier compared log like gxl.txt. Thanks.
>>>>> your gxl.txt is great, finally I can also compare my own results with
>>>>> something that works for you!
>>>>> in my results (see attachment) the "DATA_IN [256 B, force 8-bit]"
>>>>> instructions result in a different info buffer output.
>>>>> does this make any sense to you?
>>>>>
>>>> I have asked our VLSI designer for explanation or simulation result by
>>>> an e-mail. Thanks.
>>> do you have any update on this?
>> Sorry. I haven't got reply from VLSI designer yet. We tried to improve
>> priority yesterday, but i still can't estimate the time. There is no
>> document or change list showing the difference between m8/b and gxl/axg
>> serial chips. Now it seems that we can't use command NFC_CMD_N2M on nand
>> initialization for m8/b chips and use *read byte from NFC fifo register*
>> instead.
> thank you for the status update!
>
> I am trying to understand your suggestion not to use NFC_CMD_N2M:
> the documentation (public S922X datasheet from Hardkernel: [0]) states
> that P_NAND_BUF (NFC_REG_BUF in the meson_nand driver) can hold up to
> four bytes of data. is this the "read byte from NFC FIFO register" you
> mentioned?
>
You are right.take the early meson NFC driver V2 on previous mail as a
reference.
> Before I spend time changing the code to use the FIFO register I would
> like to wait for an answer from your VLSI designer.
> Setting the "correct" info buffer length for NFC_CMD_N2M on the 32-bit
> SoCs seems like an easier solution compared to switching to the FIFO
> register. Keeping NFC_CMD_N2M on the 32-bit SoCs also allows us to
> have only one code-path for 32 and 64 bit SoCs, meaning we don't have
> to maintain two separate code-paths for basically the same
> functionality (assuming that NFC_CMD_N2M is not completely broken on
> the 32-bit SoCs, we just don't know how to use it yet).
>
All right. I am also waiting for the answer.
>
> Regards
> Martin
>
>
> [0] https://dn.odroid.com/S922X/ODROID-N2/Datasheet/S922X_Public_Datasheet_V0.2.pdf
>
> .
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 32-bit Amlogic (ARM) SoC: kernel BUG in kfree()
2019-04-11 3:00 ` Liang Yang
@ 2019-06-08 20:00 ` Martin Blumenstingl
0 siblings, 0 replies; 13+ messages in thread
From: Martin Blumenstingl @ 2019-06-08 20:00 UTC (permalink / raw)
To: Liang Yang
Cc: mhocko, linux-kernel, linux, Matthew Wilcox, rppt, linux-mm,
linux-mtd, linux-amlogic, akpm, linux-arm-kernel
Hi Liang,
On Thu, Apr 11, 2019 at 5:00 AM Liang Yang <liang.yang@amlogic.com> wrote:
>
> Hi Martin,
> On 2019/4/11 1:54, Martin Blumenstingl wrote:
> > Hi Liang,
> >
> > On Wed, Apr 10, 2019 at 1:08 PM Liang Yang <liang.yang@amlogic.com> wrote:
> >>
> >> Hi Martin,
> >>
> >> On 2019/4/5 12:30, Martin Blumenstingl wrote:
> >>> Hi Liang,
> >>>
> >>> On Fri, Mar 29, 2019 at 8:44 AM Liang Yang <liang.yang@amlogic.com> wrote:
> >>>>
> >>>> Hi Martin,
> >>>>
> >>>> On 2019/3/29 2:03, Martin Blumenstingl wrote:
> >>>>> Hi Liang,
> >>>> [......]
> >>>>>> I don't think it is caused by a different NAND type, but i have followed
> >>>>>> the some test on my GXL platform. we can see the result from the
> >>>>>> attachment. By the way, i don't find any information about this on meson
> >>>>>> NFC datasheet, so i will ask our VLSI.
> >>>>>> Martin, May you reproduce it with the new patch on meson8b platform ? I
> >>>>>> need a more clear and easier compared log like gxl.txt. Thanks.
> >>>>> your gxl.txt is great, finally I can also compare my own results with
> >>>>> something that works for you!
> >>>>> in my results (see attachment) the "DATA_IN [256 B, force 8-bit]"
> >>>>> instructions result in a different info buffer output.
> >>>>> does this make any sense to you?
> >>>>>
> >>>> I have asked our VLSI designer for explanation or simulation result by
> >>>> an e-mail. Thanks.
> >>> do you have any update on this?
> >> Sorry. I haven't got reply from VLSI designer yet. We tried to improve
> >> priority yesterday, but i still can't estimate the time. There is no
> >> document or change list showing the difference between m8/b and gxl/axg
> >> serial chips. Now it seems that we can't use command NFC_CMD_N2M on nand
> >> initialization for m8/b chips and use *read byte from NFC fifo register*
> >> instead.
> > thank you for the status update!
> >
> > I am trying to understand your suggestion not to use NFC_CMD_N2M:
> > the documentation (public S922X datasheet from Hardkernel: [0]) states
> > that P_NAND_BUF (NFC_REG_BUF in the meson_nand driver) can hold up to
> > four bytes of data. is this the "read byte from NFC FIFO register" you
> > mentioned?
> >
> You are right.take the early meson NFC driver V2 on previous mail as a
> reference.
>
> > Before I spend time changing the code to use the FIFO register I would
> > like to wait for an answer from your VLSI designer.
> > Setting the "correct" info buffer length for NFC_CMD_N2M on the 32-bit
> > SoCs seems like an easier solution compared to switching to the FIFO
> > register. Keeping NFC_CMD_N2M on the 32-bit SoCs also allows us to
> > have only one code-path for 32 and 64 bit SoCs, meaning we don't have
> > to maintain two separate code-paths for basically the same
> > functionality (assuming that NFC_CMD_N2M is not completely broken on
> > the 32-bit SoCs, we just don't know how to use it yet).
> >
> All right. I am also waiting for the answer.
do you have any update on this?
Martin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-06-08 20:01 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 20:17 32-bit Amlogic (ARM) SoC: kernel BUG in kfree() Martin Blumenstingl
2019-03-21 21:44 ` Matthew Wilcox
2019-03-22 21:07 ` Martin Blumenstingl
2019-03-25 10:04 ` Liang Yang
2019-03-25 18:31 ` Martin Blumenstingl
2019-03-27 8:53 ` Liang Yang
2019-03-28 18:03 ` Martin Blumenstingl
2019-03-29 7:44 ` Liang Yang
2019-04-05 4:30 ` Martin Blumenstingl
2019-04-10 11:08 ` Liang Yang
2019-04-10 17:54 ` Martin Blumenstingl
2019-04-11 3:00 ` Liang Yang
2019-06-08 20:00 ` Martin Blumenstingl
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).