um: ubd: use 64-bit time_t where possible
The ubd code suffers from a possible y2038 overflow on 32-bit architectures, both for the cow header and the os_file_modtime() function. Replace time_t with time64_t to extend the ubd_kern side as much as possible. Whether this makes a difference for the user side depends on the host libc implementation that may use either 32-bit or 64-bit time_t. For the cow file format, the header contains an unsigned 32-bit timestamp, which is good until y2106, passing this through a 'long long' gives us a consistent interpretation between 32-bit and 64-bit um kernels. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
此提交包含在:
@@ -150,7 +150,7 @@ extern int os_sync_file(int fd);
|
||||
extern int os_file_size(const char *file, unsigned long long *size_out);
|
||||
extern int os_pread_file(int fd, void *buf, int len, unsigned long long offset);
|
||||
extern int os_pwrite_file(int fd, const void *buf, int count, unsigned long long offset);
|
||||
extern int os_file_modtime(const char *file, unsigned long *modtime);
|
||||
extern int os_file_modtime(const char *file, long long *modtime);
|
||||
extern int os_pipe(int *fd, int stream, int close_on_exec);
|
||||
extern int os_set_fd_async(int fd);
|
||||
extern int os_clear_fd_async(int fd);
|
||||
|
新增問題並參考
封鎖使用者