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]
Message-ID: <20120820152611.GB28039@kroah.com>
Date:	Mon, 20 Aug 2012 08:26:11 -0700
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:	linux-kernel@...r.kernel.org, Jim Cromie <jim.cromie@...il.com>,
	Jason Baron <jbaron@...hat.com>,
	Kay Sievers <kay.sievers@...y.org>,
	Joe Perches <joe@...ches.com>
Subject: Re: [PATCH] drivers-core: beware dev_printk() from printing nonsense

On Mon, Aug 20, 2012 at 12:33:37PM +0200, Sebastian Andrzej Siewior wrote:
> on boot I saw plenty of rubbish like:
> 
> |ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
> |pci_root PNP0A03:00: Force enabled HPET at 0x%lx
> |host bridge window [io  0x0000-0x0cf7] (ignored)
> |pci_root PNP0A03:00: Force enabled HPET at 0x%lx
> |host bridge window [io  0x0d00-0xffff] (ignored)
> |pci_root PNP0A03:00: Force enabled HPET at 0x%lx
> |ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
> |virtio-pci 0000:00:05.0: Force enabled HPET at 0x%lx
> 
> First I wonder myself why the kernel Force enables more than one HPET
> and why the address isn't printed. Then I wasn't sure why virtio-pci
> does the same thing.
> As it turns out commit af7f2158fdee ("drivers-core: make structured
> logging play nice with dynamic-debug") has probably an off by one error.
> Since commit 314ba3520 ("printk: add kern_levels.h to make KERN_<LEVEL>
> available for asm use") the whole shrunk by one byte. And for some
> reason the compiler put the HPET string just after one of the kernel log
> levels so level[3] was always true.
> 
> This should make the rubish go away, I am not sure if the dynamic debug
> is still working. Jim could you please try?
> 
> Cc: Jim Cromie <jim.cromie@...il.com>
> Cc: Jason Baron <jbaron@...hat.com>
> Cc: stable <stable@...r.kernel.org>
> Cc: Kay Sievers <kay.sievers@...y.org>
> Cc: Joe Perches <joe@...ches.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
>  drivers/base/core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index cdd01c5..5a864c3 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1912,7 +1912,7 @@ int __dev_printk(const char *level, const struct device *dev,
>  				    "DEVICE=+%s:%s", subsys, dev_name(dev));
>  	}
>  skip:
> -	if (level[3])
> +	if (level[sizeof(KERN_ERR) - 1])

This has already been fixed in my driver-core tree and will go to Linus
in a few hours.

thanks,

greg k-h
--
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