[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150523081731.GA5428@gmail.com>
Date: Sat, 23 May 2015 10:17:31 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: John Stultz <john.stultz@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
Badhri Jagan Sridharan <badhri@...gle.com>
Subject: Re: [PATCH 4/7] tracing: timer: Add deferrable flag to timer_start
* Thomas Gleixner <tglx@...utronix.de> wrote:
> On Thu, 21 May 2015, Ingo Molnar wrote:
> > * John Stultz <john.stultz@...aro.org> wrote:
> > > - TP_PROTO(struct timer_list *timer, unsigned long expires),
> > > + TP_PROTO(struct timer_list *timer,
> > > + unsigned long expires,
> >
> > This isn't compat safe, should any tooling rely on this.
>
> I can't see how that matters. [...]
It's good practice for any user facing ABI to not be bit depende. We
it for (almost) all the syscall ABIs.
> [...] The binary trace tells you from which machine (32 or 64 bit)
> it comes. [...]
Yeah, tooling can almost always fix up a crappy interface, but that's
no good reason to not do it right in the first place. That's one of
the reasons why (most) network protocols and most filesystems don't
have a 'bitness' nor an 'endianness' field in their formats. It's a
fundamentally fragile concept ...
> [...] So the field size is available for the tool. If the tool
> blindly applies the format string, it's hardly a fault of the
> kernel. And there is no point to bloat 32bit tracing with 64bit
> entries just because some random tool might be stupid.
Yeah, in a perfect world and so we could define arbitrarily complex
interfaces and expect tooling to follow it.
In a not so perfect world we are conservative in defining our ABIs to
be as simple as possible and are liberal in accepting them, not the
other way around.
And it's not just about tooling - just to give a simple technical
example: parsing a partly corrupted file is a lot easier if there's no
dependency on some header area defining a 'bitness value' - you can
just take any part of the stream and eventually have robust decoding
even if you lost part of the stream.
Thanks,
Ingo
--
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