All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Shuah Khan <shuahkhan@gmail.com>
Cc: ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [topic proposal] tracepoints and ABI stability warranties
Date: Thu, 8 Sep 2016 12:13:24 +0900	[thread overview]
Message-ID: <20160908121324.7139b9f4f150e128e4c5229c@kernel.org> (raw)
In-Reply-To: <CAKocOON-REZwmQZGsnmqKEo2WJshAn7AbeRC-bZx2CEumRL14w@mail.gmail.com>

On Tue, 6 Sep 2016 15:05:04 -0600
Shuah Khan <shuahkhan@gmail.com> wrote:

> On Tue, Sep 6, 2016 at 12:51 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >         Right now there is no mechanism for saying "if this tracepoints
> > breaks, it's Not Our Problem(tm)".  All of them are parts of userland
> > ABI, potentially casting in stone all kinds of kernel internals.  E.g.
> > just today a patch series adding tracepoints to kobject primitives
> > had been posted; if _that_ becomes a part of stable ABI, we get the
> > lifetime rules for anything with an embedded kobject exposed to userland
> > and potentially impossible to change - all it takes is a single piece of
> > software making non-trivial use of those.
> 
> I honestly didn't think that my patch series will result in a special
> KS topic :)
> However, I think it is a good idea to discuss it as general topic for
> what kind of
> kernel information should/should not be made visible via tracepoints or other
> debug mechanisms.

Hmm, what the "information" means? I think there are 2 level of information
the "formal" information and "semantic" information. Tracepoints, debuginfo,
etc. provided by technical path are formal, and nobody can give the semantic
one.

For example, if we see an "unsigned long flags" in the code, we can understand
that is unsigned integer value and the size will be 32bit or 64bit depends on
CPU architecture. However, we can not know what the value means in the context
except for reading code or comment. It can be used for storing irq-flags, or
conditional flags, or rarely used for counting something. And also, we may not
know what will happened if the value is changed, except for precise documents etc.

One possible way to solve this is adding a kerneldoc entry for each tracepoint
so that we can understand what it means. However, it is still not enough for
keeping userspace program, because the "meaning" may not be machine readable.

Another possible solution is keeping the information meaning fixed with
its context (iow, make it stable), and write a manpage. But IMHO, it leads
to haedening of the arteris of the kernel desgin.

So, I would like to recommend someone who are using this kind of "information"
keep thier code update for newer kernel or contribute it (including test code)
to kernel tree, so that making it easy to fix/update (or abandon ... if the
context which tool depends on, is totally changed) it.

> We do support a wide range of tracepoints and events in various sub-systems
> skb.h, pagemap.h, and pagemap.h so on. Maybe it would be helpful to agree
> on some sort of guidelines for exposure.

How about adding a kerneldoc comment for each event as I described above?
I don't like to expose it via debugfs or tracefs, but maybe we can distribute
it as documents with kernel.

Thank you,


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2016-09-08  3:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 18:51 [Ksummit-discuss] [topic proposal] tracepoints and ABI stability warranties Al Viro
2016-09-06 19:22 ` Steven Rostedt
2016-09-06 21:36   ` Alexey Dobriyan
2016-09-06 21:53     ` Steven Rostedt
2016-09-06 22:41       ` Alexey Dobriyan
2016-09-06 23:12         ` Steven Rostedt
2016-09-08 11:43           ` Alexey Dobriyan
2016-09-07  5:10         ` Al Viro
2016-09-07  5:30           ` Andy Lutomirski
2016-09-07  6:41             ` Vlastimil Babka
2016-09-19 12:51               ` Michal Hocko
2016-09-07 13:15             ` Christian Borntraeger
2016-09-07 15:30             ` Shuah Khan
2016-09-07 16:10               ` Rik van Riel
2016-09-08  3:24                 ` Masami Hiramatsu
2016-09-15 19:23                 ` Mark Brown
2016-09-06 22:02     ` Alexey Dobriyan
2016-09-06 22:15       ` Steven Rostedt
2016-09-06 21:05 ` Shuah Khan
2016-09-08  3:13   ` Masami Hiramatsu [this message]
2016-09-07 23:17 ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160908121324.7139b9f4f150e128e4c5229c@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=shuahkhan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.