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:	Sat, 26 Apr 2014 12:24:00 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	reksio@...term.pl
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] Driver for Beckhoff CX5020 EtherCAT master module.

From: Darek Marcinkiewicz <reksio@...term.pl>
Date: Thu, 24 Apr 2014 22:46:15 +0200

> +struct desc_header {
> +	u32 next:24;
> +	u32 reserved1:7;
> +	u32 next_valid:1;
> +	u32 recv:1;
> +	u32 reserved2:31;
> +	u16 len:12;
> +	u16 reserved3:4;
> +	u16 port;
> +	u32 reserved4;
> +	u64 timestamp;
> +};
> +
> +struct rx_desc {
> +	struct desc_header header;
> +#define RX_PAYLOAD_SIZE		0x7e8
> +	u8 data[RX_PAYLOAD_SIZE];
> +};
> +
> +struct tx_header {
> +	u16 length;
> +	u8 port0:1;
> +	u8 port1:1;
> +	u8 reserved1:6;
> +	u8 ts_enable:1;
> +	u8 reserved2:7;
> +	u32 sent:1;
> +	u32 reserved3:31;
> +	u64 timestamp;
> +};

All of these descriptor structures need to be properly annotated using
endianness types, and their fields accessed using proper endian
translating interfaces such as le32_to_cpu() et al.
--
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