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: <200609281256.23175.vda.linux@googlemail.com>
Date:	Thu, 28 Sep 2006 12:56:23 +0200
From:	Denis Vlasenko <vda.linux@...glemail.com>
To:	Randy Dunlap <rdunlap@...otime.net>
Cc:	Joe Perches <joe@...ches.com>, Greg KH <greg@...ah.com>,
	Jesper Juhl <jesper.juhl@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Tiny error in printk output for clocksource : a3:<6>Time: acpi_pm clocksource has been installed.

On Wednesday 27 September 2006 07:17, Randy Dunlap wrote:
> On Tue, 26 Sep 2006 22:10:43 -0700 Joe Perches wrote:
> 
> > On Tue, 2006-09-26 at 21:56 -0700, Randy Dunlap wrote:
> > > > Nope, that's part of the NIC's MAC address.  It was split up.
> > > 
> > > Sorry.  In this case, it was via-rhine.c:
> > > 
> > > 	for (i = 0; i < 5; i++)
> > > 		printk("%2.2x:", dev->dev_addr[i]);
> > > 	printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], pdev->irq);
> > > 
> > > so it does break the printk()s up itself.
> > 
> > Changing all of those MAC address printks to a single function
> > could prevent this.
> > 
> > http://www.uwsg.iu.edu/hypermail/linux/net/0602.1/0002.html
> 
> True enough.  Thanks for the patch.
> However, in this case, the single-printed MAC address still needs
> a \n, with the IRQ on a separate line (wasting vertical screen space),
> or it needs a custom printk() that is all done at one time.

Custom print_mac worked very nice for me in acx driver.
In order to accomodate arbitrary text before/after mac addres,
I did it this way:

#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
#define MAC(bytevector) \
        ((unsigned char *)bytevector)[0], \
        ((unsigned char *)bytevector)[1], \
        ((unsigned char *)bytevector)[2], \
        ((unsigned char *)bytevector)[3], \
        ((unsigned char *)bytevector)[4], \
        ((unsigned char *)bytevector)[5]

void print_mac(const char *head, const unsigned char *mac, const char *tail)
{
        printk("%s"MACSTR"%s", head, MAC(mac), tail);
}


Usage: print_mac("adev->bssid: ", adev->bssid, "\n");
--
vda
-
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