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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Sep 2007 18:35:41 +0200 (CEST)
From:	"Indan Zupancic" <indan@....nu>
To:	"Arnd Bergmann" <arnd@...db.de>
Cc:	"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 Thu, September 27, 2007 09:00, Arnd Bergmann wrote:
> Assuming that we want to go down that road, I think you can do better with
> more evil macro magic, by using something along the lines of
>
> #define KERN_NOTICE "<5>",
>
> #define PRINTK_CONTINUED "",
>
>  #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);
>
> Then you don't have to change every single printk in the kernel, but
> only those that don't currently come with a log level. More importantly,
> you can do the conversion without a flag day, by spreading (an empty)
> PRINTK_CONTINUED in places that do need a printk without a log level.

The problem is, how do you know whether to print a continued printk or not?
It depends on the loglevel of the first printk.

So besides compile-time parsing of the source code, replacing printk with
loglevel specific alternatives (one way or the other) seems the only option.

Greetings,

Indan


-
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