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: <m2cytg6zfr.fsf@ja.int.chopps.org>
Date: Thu, 01 Feb 2024 09:15:33 -0500
From: Christian Hopps <chopps@...pps.org>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: Christian Hopps <chopps@...pps.org>, devel@...ux-ipsec.org, Steffen
 Klassert <steffen.klassert@...unet.com>, netdev@...r.kernel.org, Christian
 Hopps <chopps@...n.net>
Subject: Re: [RFC ipsec-next v2 2/8] iptfs: uapi: ip: add ip_tfs_*_hdr
 packet formats


Sabrina Dubroca <sd@...asysnail.net> writes:

> 2023-11-12, 22:52:13 -0500, Christian Hopps wrote:
>> From: Christian Hopps <chopps@...n.net>
>>
>> Add the on-wire basic and congestion-control IP-TFS packet headers.
>>
>> Signed-off-by: Christian Hopps <chopps@...n.net>
>> ---
>>  include/uapi/linux/ip.h | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h
>> index 283dec7e3645..cc83878ecf08 100644
>> --- a/include/uapi/linux/ip.h
>> +++ b/include/uapi/linux/ip.h
>> @@ -137,6 +137,23 @@ struct ip_beet_phdr {
>>  	__u8 reserved;
>>  };
>>
>> +struct ip_iptfs_hdr {
>> +	__u8 subtype;		/* 0*: basic, 1: CC */
>> +	__u8 flags;
>> +	__be16 block_offset;
>> +};
>> +
>> +struct ip_iptfs_cc_hdr {
>> +	__u8 subtype;		/* 0: basic, 1*: CC */
>> +	__u8 flags;
>> +	__be16 block_offset;
>> +	__be32 loss_rate;
>> +	__u8 rtt_and_adelay1[4];
>> +	__u8 adelay2_and_xdelay[4];
>
> Given how the fields are split, wouldn't it be more convenient to have
> a single __be64, rather than reading some bits from multiple __u8?

Changed this to __be64.


>> +	__be32 tval;
>> +	__be32 techo;
>> +};
>
> I don't think these need to be part of uapi. Can we move them to
> include/net/iptfs.h (or possibly net/xfrm/xfrm_iptfs.c)? It would also
> make more sense to have them near the definitions for
> IPTFS_SUBTYPE_*. And it would be easier to change how we split and
> name fields for kernel consumption if we're not stuck with whatever we
> put in uapi.

I saw this also as the place documenting the packet format. Userland can have raw packets delivered to them... Mostly though I was following the pattern that existed already.

Thanks,
Chris.


Download attachment "signature.asc" of type "application/pgp-signature" (858 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ