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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 5 Aug 2016 15:36:55 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of
 hardcoded number

Em Fri, Aug 05, 2016 at 02:19:42PM -0400, Steven Rostedt escreveu:
> On Wed, 2 Mar 2016 09:20:04 -0300
> Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> 
> > Em Tue, Feb 09, 2016 at 03:40:15PM -0500, Steven Rostedt escreveu:
> > > From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
> > > 
> > > Instead of using 1000000, define a USECS_PER_SEC macro and use that instead.  
> > 
> > Applying, but the kernel uses USEC_PER_SEC, NSEC_PER_SEC, etc, at some
> > point I'll try and get those same headers in tools/include/ and make all
> > of tools/ use the same convention as the kernel.
> 
> Was this ever applied? Anyway, I'll also go ahead and convert this to
> the non plural versions to match the kernel.

Fell thru the cracks :-\ The other patches in the series were applied
tho.

I'm introducing this and removing the definitions I have in
tools/perf/perf.h for NSEC_PER_SEC and NSEC_PER_USEC:

[acme@...et linux]$ cat tools/include/linux/time64.h 
#ifndef _TOOLS_LINUX_TIME64_H
#define _TOOLS_LINUX_TIME64_H

#define MSEC_PER_SEC	1000L
#define USEC_PER_MSEC	1000L
#define NSEC_PER_USEC	1000L
#define NSEC_PER_MSEC	1000000L
#define USEC_PER_SEC	1000000L
#define NSEC_PER_SEC	1000000000L
#define FSEC_PER_SEC	1000000000000000LL

#endif /* _TOOLS_LINUX_TIME64_H */
[acme@...et linux]$ 

So the header to include is the same as in the kernel, the constants as
well. We can go on adding more stuff from include/linux/time64.h as
tools use it.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ