linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: JBeulich@suse.com, mmarek@suse.cz
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: genksyms: separating public headers from private header files
Date: Wed, 16 Jul 2014 11:19:15 -0400	[thread overview]
Message-ID: <20140716151915.GS7959@redhat.com> (raw)

Hi Jan, Michal,

I am not sure who maintains genksyms officially, so I am sending this
question to the two of you as folks who seemed to have contributed to the
tool. :-)

I noticed with genksyms that a symbol is opaquely defined in a
public header file (on purpose) and then fully defined in a private
header.  This is normal practice.  Further, symbol checksumming is done on
EXPORT_SYMBOLs in a private c file that includes the private header
files.

As a result, even though a struct symbol is intentionally opaquely defined
in a public header file consumed by a third party module, the symbol
checksumming still includes the full definition (because the private c
file with the actual export symbol has the full definition).  This has
made it difficult to modify the private header file struct because it
breaks the symbol checksumming.

For example, let's consider

block/blk-core.c:EXPORT_SYMBOL(blk_put_queue);

blk_put_queue will eventually depend on struct blkcq_gq.

Now publicly blkcg_gq is defined opaquely in 

include/linux/blkdev.h

and privately in

block/block-cgroup.h

Now when we checksum blk_put_queue both include/linux/blkdev.h and
block/block-cgroup.h are included in block/blk-core.c, so blkcg_gq is
fully defined for checksumming.

Later if we modify blkcq_gq in block/block-cgroup.h the checksum changes,
even though it can debated that block-cgroup.h is a private header file
and it should not impact kabi for third party modules.

Have either of you run into this?  Or is the argument that private files
should not impact the checksum not as strong as I might think?  Or is it a
technical problem of how to separate the public includes from the private
includes in the preprocessed file?

Thanks!

Cheers,
Don


             reply	other threads:[~2014-07-16 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 15:19 Don Zickus [this message]
2014-07-23  8:28 ` genksyms: separating public headers from private header files Jan Beulich
2014-07-23 13:52   ` Don Zickus

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=20140716151915.GS7959@redhat.com \
    --to=dzickus@redhat.com \
    --cc=JBeulich@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).