lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1379459317-13046-1-git-send-email-daniel.santos@pobox.com>
Date:	Tue, 17 Sep 2013 18:08:32 -0500
From:	danielfsantos@....net
To:	linux-kbuild <linux-kbuild@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Michal Marek <mmarek@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	David Howells <dhowells@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	George Spelvin <linux@...izon.com>
Subject: [PATCH 0/5] Preliminary: Add error names & descrptions to printks


This is a preliminary patch set as the root Makefile changes are not yet
correct.

Summary

Typically, we don't care about error messages or names in the kernel because
userspace will manage that.  But sometimes we need to output an error number
to printks and that creates a situation where a user, system admistrator or
developer must find an error number reference to figure out what went wrong
with a particular driver or whatever.  This patch adds two alternatives at
increasing memory costs:

1. print the number in addition to the name for 2k extra or
2. print the number, name and description for 6k extra.

This is fairly low cost for the person who wants to make life just a little
bit easier. The format of each is respectively the same as the following:

  printk("%d (%s)", err, err_name);
  printk("%d (%s: %s)", err, err_name, err_desc);

Theory

Error messages aren't printed often, so this data and code is designed to be
compact at the expense of speed.  Rather than using an array of strings that
would require both the text and a pointer to that text, we just cram a range
of error names or descriptions into a single string with null character
delimiters.  When we want to retrieve a string, we just iterate through that
string and count nulls.  This is slow, but it keeps it compact. (If this
becomes a bottleneck then something else is seriously wrong! :)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ