mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Renaud Barbier <Renaud.Barbier@ametek.com>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: tlsf failure
Date: Mon, 29 Apr 2024 20:08:01 +0200	[thread overview]
Message-ID: <cb35b168-70ec-4d83-8db4-829211a6a767@pengutronix.de> (raw)
In-Reply-To: <BYAPR07MB6837F4F0FE5C6F7569DE3E59EC1B2@BYAPR07MB6837.namprd07.prod.outlook.com>

Hello Renaud,

On 29.04.24 18:40, Renaud Barbier wrote:
> We have a prototype board with a LS1026A processor (LS1046A). The system has a primary SPI NOR and recovery SPI NOR.
> From the recovery, I attempt to program the primary NOR.
> 
> 
> I have the following error while calling our command below. This command switch NOR selection and calls barebox_update through run_command
> 
> OWBOOT> / oft recovery openware-core-prometheus-ls1046a-20240412112207-OWC-2022-09.0-prometheus-6.8.0-EA1-0_nor.img
> Programming primary NOR device
> oft_storage_program: cmd = barebox_update -t nor openware-core-prometheus-ls1046a-20240412112207-OWC-2022-09.0-prometheus-6.8.0-EA1-0_nor.img
> DEBUG: block_size smaller than size : 0, 32
> block_size(block) >= sizecommon/tlsf.c 598
> Call trace:
> [<fbd7db68>] (unwind_backtrace+0x0/0x88) from [<fbd0944c>] (block_locate_free+0x144/0x158)
> [<fbd0944c>] (block_locate_free+0x144/0x158) from [<fbd09738>] (tlsf_malloc+0x2c/0x44)
> [<fbd09738>] (tlsf_malloc+0x2c/0x44) from [<fbd08b0c>] (malloc+0x20/0x3c)
> [<fbd08b0c>] (malloc+0x20/0x3c) from [<fbd517cc>] (xmalloc+0x14/0x2c)
> [<fbd517cc>] (xmalloc+0x14/0x2c) from [<fbd51824>] (xzalloc+0x14/0x34)
> [<fbd51824>] (xzalloc+0x14/0x34) from [<fbd0bcdc>] (initialize_context+0x20/0x48)
> [<fbd0bcdc>] (initialize_context+0x20/0x48) from [<fbd0d204>] (run_command+0x30/0x4c)
> [<fbd0d204>] (run_command+0x30/0x4c) from [<fbd78158>] (oft_storage_program+0x70/0xa4)
> [<fbd78158>] (oft_storage_program+0x70/0xa4) from [<fbd78270>] (do_oft_recovery+0xe4/0x154)
> 
> If I call Barebox_update directly, there is no  problem.:
> OWBOOT> / barebox_update -t nor openware-core-prometheus-ls1046a-20240412112207-OWC-2022-09.0-prometheus-6.8.0-EA1-0_nor.img
> Image Metadata:
>   build: #1 Fri Apr 12 11:21:46 UTC 2024
>   buildsystem version:
>   release: 2022.03.0-g06e02c3d98.prometh-00008-g06e02c3d98ea
>   of_compatible: fsl,ls1046a owc,SWE550S owc,SWE450S
>   model: owc-swe550s
> bbu: Devicetree compatible "fsl,ls1046a" matches current machine
> update barebox from openware-core-prometheus-ls1046a-20240412112207-OWC-2022-09.0-prometheus-6.8.0-EA1-0_nor.img using handler nor to /dev/m25p0 (y/n)?
> 
> 
> The image being burned is 64MIB. We have also a NAND image 2.5 bigger and this error do not appear when calling our wrapper command.
> 
> Any clue why this would happen?

This looks like memory corruption. Could it be that your command is
overflowing some buffer? Enabling CONFIG_KASAN may aid in debugging this.

Cheers,
Ahmad


> 
> Cheers,
> Renaud
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




      reply	other threads:[~2024-04-29 18:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 16:40 Renaud Barbier
2024-04-29 18:08 ` Ahmad Fatoum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb35b168-70ec-4d83-8db4-829211a6a767@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=Renaud.Barbier@ametek.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox