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: <31581393.9071156.1643455487833.JavaMail.zimbra@uliege.be>
Date:   Sat, 29 Jan 2022 12:24:47 +0100 (CET)
From:   Justin Iurman <justin.iurman@...ege.be>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        yoshfuji@...ux-ipv6.org, dsahern@...nel.org
Subject: Re: [PATCH net-next 1/2] uapi: ioam: Insertion frequency

On Jan 29, 2022, at 2:31 AM, Jakub Kicinski kuba@...nel.org wrote:
> On Wed, 26 Jan 2022 19:46:27 +0100 Justin Iurman wrote:
>> Add the insertion frequency uapi for IOAM lwtunnels.
>> 
>> Signed-off-by: Justin Iurman <justin.iurman@...ege.be>
>> ---
>>  include/uapi/linux/ioam6_iptunnel.h | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>> 
>> diff --git a/include/uapi/linux/ioam6_iptunnel.h
>> b/include/uapi/linux/ioam6_iptunnel.h
>> index 829ffdfcacca..462758cdba14 100644
>> --- a/include/uapi/linux/ioam6_iptunnel.h
>> +++ b/include/uapi/linux/ioam6_iptunnel.h
>> @@ -30,6 +30,15 @@ enum {
>>  enum {
>>  	IOAM6_IPTUNNEL_UNSPEC,
>>  
>> +	/* Insertion frequency:
>> +	 * "k over n" packets (0 < k <= n)
>> +	 * [0.0001% ... 100%]
>> +	 */
>> +#define IOAM6_IPTUNNEL_FREQ_MIN 1
>> +#define IOAM6_IPTUNNEL_FREQ_MAX 1000000
> 
> If min is 1 why not make the value unsigned?

The atomic_t type is just a wrapper for a signed int, so I didn't want
to have to convert from signed to unsigned. I agree it'd sound better to
have unsigned here, though.

>> +	IOAM6_IPTUNNEL_FREQ_K,		/* s32 */
>> +	IOAM6_IPTUNNEL_FREQ_N,		/* s32 */
> 
> You can't insert into the middle of a uAPI enum. Binary compatibility.

Is it really the middle? I recall adding the "mode" at the top (still
below the "_UNSPEC"), which I thought was correct at that time (and had
no objection). That's why I did the same here. Should I move it to the
end, then?

>>  	/* Encap mode */
>>  	IOAM6_IPTUNNEL_MODE,		/* u8 */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ