[PATCH v3 0/5] hw/arm/aspeed_ast2700-fc: Fix null pointer dereference

Steven Lee via posted 5 patches 5 months, 3 weeks ago
Failed in applying to current master (apply log)
There is a newer version of this series
docs/system/arm/aspeed.rst |  2 +-
hw/arm/aspeed_ast27x0-fc.c | 10 +++++++++-
hw/arm/aspeed_ast27x0.c    |  4 ++--
hw/arm/fby35.c             |  1 +
4 files changed, 13 insertions(+), 4 deletions(-)
[PATCH v3 0/5] hw/arm/aspeed_ast2700-fc: Fix null pointer dereference
Posted by Steven Lee via 5 months, 3 weeks ago
Clang's sanitizer reports a runtime error when booting with
'-net nic -net user', due to a null pointer being passed
to memory_region_find(), which subsequently triggers a crash in
flatview_lookup().

Root cause:
- Missing NIC configuration in the CA35 initialization.

Fix:
- Reduce ca35 ram size from 2GiB to 1GiB to align with ast2700a1-evb,
  where the ram-container is defined as 1GiB in its class.
- Add nic configuration in ast2700fc's ca35 init function.


v2:
- Split the CA35 memory mapping into a separate patch.
- Added a new patch to fix BMC memory mapping in the fby35 machine,
  which had a similar issue (unmapped system_memory).
- Removed Change-Id tag from commit messages

v3:
- Fixed issue with incorrectly inheriting TYPE_ASPEED_MACHINE.
- Rewrote the commit message for "Map BMC memory into system memory".
- Added more details to the commit message for "Fix unimplemented region
  overlap with VBootROM".

Steven Lee (5):
  hw/arm/aspeed_ast2700-fc: Fix null pointer dereference in ca35 init
  hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom
  hw/arm/aspeed_ast27x0-fc: Map ca35 memory into system memory
  hw/arm/fby35: Map BMC memory into system memory
  docs: Remove ast2700fc from Aspeed family boards

 docs/system/arm/aspeed.rst |  2 +-
 hw/arm/aspeed_ast27x0-fc.c | 10 +++++++++-
 hw/arm/aspeed_ast27x0.c    |  4 ++--
 hw/arm/fby35.c             |  1 +
 4 files changed, 13 insertions(+), 4 deletions(-)

-- 
2.43.0
Re: [PATCH v3 0/5] hw/arm/aspeed_ast2700-fc: Fix null pointer dereference
Posted by Cédric Le Goater 5 months, 3 weeks ago
On 5/22/25 05:36, Steven Lee wrote:
> Clang's sanitizer reports a runtime error when booting with
> '-net nic -net user', due to a null pointer being passed
> to memory_region_find(), which subsequently triggers a crash in
> flatview_lookup().
> 
> Root cause:
> - Missing NIC configuration in the CA35 initialization.
> 
> Fix:
> - Reduce ca35 ram size from 2GiB to 1GiB to align with ast2700a1-evb,
>    where the ram-container is defined as 1GiB in its class.
> - Add nic configuration in ast2700fc's ca35 init function.
> 
> 
> v2:
> - Split the CA35 memory mapping into a separate patch.
> - Added a new patch to fix BMC memory mapping in the fby35 machine,
>    which had a similar issue (unmapped system_memory).
> - Removed Change-Id tag from commit messages
> 
> v3:
> - Fixed issue with incorrectly inheriting TYPE_ASPEED_MACHINE.
> - Rewrote the commit message for "Map BMC memory into system memory".
> - Added more details to the commit message for "Fix unimplemented region
>    overlap with VBootROM".
> 
> Steven Lee (5):
>    hw/arm/aspeed_ast2700-fc: Fix null pointer dereference in ca35 init
>    hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom
>    hw/arm/aspeed_ast27x0-fc: Map ca35 memory into system memory
>    hw/arm/fby35: Map BMC memory into system memory
>    docs: Remove ast2700fc from Aspeed family boards
> 
>   docs/system/arm/aspeed.rst |  2 +-
>   hw/arm/aspeed_ast27x0-fc.c | 10 +++++++++-
>   hw/arm/aspeed_ast27x0.c    |  4 ++--
>   hw/arm/fby35.c             |  1 +
>   4 files changed, 13 insertions(+), 4 deletions(-)
> 

Steven,

please resend. the number of patches is confusing the b4 tool. It's easier
for me too.

Thanks,

C.