lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANDhNCpsEQL+S8gadXMjvbE-6r8c6owzz+_DhN6JAVqQ8Hg=_g@mail.gmail.com>
Date: Tue, 24 Sep 2024 16:59:22 -0700
From: John Stultz <jstultz@...gle.com>
To: Shuah Khan <skhan@...uxfoundation.org>
Cc: tglx@...utronix.de, sboyd@...nel.org, shuah@...nel.org, 
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 2/2] selftests: timers: Remove local NSEC_PER_SEC and
 USEC_PER_SEC defines

On Tue, Sep 24, 2024 at 8:57 AM Shuah Khan <skhan@...uxfoundation.org> wrote:
>
> Remove local NSEC_PER_SEC and USEC_PER_SEC defines. Pick them up from
> include/vdso/time64.h. This requires -I $(top_srcdir) to the timers
> Makefile to include the include/vdso/time64.h.
>
> posix_timers test names the defines NSECS_PER_SEC and USECS_PER_SEC.
> Include the include/vdso/time64.h and change NSECS_PER_SEC and
> USECS_PER_SEC references to NSEC_PER_SEC and USEC_PER_SEC respectively.

Nit: You got the last bit switched there. This patch changes local
NSEC_PER_SEC to the upstream defined NSECS_PER_SEC.

Overall no objection from me. I've always pushed to have the tests be
mostly self-contained so they can be built outside of the kernel
source, but at this point the current kselftest.h dependencies means
it already takes some work, so this isn't introducing an undue
hardship.

Other then the nit,
  Acked-by: John Stultz <jstultz@...gle.com>

> diff --git a/tools/testing/selftests/timers/adjtick.c b/tools/testing/selftests/timers/adjtick.c
> index 205b76a4abb4..cb9a30f54662 100644
> --- a/tools/testing/selftests/timers/adjtick.c
> +++ b/tools/testing/selftests/timers/adjtick.c
> @@ -22,14 +22,12 @@
>  #include <sys/time.h>
>  #include <sys/timex.h>
>  #include <time.h>
> +#include <include/vdso/time64.h>
>
>  #include "../kselftest.h"
>
>  #define CLOCK_MONOTONIC_RAW    4

I suspect CLOCK_MONOTONIC_RAW (and the other clockid definitions)
could be similarly removed here as well in a future patch?

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ