qemu/include
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
..
authz
block block/io: align requests to subcluster_size 2023-08-30 07:39:10 -04:00
chardev
crypto crypto: Unexport AES_*_rot, AES_TeN, AES_TdN 2023-07-09 13:48:23 +01:00
disas disas: Change type of disassemble_info.target_info to pointer 2023-06-13 17:25:47 +10:00
exec Revert "include/exec: typedef abi_ptr to vaddr in softmmu" 2023-08-29 11:30:33 -07:00
fpu fpu: Add float64_to_int{32,64}_modulo 2023-07-01 08:26:54 +02:00
gdbstub gdbstub: Remove gdb_do_syscallv 2023-03-07 20:44:09 +00:00
hw hw/rtc/aspeed_rtc: Use 64-bit offset for holding time_t difference 2023-08-31 09:45:18 +01:00
io io: remove io watch if TLS channel is closed during handshake 2023-08-01 18:45:27 +01:00
libdecnumber
migration migration/ram: Expose ramblock_is_ignored() as migrate_ram_is_ignored() 2023-07-12 09:25:37 +02:00
monitor monitor: add more *_locked() functions 2023-05-25 10:18:33 +02:00
net igb: Strip the second VLAN tag for extended VLAN 2023-05-23 15:20:15 +08:00
qapi monitor: mark mixed functions that can suspend 2023-04-20 11:17:35 +02:00
qemu bsd-user: Disable clang warnings 2023-08-28 12:16:18 -06:00
qom
scsi coroutine: Clean up superfluous inclusion of qemu/coroutine.h 2023-01-19 10:18:28 +01:00
semihosting
standard-headers linux-headers: update to v6.5-rc1 2023-07-10 09:52:52 +02:00
sysemu rtc: Use time_t for passing and returning time offsets 2023-08-31 09:45:18 +01:00
tcg tcg: Introduce negsetcond opcodes 2023-08-24 11:22:42 -07:00
ui virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties 2023-07-17 15:22:28 +04:00
user *-user: remove the guest_user_syscall tracepoints 2023-06-01 11:03:55 -04:00
elf.h linux-user/elfload: Fix /proc/cpuinfo features: on s390x 2023-07-18 09:36:27 +02:00
glib-compat.h
qemu-io.h
qemu-main.h