mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
powerpc/vdso: Respect COMPAT_32BIT_TIME
If CONFIG_COMPAT_32BIT_TIME is disabled then the vDSO should not provide any 32-bit time related functionality. This is the intended effect of the kconfig option and also the fallback system calls would also not be implemented. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20260702-vdso-compat_32bit_time-v3-6-db9f36d8d432@linutronix.de
This commit is contained in:
parent
95216f4647
commit
e01abc70af
|
|
@ -67,9 +67,11 @@
|
|||
* int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
*
|
||||
*/
|
||||
#if defined(__powerpc64__) || defined(CONFIG_COMPAT_32BIT_TIME)
|
||||
V_FUNCTION_BEGIN(__kernel_gettimeofday)
|
||||
cvdso_call __c_kernel_gettimeofday
|
||||
V_FUNCTION_END(__kernel_gettimeofday)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Exact prototype of clock_gettime()
|
||||
|
|
@ -77,9 +79,11 @@ V_FUNCTION_END(__kernel_gettimeofday)
|
|||
* int __kernel_clock_gettime(clockid_t clock_id, struct timespec *tp);
|
||||
*
|
||||
*/
|
||||
#if defined(__powerpc64__) || defined(CONFIG_COMPAT_32BIT_TIME)
|
||||
V_FUNCTION_BEGIN(__kernel_clock_gettime)
|
||||
cvdso_call __c_kernel_clock_gettime
|
||||
V_FUNCTION_END(__kernel_clock_gettime)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Exact prototype of clock_gettime64()
|
||||
|
|
@ -99,9 +103,11 @@ V_FUNCTION_END(__kernel_clock_gettime64)
|
|||
* int __kernel_clock_getres(clockid_t clock_id, struct timespec *res);
|
||||
*
|
||||
*/
|
||||
#if defined(__powerpc64__) || defined(CONFIG_COMPAT_32BIT_TIME)
|
||||
V_FUNCTION_BEGIN(__kernel_clock_getres)
|
||||
cvdso_call __c_kernel_clock_getres
|
||||
V_FUNCTION_END(__kernel_clock_getres)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Exact prototype of clock_getres_time64()
|
||||
|
|
@ -122,6 +128,8 @@ V_FUNCTION_END(__kernel_clock_getres_time64)
|
|||
* time_t time(time *t);
|
||||
*
|
||||
*/
|
||||
#if defined(__powerpc64__) || defined(CONFIG_COMPAT_32BIT_TIME)
|
||||
V_FUNCTION_BEGIN(__kernel_time)
|
||||
cvdso_call __c_kernel_time call_time=1
|
||||
V_FUNCTION_END(__kernel_time)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -119,13 +119,15 @@ VERSION
|
|||
{
|
||||
VDSO_VERSION_STRING {
|
||||
global:
|
||||
__kernel_get_syscall_map;
|
||||
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||
__kernel_gettimeofday;
|
||||
__kernel_clock_gettime;
|
||||
__kernel_clock_gettime64;
|
||||
__kernel_clock_getres;
|
||||
__kernel_clock_getres_time64;
|
||||
__kernel_time;
|
||||
#endif /* CONFIG_COMPAT_32BIT_TIME */
|
||||
__kernel_get_syscall_map;
|
||||
__kernel_clock_gettime64;
|
||||
__kernel_clock_getres_time64;
|
||||
__kernel_get_tbfreq;
|
||||
__kernel_sync_dicache;
|
||||
__kernel_sigtramp32;
|
||||
|
|
|
|||
|
|
@ -18,23 +18,25 @@ int __c_kernel_clock_getres(clockid_t clock_id, struct __kernel_timespec *res,
|
|||
return __cvdso_clock_getres_data(vd, clock_id, res);
|
||||
}
|
||||
#else
|
||||
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||
int __c_kernel_clock_gettime(clockid_t clock, struct old_timespec32 *ts,
|
||||
const struct vdso_time_data *vd)
|
||||
{
|
||||
return __cvdso_clock_gettime32_data(vd, clock, ts);
|
||||
}
|
||||
|
||||
int __c_kernel_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts,
|
||||
const struct vdso_time_data *vd)
|
||||
{
|
||||
return __cvdso_clock_gettime_data(vd, clock, ts);
|
||||
}
|
||||
|
||||
int __c_kernel_clock_getres(clockid_t clock_id, struct old_timespec32 *res,
|
||||
const struct vdso_time_data *vd)
|
||||
{
|
||||
return __cvdso_clock_getres_time32_data(vd, clock_id, res);
|
||||
}
|
||||
#endif /* CONFIG_COMPAT_32BIT_TIME */
|
||||
|
||||
int __c_kernel_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts,
|
||||
const struct vdso_time_data *vd)
|
||||
{
|
||||
return __cvdso_clock_gettime_data(vd, clock, ts);
|
||||
}
|
||||
|
||||
int __c_kernel_clock_getres_time64(clockid_t clock_id, struct __kernel_timespec *res,
|
||||
const struct vdso_time_data *vd)
|
||||
|
|
@ -43,6 +45,7 @@ int __c_kernel_clock_getres_time64(clockid_t clock_id, struct __kernel_timespec
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__powerpc64__) || defined(CONFIG_COMPAT_32BIT_TIME)
|
||||
int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,
|
||||
const struct vdso_time_data *vd)
|
||||
{
|
||||
|
|
@ -53,3 +56,4 @@ __kernel_old_time_t __c_kernel_time(__kernel_old_time_t *time, const struct vdso
|
|||
{
|
||||
return __cvdso_time_data(vd, time);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user