LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-19-2017, 12:18 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,251

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Kernel Static Analyzers Spewing errors


I have Slackware-14.2, the Slackware-14.2 kernel source, which is unmodified Linus' tree, and I'm having symbol issues building external modules for virtualbox. Everything has been reinstalled, entire system & kernel upgraded, but the same problems persist.

I want to know: Is my box a mess, or is the kernel a mess?

I tried the kernel Static Analysers and got crazy results. 'make help' lists the static analysers as
Code:
Static analysers
  checkstack      - Generate a list of stack hogs
  namespacecheck  - Name space analysis on compiled kernel
  versioncheck    - Sanity check on version.h usage
  includecheck    - Check for duplicate included header files
  export_report   - List the usages of all exported symbols
  headers_check   - Sanity check on exported headers
  headerdep       - Detect inclusion cycles in headers
  coccicheck      - Check with Coccinelle.
From the kernel source I ran each one of those static analysers in the format
Code:
make checkstack 2 > checkstack.err 1 > /dev/null
That catches errors, and dumps non erroneous output to the WOM (Write Only Memory :-). I won't drown you in detail, but look at the SIZE of these .err files which are error messages
Code:
bash-4.3# ls -lh *.err
-rw-r--r-- 1 root root    0 Jan 19 16:36 checkstack.err
-rw-r--r-- 1 root root  19K Jan 19 16:37 export_report.err
-rw-r--r-- 1 root root    0 Jan 19 16:38 headerdep.err
-rw-r--r-- 1 root root  20K Jan 19 15:28 includecheck.err
-rw-r--r-- 1 root root 141K Jan 19 17:51 namespacecheck.err
-rw-r--r-- 1 root root    0 Jan 19 17:53 versioncheck.err
make headerdep actually is the worst performer, although it doesn't show there. The output is in this format
Code:
./include/acpi/acpi.h:63: warning: recursive header inclusion
In file included from linux/mmzone.h,
                 from linux/memory_hotplug.h:4
                 from linux/mmzone.h:735 <-- here
                 from linux/topology.h:32
                 from linux/gfp.h:8
                 from linux/percpu-refcount.h:52
                 from linux/cgroup-defs.h:16
                 from linux/sched.h:61
                 from linux/kasan.h:16
                 from linux/slab.h:107
                 from acpi/platform/aclinux.h:82
                 from acpi/platform/acenv.h:174
There are 1342 instances of the word 'here' but they're in /dev/null, and I hardly be thanked for pasting them. Make headerdep produces ~1MB of output. The code to get this figure was
Code:
make headerdep |grep -c here
BTW, I don't have Coccinelle installed, so that check is pointless.

Any ideas or comparisons welcome.
 
Old 01-21-2017, 09:19 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,251

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Can nobody call this?
 
Old 01-23-2017, 11:37 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,251

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I think I have the answer. BOTH the kernel & my box are in a mess.

I say my box because I made a little progress with that. I say the kernel because it's own static analysers are saying it's a POS (Am I allowed to say that on a linux forum? :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
open source and no cost static analyzers of C Rinndalir Programming 3 08-01-2016 03:14 PM
static library and link errors Avega768 Programming 5 02-22-2012 05:48 AM
gcc errors on static, but NOT dynamic, linking MALDATA Programming 5 10-02-2008 11:20 PM
OpenBSD spewing PTR requests pingswept *BSD 1 05-18-2004 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration