Skip to content

Commit 94d0f5b

Browse files
fvincenzoKAGA-KOKO
authored andcommitted
arm64: vdso32: Code clean up
The compat vdso library had some checks that are not anymore relevant. Remove the unused code from the compat vDSO library. Note: This patch is preparatory for a future one that will introduce asm/vdso/processor.h on arm64. Signed-off-by: Vincenzo Frascino <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent b558051 commit 94d0f5b

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

arch/arm64/include/asm/vdso/compat_gettimeofday.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ int clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
7676
register long ret asm ("r0");
7777
register long nr asm("r7") = __NR_compat_clock_getres_time64;
7878

79-
/* The checks below are required for ABI consistency with arm */
80-
if ((_clkid >= MAX_CLOCKS) && (_ts == NULL))
81-
return -EINVAL;
82-
8379
asm volatile(
8480
" swi #0\n"
8581
: "=r" (ret)
@@ -97,10 +93,6 @@ int clock_getres32_fallback(clockid_t _clkid, struct old_timespec32 *_ts)
9793
register long ret asm ("r0");
9894
register long nr asm("r7") = __NR_compat_clock_getres;
9995

100-
/* The checks below are required for ABI consistency with arm */
101-
if ((_clkid >= MAX_CLOCKS) && (_ts == NULL))
102-
return -EINVAL;
103-
10496
asm volatile(
10597
" swi #0\n"
10698
: "=r" (ret)

arch/arm64/kernel/vdso32/vgettimeofday.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,12 @@
1111
int __vdso_clock_gettime(clockid_t clock,
1212
struct old_timespec32 *ts)
1313
{
14-
/* The checks below are required for ABI consistency with arm */
15-
if ((u32)ts >= TASK_SIZE_32)
16-
return -EFAULT;
17-
1814
return __cvdso_clock_gettime32(clock, ts);
1915
}
2016

2117
int __vdso_clock_gettime64(clockid_t clock,
2218
struct __kernel_timespec *ts)
2319
{
24-
/* The checks below are required for ABI consistency with arm */
25-
if ((u32)ts >= TASK_SIZE_32)
26-
return -EFAULT;
27-
2820
return __cvdso_clock_gettime(clock, ts);
2921
}
3022

@@ -37,10 +29,6 @@ int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
3729
int __vdso_clock_getres(clockid_t clock_id,
3830
struct old_timespec32 *res)
3931
{
40-
/* The checks below are required for ABI consistency with arm */
41-
if ((u32)res >= TASK_SIZE_32)
42-
return -EFAULT;
43-
4432
return __cvdso_clock_getres_time32(clock_id, res);
4533
}
4634

0 commit comments

Comments
 (0)