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]
Message-ID: <20140717220849.735bec65@gandalf.local.home>
Date:	Thu, 17 Jul 2014 22:08:49 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Tony Luck <tony.luck@...il.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...hat.com>,
	"Luck, Tony" <tony.luck@...el.com>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	"<m.chehab@...sung.com> Xie XiuQi" <xiexiuqi@...wei.com>
Subject: Re: [PATCH-v2] tracing: Fix wraparound problems in "uptime" tracer

On Thu, 17 Jul 2014 16:02:26 -0700
Tony Luck <tony.luck@...il.com> wrote:

> On Mon, Jun 30, 2014 at 1:31 PM, Tony Luck <tony.luck@...el.com> wrote:
> > +#else
> > +       jiffy *= HZ_TO_NSEC_NUM;
> > +       do_div(jiffy, HZ_TO_NSEC_DEN);
> > +       return jiffy;
> > +#endif
> 
> Well that didn't work either.  kernel/trace/trace_clock.c doesn't include
> timeconst.h - so we fail the compile because HZ_TO_NSEC_{NUM,DEN}
> aren't defined.  a #include looks dicey because timeconst.h is a generated
> file up the the kernel/ level ... so getting Makefile dependencies right would
> be ugly.
> 
> Do we really need to convert to nanoseconds? Couldn't we just return
> jiffies:

Sure, and we can make it a "counter". That is, the counters don't hide
1000 counts on output.

> 
> u64 notrace trace_clock_jiffies(void)
> {
>        return jiffies_64 - INITIAL_JIFFIES;
> }
> 
> and leave it as an exercise to userspace to interpret that?
> 
> -Tony
> 
> [Yes, this changes the UI . but there can't be any serious users
> given that the existing UI only works for 1hr 11 minutes after each
> boot]

I doubt it will break any tools, so it's fine.

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ