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: <81eadf5e-7d2b-b7f8-513f-2212272f5897@6wind.com>
Date:   Fri, 19 Nov 2021 18:31:18 +0100
From:   Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     steffen.klassert@...unet.com, herbert@...dor.apana.org.au,
        antony.antony@...unet.com, davem@...emloft.net, kuba@...nel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next] xfrm: rework default policy structure

Le 19/11/2021 à 16:41, Leon Romanovsky a écrit :
[snip]
>> What about:
>>
>> static inline bool __xfrm_check_nopolicy(struct net *net, struct sk_buff *skb,
>>                                          int dir)
>> {
>>         if (!net->xfrm.policy_count[dir] && !secpath_exists(skb))
>>                 return net->xfrm.policy_default[dir] == XFRM_USERPOLICY_ACCEPT;
>>
>>         return false;
>> }
> 
> It is much better, just extra "!" is not in place.
Ok, I will send a v2 with that.

> if (!net->xfrm.policy_count[dir] ... -> if (net->xfrm.policy_count[dir] ...
Hmm, are you sure?
If "there is no policy configured" and "there is no secpath"
  then "return the default policy"

The original statement is:
       if (xfrm_default_allow(net, dir))
               return (!net->xfrm.policy_count[dir] && !secpath_exists(skb)) ||
                      (skb_dst(skb) && (skb_dst(skb)->flags & DST_NOPOLICY)) ||
                      __xfrm_policy_check(sk, ndir, skb, family);

Thank you,
Nicolas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ