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: <Z2GDt+5piTRsumVd@debian>
Date: Tue, 17 Dec 2024 14:59:19 +0100
From: Guillaume Nault <gnault@...hat.com>
To: Ido Schimmel <idosch@...dia.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
	pabeni@...hat.com, edumazet@...gle.com, dsahern@...nel.org,
	donald.hunter@...il.com, horms@...nel.org, rostedt@...dmis.org,
	mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
	petrm@...dia.com
Subject: Re: [PATCH net-next 3/9] ipv6: fib_rules: Add flow label support

On Mon, Dec 16, 2024 at 07:11:55PM +0200, Ido Schimmel wrote:
> @@ -332,6 +334,9 @@ INDIRECT_CALLABLE_SCOPE int fib6_rule_match(struct fib_rule *rule,
>  	if (r->dscp && r->dscp != ip6_dscp(fl6->flowlabel))
>  		return 0;
>  
> +	if ((r->flowlabel ^ flowi6_get_flowlabel(fl6)) & r->flowlabel_mask)
> +		return 0;
> +

Personally, I'd find the following form easier to read:
+	if ((flowi6_get_flowlabel(fl6) & r->flowlabel_mask) != r->flowlabel)
+		return 0;

Does GCC produce better code with the xor form?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ