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:	Mon, 15 Aug 2016 16:38:36 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Stefan Hajnoczi' <stefanha@...hat.com>,
	"ggarcia@...a.uab.cat" <ggarcia@...a.uab.cat>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"jhansen@...are.com" <jhansen@...are.com>,
	"mst@...hat.com" <mst@...hat.com>
Subject: RE: [PATCH 2/3] vsockmon: Add vsockmon device.

From: Stefan Hajnoczi
> Sent: 10 August 2016 12:52
> On Mon, Aug 08, 2016 at 06:14:41PM +0200, ggarcia@...a.uab.cat wrote:
> > diff --git a/include/uapi/linux/vsockmon.h b/include/uapi/linux/vsockmon.h
> > new file mode 100644
> > index 0000000..739b4bf
> > --- /dev/null
> > +++ b/include/uapi/linux/vsockmon.h
> > @@ -0,0 +1,35 @@
> > +#ifndef _UAPI_VSOCKMON_H
> > +#define _UAPI_VSOCKMON_H
> > +
> > +#include <linux/virtio_vsock.h>
> > +
> > +/* Structure of packets received trought the vsockmon device. */
> > +
> > +struct af_vsockmon_hdr {
> > +	__le64 src_cid;
> > +	__le64 dst_cid;
> > +	__le32 src_port;
> > +	__le32 dst_port;
> > +	__le16 op;			/* enum af_vsockmon_op */
> > +	__le16 t;			/* enum af_vosckmon_t */
> > +	__le16 len;			/* sizeof(t_hdr) */
> > +	union {
> > +		struct virtio_vsock_hdr virtio_hdr;
> > +	} t_hdr;
> > +} __attribute__((packed));
...

Gah, another 'packed' structure.
Have you looked at the amount of code the sparc64 compiler generates
to access the structure members??

You really want to add another 16bit field and enforce 64bit alignment
on the header and all data blocks.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ