]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ctf: blacklist certain structure members entirely
authorNick Alcock <nick.alcock@oracle.com>
Mon, 25 Mar 2013 16:49:10 +0000 (16:49 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:41:43 +0000 (22:41 +0100)
commitf16c109a73b4f16101035288211e8ad4751a48c8
tree5897db269f3c5bccb71d8174ab0a30cf7c6ef15b
parent9fa5e2547784428f62b49d1dc1ac76877bea6a0c
ctf: blacklist certain structure members entirely

The problem of structures with identical names but conflicting members has
bitten dwarf2ctf before.  We defined a deduplication blacklist which prevents
specific modules from participating in deduplication, because they define a
structure with the same name as one in the shared type repository but with
different members.  This is, it turns out, not always enough.

Some kernel modules have begun to define structures with conflicting members in
different translation units within the same module.  There is no trick we can
use to help dwarf2ctf deal with this: each module gets one CTF file, covering
all that module's translation units, and if types have conflicting definitions
within that one module, there's nothing we can do: we must skip them entirely.
But we can limit the damage somewhat.

This commit adds a new blacklist, the 'member blacklist', stored in
scripts/dwarf2ctf/member.blacklist, which blacklists structure or union members
by name.  There are some limitations: only members of named structures and
unions can be blacklisted (not members of typedeffed, unnamed structures or
unions); and you can only blacklist types in the kernel tree, not types in
external modules.  Both of these restrictions can be lifted if it ever becomes
necessary, the latter quite easily.

The blacklist is of the form

filename:structure name.member name

The filenames are absolutized and compared with the filenames in the DWARF for
each structure member, both at emission time and when recursing to mark shared
types.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
scripts/Makefile.modpost
scripts/dwarf2ctf/dwarf2ctf.c
scripts/dwarf2ctf/member.blacklist [new file with mode: 0644]