ed5d9774c6
address_space_map() can fail: uart:~$ hash test sha256_test tv[0]: Segmentation fault: 11 Thread 3 "qemu-system-arm" received signal SIGSEGV, Segmentation fault. gen_acc_mode_iov (req_len=0x7ffff18b7778, id=<optimized out>, iov=0x7ffff18b7780, s=0x555556ce0bd0) at ../hw/misc/aspeed_hace.c:171 171 if (has_padding(s, &iov[id], *req_len, &total_msg_len, &pad_offset)) { (gdb) bt #0 gen_acc_mode_iov (req_len=0x7ffff18b7778, id=<optimized out>, iov=0x7ffff18b7780, s=0x555556ce0bd0) at ../hw/misc/aspeed_hace.c:171 #1 do_hash_operation (s=s@entry=0x555556ce0bd0, algo=3, sg_mode=sg_mode@entry=true, acc_mode=acc_mode@entry=true) at ../hw/misc/aspeed_hace.c:224 #2 0x00005555559bdbb8 in aspeed_hace_write (opaque=<optimized out>, addr=12, data=262488, size=<optimized out>) at ../hw/misc/aspeed_hace.c:358 This change doesn't fix much, but at least the guest can't crash QEMU anymore. Instead it is still usable: uart:~$ hash test sha256_test tv[0]:hash_final error sha384_test tv[0]:hash_final error sha512_test tv[0]:hash_final error [00:00:06.278,000] <err> hace_global: HACE poll timeout [00:00:09.324,000] <err> hace_global: HACE poll timeout [00:00:12.261,000] <err> hace_global: HACE poll timeout uart:~$ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Delevoryas <peter@pjd.dev> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> |
||
---|---|---|
.. | ||
macio | ||
a9scu.c | ||
allwinner-a10-ccm.c | ||
allwinner-a10-dramc.c | ||
allwinner-cpucfg.c | ||
allwinner-h3-ccu.c | ||
allwinner-h3-dramc.c | ||
allwinner-h3-sysctrl.c | ||
allwinner-sid.c | ||
applesmc.c | ||
arm11scu.c | ||
arm_integrator_debug.c | ||
arm_l2x0.c | ||
arm_sysctl.c | ||
armsse-cpu-pwrctrl.c | ||
armsse-cpuid.c | ||
armsse-mhu.c | ||
armv7m_ras.c | ||
aspeed_hace.c | ||
aspeed_i3c.c | ||
aspeed_lpc.c | ||
aspeed_peci.c | ||
aspeed_sbc.c | ||
aspeed_scu.c | ||
aspeed_sdmc.c | ||
aspeed_xdma.c | ||
auxbus.c | ||
avr_power.c | ||
axp209.c | ||
bcm2835_cprman.c | ||
bcm2835_mbox.c | ||
bcm2835_mphi.c | ||
bcm2835_powermgt.c | ||
bcm2835_property.c | ||
bcm2835_rng.c | ||
bcm2835_thermal.c | ||
cbus.c | ||
debugexit.c | ||
eccmemctl.c | ||
edu.c | ||
empty_slot.c | ||
exynos4210_clk.c | ||
exynos4210_pmu.c | ||
exynos4210_rng.c | ||
grlib_ahb_apb_pnp.c | ||
imx6_ccm.c | ||
imx6_src.c | ||
imx6ul_ccm.c | ||
imx7_ccm.c | ||
imx7_gpr.c | ||
imx7_snvs.c | ||
imx25_ccm.c | ||
imx31_ccm.c | ||
imx_ccm.c | ||
imx_rngc.c | ||
iotkit-secctl.c | ||
iotkit-sysctl.c | ||
iotkit-sysinfo.c | ||
ivshmem.c | ||
Kconfig | ||
lasi.c | ||
led.c | ||
mac_via.c | ||
mchp_pfsoc_dmc.c | ||
mchp_pfsoc_ioscb.c | ||
mchp_pfsoc_sysreg.c | ||
meson.build | ||
mips_cmgcr.c | ||
mips_cpc.c | ||
mips_itu.c | ||
mos6522.c | ||
mps2-fpgaio.c | ||
mps2-scc.c | ||
msf2-sysreg.c | ||
mst_fpga.c | ||
npcm7xx_clk.c | ||
npcm7xx_gcr.c | ||
npcm7xx_mft.c | ||
npcm7xx_pwm.c | ||
npcm7xx_rng.c | ||
nrf51_rng.c | ||
omap_clk.c | ||
omap_gpmc.c | ||
omap_l4.c | ||
omap_sdrc.c | ||
omap_tap.c | ||
pc-testdev.c | ||
pca9552.c | ||
pci-testdev.c | ||
pvpanic-isa.c | ||
pvpanic-pci.c | ||
pvpanic.c | ||
sbsa_ec.c | ||
sga.c | ||
sifive_e_prci.c | ||
sifive_test.c | ||
sifive_u_otp.c | ||
sifive_u_prci.c | ||
slavio_misc.c | ||
stm32f2xx_syscfg.c | ||
stm32f4xx_exti.c | ||
stm32f4xx_syscfg.c | ||
trace-events | ||
trace.h | ||
tz-mpc.c | ||
tz-msc.c | ||
tz-ppc.c | ||
unimp.c | ||
virt_ctrl.c | ||
vmcoreinfo.c | ||
xlnx-versal-crl.c | ||
xlnx-versal-pmc-iou-slcr.c | ||
xlnx-versal-xramc.c | ||
xlnx-zynqmp-apu-ctrl.c | ||
xlnx-zynqmp-crf.c | ||
zynq_slcr.c |