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:   Wed, 13 Dec 2017 11:45:09 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Baolin Wang <baolin.wang@...aro.org>,
        Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Ingo Molnar <mingo@...hat.com>, linux-rtc@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v2] rtc: Add tracepoints for RTC system

On Wed, 13 Dec 2017 09:33:23 +0100
Arnd Bergmann <arnd@...db.de> wrote:


> >> How bad would that be to change it later? I didn't follow the whole
> >> tracepoint ABI issue closely.  
> 
> There is no general rule here other than "if it breaks for existing
> users, we have to fix it". Anyone who uses the tracepoints correctly
> would end up showing zero-date if we change all the fields, but
> it should not crash here.

But if a tool depends on that value correct, that still is a user space
breakage, even though it was using tracepoints correctly.

> 
> Printing a time64_t instead of rtc_time may be better here, as it's
> cheaper to convert rtc_time to time64_t that vice versa. User space
> looking at the trace data can then do the conversion back to struct tm
> for printing in a C program or using /bin/date from a shell
> script, but I agree it's an extra step.
> 
> It's also possible that we don't care about the overhead of doing
> a time64_to_tm() or rtc_time64_to_tm() in the trace function, as long
> as that only needs to be done if the tracepoint is active. I find trace
> points a bit confusing, so I don't know if that is the case or not when
> the tracepoint is compiled into the kernel but disabled at run time.

Everything that is done in TP_fast_assign() is only performed when the
tracepoint is active. It adds no more overhead when tracing is
disabled, as tracepoints incorporate jump labels, and the call itself
is a nop. As long as the parameters to the trace_*() functions don't do
logic, all should be fine: like if you had:

  trace_rtc_set_alarm(call_some_function_to_return_tm(), err);

gcc could make that call_some_function_to_return_tm() happen even when
the tracepoint is not enabled. But that's not the case with this patch.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ