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: <063D6719AE5E284EB5DD2968C1650D6D1CA033CC@AcuExch.aculab.com>
Date:	Fri, 5 Dec 2014 09:57:43 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Scott Feldman' <sfeldma@...il.com>, Jiri Pirko <jiri@...nulli.us>
CC:	Netdev <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: RE: [patch net-next v2 1/2] rocker: introduce be put/get variants
 and use it when appropriate

From: Scott Feldman
> Signed-off-by: Scott Feldman <sfeldma@...il.com>
> 
> On Wed, Dec 3, 2014 at 5:14 AM, Jiri Pirko <jiri@...nulli.us> wrote:
> > This kills the sparse warnings.
> >
> > Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> > ---
> > v1->v2:
> > -no change
> > ---
> >  drivers/net/ethernet/rocker/rocker.c | 79 ++++++++++++++++++++++--------------
> >  1 file changed, 48 insertions(+), 31 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
> > index fded127..4b060fb 100644
> > --- a/drivers/net/ethernet/rocker/rocker.c
> > +++ b/drivers/net/ethernet/rocker/rocker.c
> > @@ -648,6 +648,11 @@ static u16 rocker_tlv_get_u16(const struct rocker_tlv *tlv)
> >         return *(u16 *) rocker_tlv_data(tlv);
> >  }
> >
> > +static __be16 rocker_tlv_get_be16(const struct rocker_tlv *tlv)
> > +{
> > +       return *(__be16 *) rocker_tlv_data(tlv);
> > +}

*(int_type *)foo always rings alarm bells.....

That looks dubious on systems where misaligned transfers fault.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ