All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/5] syscalls: Remove incorrect usage of libc structures
@ 2020-05-19  8:51 Viresh Kumar
  2020-05-19  8:51 ` [LTP] [PATCH 1/5] tst_safe_clocks: Remove safe_clock_adjtime() Viresh Kumar
                   ` (4 more replies)
  0 siblings, 5 replies; 29+ messages in thread
From: Viresh Kumar @ 2020-05-19  8:51 UTC (permalink / raw)
  To: ltp

Hi,

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

Arnd: It was getting difficult to search for such instances and so I
searched it with following strings (search for files that use these
structures, as well as tst_syscall()) to catch the abuse, hope it covers
all cases.

git grep "struct timeval" `git grep -l tst_syscall`
git grep "struct timespec" `git grep -l tst_syscall`
git grep "struct timex" `git grep -l tst_syscall`

Viresh Kumar (5):
  tst_safe_clocks: Remove safe_clock_adjtime()
  syscalls: settimeofday: Use gettimeofday()
  syscalls: Don't use tst_syscall() unnecessarily
  syscalls: Don't pass struct timespec to tst_syscall()
  syscalls: Don't pass struct timeval to tst_syscall()

 include/tst_clocks.h                          |  8 ++++---
 include/tst_safe_clocks.h                     | 18 ---------------
 include/tst_timer.h                           |  6 +++++
 lib/parse_opts.c                              |  3 +--
 lib/tst_clocks.c                              |  6 ++---
 lib/tst_test.c                                | 16 ++++++-------
 lib/tst_timer.c                               | 23 ++++++++++++-------
 lib/tst_timer_test.c                          |  2 +-
 lib/tst_wallclock.c                           | 17 +++++++-------
 testcases/cve/cve-2016-7117.c                 |  2 +-
 .../syscalls/clock_adjtime/clock_adjtime.h    |  5 ----
 .../syscalls/gettimeofday/gettimeofday02.c    |  3 ++-
 .../syscalls/settimeofday/settimeofday01.c    |  6 ++---
 .../syscalls/settimeofday/settimeofday02.c    |  2 +-
 testcases/kernel/syscalls/stime/stime_var.h   |  3 ++-
 15 files changed, 57 insertions(+), 63 deletions(-)

-- 
2.25.0.rc1.19.g042ed3e048af


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2020-05-21 15:10 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19  8:51 [LTP] [PATCH 0/5] syscalls: Remove incorrect usage of libc structures Viresh Kumar
2020-05-19  8:51 ` [LTP] [PATCH 1/5] tst_safe_clocks: Remove safe_clock_adjtime() Viresh Kumar
2020-05-19  8:51 ` [LTP] [PATCH 2/5] syscalls: settimeofday: Use gettimeofday() Viresh Kumar
2020-05-19  9:20   ` Arnd Bergmann
2020-05-19  9:25     ` Viresh Kumar
2020-05-19 10:24       ` Arnd Bergmann
2020-05-19 12:16   ` Cyril Hrubis
2020-05-19 12:47     ` Arnd Bergmann
2020-05-20  7:16     ` Viresh Kumar
2020-05-21 13:16       ` Cyril Hrubis
2020-05-19  8:51 ` [LTP] [PATCH 3/5] syscalls: Don't use tst_syscall() unnecessarily Viresh Kumar
2020-05-19  9:22   ` Arnd Bergmann
2020-05-19  9:28     ` Viresh Kumar
2020-05-19 12:23   ` Cyril Hrubis
2020-05-19 12:41     ` Arnd Bergmann
2020-05-19 12:56       ` Petr Vorel
2020-05-19 13:45       ` Cyril Hrubis
2020-05-20  7:19         ` Viresh Kumar
2020-05-21 14:20           ` Cyril Hrubis
2020-05-21 15:10             ` Arnd Bergmann
2020-05-19  8:51 ` [LTP] [PATCH 4/5] syscalls: Don't pass struct timespec to tst_syscall() Viresh Kumar
2020-05-19 12:21   ` Cyril Hrubis
2020-05-20  7:31     ` Viresh Kumar
2020-05-20  8:47       ` Arnd Bergmann
2020-05-20  9:05         ` Viresh Kumar
2020-05-20  9:35           ` Arnd Bergmann
2020-05-20  9:39             ` Viresh Kumar
2020-05-20  9:52               ` Arnd Bergmann
2020-05-19  8:51 ` [LTP] [PATCH 5/5] syscalls: Don't pass struct timeval " Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.