qemu/include/sysemu
Peter Maydell 5ec008a2bd rtc: Use time_t for passing and returning time offsets
The functions qemu_get_timedate() and qemu_timedate_diff() take
and return a time offset as an integer. Coverity points out that
means that when an RTC device implementation holds an offset
as a time_t, as the m48t59 does, the time_t will get truncated.
(CID 1507157, 1517772).

The functions work with time_t internally, so make them use that type
in their APIs.

Note that this won't help any Y2038 issues where either the device
model itself is keeping the offset in a 32-bit integer, or where the
hardware under emulation has Y2038 or other rollover problems.  If we
missed any cases of the former then hopefully Coverity will warn us
about them since after this patch we'd be truncating a time_t in
assignments from qemu_timedate_diff().)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2023-08-31 09:45:18 +01:00
..
accel-blocker.h accel: Clean up includes 2023-02-08 07:28:05 +01:00
accel-ops.h gdbstub: move update guest debug to accel ops 2023-03-07 20:44:09 +00:00
arch_init.h
balloon.h
block-backend-common.h block: drain from main loop thread in bdrv_co_yield_to_drain() 2023-05-30 17:32:02 +02:00
block-backend-global-state.h block: add blk_in_drain() API 2023-05-30 17:32:02 +02:00
block-backend-io.h block: add blk_io_plug_call() API 2023-06-01 07:34:03 -04:00
block-backend.h
block-ram-registrar.h
blockdev.h
cpu-throttle.h
cpu-timers.h
cpus.h exec: Remove unused 'qemu/timer.h' timer 2023-02-27 22:29:01 +01:00
cryptodev-vhost-user.h
cryptodev-vhost.h
cryptodev.h cryptodev: support QoS 2023-03-07 12:38:59 -05:00
device_tree.h
dirtylimit.h migration: Extend query-migrate to provide dirty page limit info 2023-07-26 10:55:56 +02:00
dirtyrate.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
dma.h
dump-arch.h
dump.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
event-loop-base.h Don't include headers already included by qemu/osdep.h 2023-02-08 07:28:05 +01:00
hax.h accel: Document generic accelerator headers 2023-06-28 13:55:35 +02:00
hostmem.h
hvf_int.h accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState 2023-06-28 14:14:22 +02:00
hvf.h sysemu/hvf: Use vaddr for hvf_arch_[insert|remove]_hw_breakpoint 2023-08-24 11:21:40 -07:00
hw_accel.h
iothread.h
kvm_int.h kvm: Synchronize the backup bitmap in the last stage 2023-05-18 08:53:50 +02:00
kvm_xen.h kvm/i386: Add xen-evtchn-max-pirq property 2023-03-01 09:09:22 +00:00
kvm.h sysemu/kvm: Use vaddr for kvm_arch_[insert|remove]_hw_breakpoint 2023-08-24 11:21:35 -07:00
memory_mapping.h
numa.h
nvmm.h accel: Document generic accelerator headers 2023-06-28 13:55:35 +02:00
os-posix.h win32: replace closesocket() with close() wrapper 2023-03-13 15:39:31 +04:00
os-win32.h console/win32: allocate shareable display surface 2023-06-27 17:08:56 +02:00
qtest.h softmmu/qtest: Move the target-specific pseries RTAS code out of qtest.c 2023-04-20 11:25:32 +02:00
replay.h replay: Extract core API to 'exec/replay-core.h' 2023-02-27 22:29:01 +01:00
reset.h
rng-random.h
rng.h
rtc.h rtc: Use time_t for passing and returning time offsets 2023-08-31 09:45:18 +01:00
runstate-action.h
runstate.h runstate: drop unused runstate_store() 2023-06-02 01:03:19 +02:00
seccomp.h
stats.h stats: Move QMP commands from monitor/ to stats/ 2023-02-04 07:56:54 +01:00
sysemu.h pci: Move HMP command from hw/pci/pcie_aer.c to pci-hmp-cmds.c 2022-12-19 16:21:56 +01:00
tcg.h accel: Document generic accelerator headers 2023-06-28 13:55:35 +02:00
tpm_backend.h
tpm_util.h
tpm.h tpm: Add support for TPM device over I2C bus 2023-04-20 08:17:15 -04:00
vhost-user-backend.h
watchdog.h
whpx.h accel: Document generic accelerator headers 2023-06-28 13:55:35 +02:00
xen-mapcache.h
xen.h accel: Document generic accelerator headers 2023-06-28 13:55:35 +02:00