[PATCH 0/6] Decode family field of Netlink GENERIC protocol

Masatake YAMATO yamato at redhat.com
Sat Jun 10 06:32:41 UTC 2017


Netlink GENERIC protocol allows a process to talk with a subsystem of
Linux kernel specified by its name(family name); the process asks the
id(family id)for the name first, then talks to the subsystem with the
id. The id is defined at run-time, when the subsystem is
registered. Therefore strace cannot make a table mapping from a family
id to its family name in build-time.

These change sets are for decoding family ids.
strace gets the mapping and makes the table at run-time.

Following case is not considered yet.
The target process it self can ask registering a subsystem not
registered yet to Linux kernel. When strace detects such action of the
target process, strace should extend the table for decoding the family id
of the newly registered subsystem.


Masatake YAMATO (6):
  socketeutils: extend receive_responses() to handle other type than
    SOCK_DIAG_BY_FAMILY communication
  socketeutils: allow to pass a user data to the callback function of
    receive_responses()
  dyxlat: building xlat dynamically
  socketutils: build a xlat table dynamically for decoding "family"
    field of Netlink GENERIC protocol
  netlink: decode "family" field of Netlink GENERIC protocol
  tests: add check for decoding family field of netlink GENERIC protocol

 Makefile.am                 |   1 +
 defs.h                      |  10 ++++
 dyxlat.c                    | 120 +++++++++++++++++++++++++++++++++++++++
 netlink.c                   |  10 +++-
 socketutils.c               | 134 +++++++++++++++++++++++++++++++++++++++-----
 tests/.gitignore            |   1 +
 tests/gen_tests.in          |   1 +
 tests/netlink_generic.c     |  78 ++++++++++++++++++++++++++
 tests/pure_executables.list |   1 +
 9 files changed, 338 insertions(+), 18 deletions(-)
 create mode 100644 dyxlat.c
 create mode 100644 tests/netlink_generic.c

-- 
2.9.4





More information about the Strace-devel mailing list