Skip to content
Snippets Groups Projects
Commit 39052cbf authored by Deepa Dinamani's avatar Deepa Dinamani Committed by Cheng Jian
Browse files

io_pgetevents: use __kernel_timespec

mainline inclusion
from mainline-5.0-rc1
commit 7a35397f
category: feature
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=27


CVE: NA
---------------------------

struct timespec is not y2038 safe.
struct __kernel_timespec is the new y2038 safe structure for all
syscalls that are using struct timespec.
Update io_pgetevents interfaces to use struct __kernel_timespec.

sigset_t also has different representations on 32 bit and 64 bit
architectures. Hence, we need to support the following different
syscalls:

New y2038 safe syscalls:
(Controlled by CONFIG_64BIT_TIME for 32 bit ABIs)

Native 64 bit(unchanged) and native 32 bit : sys_io_pgetevents
Compat : compat_sys_io_pgetevents_time64

Older y2038 unsafe syscalls:
(Controlled by CONFIG_32BIT_COMPAT_TIME for 32 bit ABIs)

Native 32 bit : sys_io_pgetevents_time32
Compat : compat_sys_io_pgetevents

Note that io_getevents syscalls do not have a y2038 safe solution.

Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>

Conflicts:
	fs/aio.c
	include/linux/compat.h
	[ Patch 9afc5eee("y2038: globally rename compat_time to
	  old_time32") is not applied. ]

Signed-off-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: default avataryangerkun <yangerkun@huawei.com>
Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent efecd427
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment