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-prev] [day] [month] [year] [list]
Message-ID: <20070930203745.GB30514@lazybastard.org>
Date:	Sun, 30 Sep 2007 22:37:46 +0200
From:	Jörn Engel <joern@...fs.org>
To:	Bernd Petrovitsch <bernd@...mix.at>
Cc:	Arnd Bergmann <arnd@...db.de>, Indan Zupancic <indan@....nu>,
	Rob Landley <rob@...dley.net>,
	Michael Opdenacker <michael@...e-electrons.com>,
	linux-tiny@...enic.com,
	CE Linux Developers List <celinux-dev@...e.celinuxforum.org>,
	linux kernel <linux-kernel@...r.kernel.org>
Subject: Re: [Announce] Linux-tiny project revival

On Fri, 28 September 2007 10:39:06 +0200, Bernd Petrovitsch wrote:
> 
> If think you misunderstood:
> Say, you compile out everything of DEBUG level.
> Say, you have a continued printk() after each and every pr_debug().
> 
> Then how is the macro supposed to know (at compile-time) that the
> continued printk()  actually belongs to a DEBUG printk (and not another
> one)?

#if CONFIG_PRINTK_DOICARE >= 3
#define PRINTK_DEBUG_CONTINUED "",
#else
#define PRINTK_DEBUG_CONTINUED PRINTK_DEBUG
#endif
...

#define printk(level, str, ...) \
   do { \
     if (sizeof(level) == 1) /* continued printk */\
        actual_printk(str, __VA_ARGS__); \
     else if ((level[1] - '0') < CONFIG_PRINTK_DOICARE) \
       actual_printk(level str, __VA_ARGS__); \
   } while(0);

Now you can mark a continued KERN_ERR call as such.  And depending on
CONFIG_PRINTK_DOICARE it will either be printed as always or turned into
a stand-alone printk() that gets optimized away.  Do the same for all
the other levels.

Open question remains: do we want to go down that road?  I have no idea.

Jörn

-- 
I've never met a human being who would want to read 17,000 pages of
documentation, and if there was, I'd kill him to get him out of the
gene pool.
-- Joseph Costello
-
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