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:	Tue, 27 Sep 2011 17:13:27 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Johannes Thumshirn <morbidrsa@...glemail.com>
Cc:	gregkh@...e.de, abbotti@....co.uk, fmhess@...rs.sourceforge.net,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: comedi: Added log subjects to printk()s in
 pcmmio

On Sun, Sep 25, 2011 at 06:49:12AM +0200, Johannes Thumshirn wrote:
> -	printk("comedi%d: %s: io: %lx ", dev->minor, driver.driver_name,
> +	printk(KERN_INFO "comedi%d: %s: io: %lx ", dev->minor, driver.driver_name,
>  	       iobase);
>  
>  	dev->iobase = iobase;
> @@ -379,7 +379,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
>  	if (!iobase || !request_region(iobase,
>  				       thisboard->total_iosize,
>  				       driver.driver_name)) {
> -		printk("I/O port conflict\n");
> +		printk(KERN_ERR "I/O port conflict\n");

The KERN_ERR stuff is only supposed to be used at the start of the
line of output.  (The previous KERN_INFO printk didn't have a new
line at the end).

All this code needs to be rewritten so each printk() only prints
one line.  Otherwise you could get messages printed out in the
middle of other messages and it looks like crap.

This code is trickier than it looks.  Quite a few newbies have run
into trouble here.  My advice is to start with something that looks
tricky so at least if you mess up, you were doing something awesome.
:)

regards,
dan carpenter

--
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