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:	Wed, 25 May 2016 13:21:59 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Xin Long <lucien.xin@...il.com>
Cc:	network dev <netdev@...r.kernel.org>, linux-sctp@...r.kernel.org,
	davem@...emloft.net,
	Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
	Vlad Yasevich <vyasevich@...il.com>, daniel@...earbox.net,
	phil@....cc
Subject: Re: [PATCH net] sctp: sctp_diag should dump sctp socket type

On Thu, 2016-05-26 at 03:14 +0800, Xin Long wrote:
> Now we cannot distinguish that one sk is a udp or sctp style when
> we use ss to dump sctp_info. it's necessary to dump it as well.
> 
> For sctp_diag, ss support is not officially available, thus there
> are no official users of this yet, so we can add this field in the
> middle of sctp_info without breaking user API.
> 
> Signed-off-by: Xin Long <lucien.xin@...il.com>
> ---
>  include/linux/sctp.h | 1 +
>  net/sctp/socket.c    | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/include/linux/sctp.h b/include/linux/sctp.h
> index dacb5e7..3a406af 100644
> --- a/include/linux/sctp.h
> +++ b/include/linux/sctp.h
> @@ -761,6 +761,7 @@ struct sctp_info {
>  	__u32	sctpi_s_autoclose;
>  	__u32	sctpi_s_adaptation_ind;
>  	__u32	sctpi_s_pd_point;
> +	__u32	sctpi_s_type;

Well, this is also adding a 4-byte padding at the end of the structure.


Basically, because of the 8-byte alignment cause by the __u64 fields,
adding a single __u32 adds a padding.

Don't you have another u32 info you'd like to publish ?



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ