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: <1262915005.10429.92.camel@Joe-Laptop.home>
Date:	Thu, 07 Jan 2010 17:43:25 -0800
From:	Joe Perches <joe@...ches.com>
To:	Simon Horman <horms@...ge.net.au>
Cc:	H Hartley Sweeten <hartleys@...ionengravers.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH] drivers/net/skfp/skfddi.c: use %pMF to show MAC address

On Fri, 2010-01-08 at 11:02 +1100, Simon Horman wrote:
> On Thu, Jan 07, 2010 at 04:27:46PM -0700, H Hartley Sweeten wrote:
> > Use the %pMF kernel extension to display the MAC address.
> > The address will still be displayed in the FDDI Canonical format.

> I'm not sure that it matters, but prior to this patch
> the address was displayed with octets delimited by spaces,
> and afterwards its delimited by hyphens. So perhaps the comment
> should read:
> 
> The address will now be displayed in the FDDI Canonical format.

And it probably wasn't bit reversed.

> > diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
> > index db216a7..1f9698c 100644
> > --- a/drivers/net/skfp/skfddi.c
> > +++ b/drivers/net/skfp/skfddi.c
> > @@ -435,13 +435,7 @@ static  int skfp_driver_init(struct net_device *dev)
> >  		goto fail;
> >  	}
> >  	read_address(smc, NULL);
> > -	pr_debug(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n",
> > -	       smc->hw.fddi_canon_addr.a[0],
> > -	       smc->hw.fddi_canon_addr.a[1],
> > -	       smc->hw.fddi_canon_addr.a[2],
> > -	       smc->hw.fddi_canon_addr.a[3],
> > -	       smc->hw.fddi_canon_addr.a[4],
> > -	       smc->hw.fddi_canon_addr.a[5]);
> > +	pr_debug(KERN_INFO "HW-Addr: %pMF\n", smc->hw.fddi_canon_addr.a);

Is fddi_canon_addr already bit reversed?
It's memcpy'd to dev->dev_addr later, so probably not.
 
> >  	smt_reset_defaults(smc, 0);
> > @@ -890,15 +884,8 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev)
> >  							  (struct fddi_addr *)dmi->dmi_addr, 
> >  							  1);
> >  
> > -					pr_debug(KERN_INFO "ENABLE MC ADDRESS:");
> > -					pr_debug(" %02x %02x %02x ",
> > -					       dmi->dmi_addr[0],
> > -					       dmi->dmi_addr[1],
> > -					       dmi->dmi_addr[2]);
> > -					pr_debug("%02x %02x %02x\n",
> > -					       dmi->dmi_addr[3],
> > -					       dmi->dmi_addr[4],
> > -					       dmi->dmi_addr[5]);
> > +					pr_debug(KERN_INFO "ENABLE MC ADDRESS: %pMF\n",
> > +						dmi->dmi_addr);

I think you want %pM here, not the bit-reversed %pMF form.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ