qemu/hw
Lev Kujawski 8682ff6960 hw/ide/core.c (cmd_read_native_max): Avoid limited device parameters
Always use the native CHS device parameters for the ATA commands READ
NATIVE MAX ADDRESS and READ NATIVE MAX ADDRESS EXT, not those limited
by the ATA command INITIALIZE_DEVICE_PARAMETERS (introduced in patch
176e4961, hw/ide/core.c: Implement ATA INITIALIZE_DEVICE_PARAMETERS
command, 2022-07-07.)

As stated by the ATA/ATAPI specification, "[t]he native maximum is the
highest address accepted by the device in the factory default
condition."  Therefore this patch substitutes the native values in
drive_heads and drive_sectors before calling ide_set_sector().

One consequence of the prior behavior was that setting zero sectors
per track could lead to an FPE within ide_set_sector().  Thanks to
Alexander Bulekov for reporting this issue.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1243
Signed-off-by: Lev Kujawski <lkujaw@mailbox.org>
Message-ID: <20221010085229.2431276-1-lkujaw@mailbox.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-04-30 06:21:47 +02:00
..
9pfs
acpi hmat acpi: Fix out of bounds access due to missing use of indirection 2024-03-12 17:59:46 -04:00
adc hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
alpha
arm Misc HW patch queue 2024-04-25 09:43:29 -07:00
audio exec: Declare target_words_bigendian() in 'exec/tswap.h' 2024-04-26 17:03:05 +02:00
avr
block hw/block/nand: Fix out-of-bound access in NAND block buffer 2024-04-10 09:09:34 +02:00
char hw/char/stm32l4x5_usart: Fix memory corruption by adding correct class_size 2024-04-30 06:21:47 +02:00
core exec: Declare target_words_bigendian() in 'exec/tswap.h' 2024-04-26 17:03:05 +02:00
cpu hw: Add a Kconfig switch for the TYPE_CPU_CLUSTER device 2024-04-25 12:48:12 +02:00
cris
cxl hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean 2024-04-25 12:48:12 +02:00
display exec: Declare target_words_bigendian() in 'exec/tswap.h' 2024-04-26 17:03:05 +02:00
dma hw/dma: avoid apparent overflow in soc_dma_set_request 2024-04-25 10:21:06 +01:00
fsi
gpio hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
hppa
hyperv hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
i2c hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
i386 hw/i386/pc_sysfw: Remove unused parameter from pc_isa_bios_init() 2024-04-25 12:48:12 +02:00
ide hw/ide/core.c (cmd_read_native_max): Avoid limited device parameters 2024-04-30 06:21:47 +02:00
input hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
intc hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
ipack
ipmi
isa hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately 2024-04-15 13:07:11 +02:00
loongarch smbios: get rid of global smbios_ep_type 2024-03-18 08:42:45 -04:00
m68k hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
mem hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean 2024-04-25 12:48:12 +02:00
microblaze hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user 2024-03-25 09:57:43 +01:00
mips
misc hw: misc: edu: use qemu_log_mask instead of hw_error 2024-04-30 06:21:47 +02:00
net Misc HW patch queue 2024-04-25 09:43:29 -07:00
nubus
nvme hw/nvme: fix -Werror=maybe-uninitialized 2024-04-02 16:15:07 +02:00
nvram hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
openrisc
pci hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
pci-bridge Misc HW patch queue 2024-04-25 09:43:29 -07:00
pci-host hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
pcmcia
ppc Error reporting patches for 2024-04-24 2024-04-24 09:22:42 -07:00
remote
riscv hw: Add a Kconfig switch for the TYPE_CPU_CLUSTER device 2024-04-25 12:48:12 +02:00
rtc hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
rx
s390x target-arm queue: 2024-04-25 08:07:45 -07:00
scsi esp.c: remove explicit setting of DRQ within ESP state machine 2024-04-04 15:17:53 +01:00
sd hw/sd/sdhci: Do not update TRNMOD when Command Inhibit (DAT) is set 2024-04-10 09:09:34 +02:00
sensor hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
sh4
smbios hw/smbios: add stub for smbios_get_table_legacy() 2024-03-26 14:32:54 +01:00
sparc
sparc64
ssi Misc HW patch queue 2024-04-25 09:43:29 -07:00
timer hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
tpm
tricore
ufs
usb hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
vfio memory: Add Error** argument to .log_global_start() handler 2024-04-23 18:36:01 -04:00
virtio exec: Declare target_words_bigendian() in 'exec/tswap.h' 2024-04-26 17:03:05 +02:00
watchdog
xen
xenpv
xtensa hw/xtensa: Include missing 'exec/cpu-common.h' in 'bootparam.h' 2024-04-25 12:48:12 +02:00
Kconfig hw: Fix problem with the A*MPCORE switches in the Kconfig files 2024-04-25 12:48:12 +02:00
meson.build hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper 2024-04-24 16:03:38 +02:00