Skip to content

syscalls: Remove incorrect usage of libc structures

Viresh Kumar ltp 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 0 repliesNew
  2. v15 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Use .restore_wallclock flag and remove unnecessary restoration code.
- Update tst_clock_*() syscall's implementation instead of its users.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tst_safe_clocks: Remove safe_clock_adjtime()include/tst_safe_clocks.h+0 -180 replies
2/6syscalls: settimeofday01: Set .restore_wallclock flagtestcases/kernel/syscalls/settimeofday/settimeofday01.c+1 -160 replies
3/6syscalls: settimeofday02: Remove time restoration codetestcases/kernel/syscalls/settimeofday/settimeofday02.c+0 -210 replies
4/6syscalls: settimeofday: Use gettimeofday()testcases/kernel/syscalls/settimeofday/settimeofday01.c+2 -21 reply
5/6syscalls: Don't pass struct timespec to tst_syscall()lib/tst_clocks.c+56 -318 replies
5/6syscalls: Don't pass struct timespec to tst_syscall()+0 -02 replies
6/6syscalls: Don't pass struct timeval to tst_syscall()include/tst_timer.h testcases/kernel/syscalls/clock_adjtime/clock_adjtime.h testcases/kernel/syscalls/gettimeofday/gettimeofday02.c +1 more+10 -71 reply

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchArnd Bergmann
1/6
2/6
3/6
4/6
5/6R-b
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [LTP] [PATCH V2 0/6] syscalls: Remove incorrect usage of libc structures

Hi,

It is incorrect to use the libc structures (timespec, timeval, timex), to the non-time64 syscalls called via tst_syscall() as the kernel expects the old structures in there and the libc structure definition may change in the future.

V2:
- Use .restore_wallclock flag and remove unnecessary restoration code.
- Update tst_clock_*() syscall's implementation instead of its users.

Viresh Kumar (6):
tst_safe_clocks: Remove safe_clock_adjtime()
syscalls: settimeofday01: Set .restore_wallclock flag
syscalls: settimeofday02: Remove time restoration code
syscalls: settimeofday: Use gettimeofday()
syscalls: Don't pass struct timespec to tst_syscall()
syscalls: Don't pass struct timeval to tst_syscall()

 include/tst_safe_clocks.h                     | 18 ------
 include/tst_timer.h                           |  6 ++
 lib/tst_clocks.c                              | 59 ++++++++++++++++++-
 .../syscalls/clock_adjtime/clock_adjtime.h    |  5 --
 .../syscalls/gettimeofday/gettimeofday02.c    |  3 +-
 .../syscalls/settimeofday/settimeofday01.c    | 21 +------
 .../syscalls/settimeofday/settimeofday02.c    | 21 -------
 testcases/kernel/syscalls/stime/stime_var.h   |  3 +-
 8 files changed, 69 insertions(+), 67 deletions(-)
Signature · 1 line
2.25.0.rc1.19.g042ed3e048af