ryran / xsos

sosreport examiner - instantly summarize system info from a sosreport or a running system
336 stars 121 forks source link

Add check for 3rd party NIC modules in -e ethtool output? #111

Open ptalbert opened 9 years ago

ptalbert commented 9 years ago

The ethtool output currently shows (among others) the driver and firmware information per interface. It would be useful for it to somehow flag the driver output when an unsigned module is being used.

This information could be gathered from the modinfo output provided by the kernel sosreport module.

ryran commented 9 years ago

@ptalbert can you give me a sosreport that has some unsigned modules?

ryran commented 9 years ago

For RHEL6 & below, steps could look like this:

  1. Get list of NIC drivers from ethtool: drivers=$(awk '/^driver:/{print $2}' sos_commands/networking/ethtool_-i_* | sort -u)
  2. Iterate over driver list, pulling their filenames from modinfo output: for driver in ${drivers}; do grep "^filename: .*${driver}.ko" sos_commands/kernel/modinfo_*; done
  3. Throw a warning if path does not match /lib/modules/$(uname -r)/kernel/drivers/net/${driver).ko

Looks like RHEL7 added signer: and sig_key: to modinfo output so we could take advantage of that too.