Re: [PATCHv2 ipsec] xfrm: fix a warning in xfrm_policy_insert_list

2020-06-11 Thread Tobias Brunner
Hi Xin, > For 'new/update/del', we should do an exact match with > "mark.v == pol->mark.v && mark.m == pol->mark.m", as these are MSGs to > manage the policies, every policy should be able to be matched. Agreed, using an exact match for mark/mask would probably make the most sense here. > But fo

Re: [PATCHv2 ipsec] xfrm: fix a warning in xfrm_policy_insert_list

2020-06-11 Thread Xin Long
On Thu, Jun 11, 2020 at 12:32 AM Xin Long wrote: > > On Tue, Jun 9, 2020 at 10:18 PM Tobias Brunner wrote: > > > > Hi Xin, > > > > >> I guess we could workaround this issue in strongSwan by installing > > >> policies that share the same mark and selector with the same priority, > > >> so only one

Re: [PATCHv2 ipsec] xfrm: fix a warning in xfrm_policy_insert_list

2020-06-10 Thread Xin Long
On Tue, Jun 9, 2020 at 10:18 PM Tobias Brunner wrote: > > Hi Xin, > > >> I guess we could workaround this issue in strongSwan by installing > >> policies that share the same mark and selector with the same priority, > >> so only one instance is ever installed in the kernel. But the inability > >>

Re: [PATCHv2 ipsec] xfrm: fix a warning in xfrm_policy_insert_list

2020-06-09 Thread Tobias Brunner
Hi Xin, >> I guess we could workaround this issue in strongSwan by installing >> policies that share the same mark and selector with the same priority, >> so only one instance is ever installed in the kernel. But the inability >> to address the exact policy when querying/deleting still looks like

Re: [PATCHv2 ipsec] xfrm: fix a warning in xfrm_policy_insert_list

2020-06-09 Thread Xin Long
a, . On Mon, Jun 8, 2020 at 8:02 PM Tobias Brunner wrote: > > Hi Steffen, Xin, > > This change could be problematic. Actually, it's not really this one > but the original one that causes the issue: > > Fixes: 7cb8a93968e3 ("xfrm: Allow inserting policies with matching mark and > > different pr

Re: [PATCHv2 ipsec] xfrm: fix a warning in xfrm_policy_insert_list

2020-06-08 Thread Tobias Brunner
Hi Steffen, Xin, This change could be problematic. Actually, it's not really this one but the original one that causes the issue: > Fixes: 7cb8a93968e3 ("xfrm: Allow inserting policies with matching mark and > different priorities") However, because the code in xfrm_policy_mark_match() treated

[PATCH 14/15] xfrm: fix a warning in xfrm_policy_insert_list

2020-05-29 Thread Steffen Klassert
From: Xin Long This waring can be triggered simply by: # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \ priority 1 mark 0 mask 0x10 #[1] # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \ priority 2 mark 0 mask 0x1 #[2] # ip xfrm policy

Re: [PATCHv2 ipsec] xfrm: fix a warning in xfrm_policy_insert_list

2020-05-29 Thread Steffen Klassert
On Mon, May 25, 2020 at 01:53:37PM +0800, Xin Long wrote: > This waring can be triggered simply by: > > # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \ > priority 1 mark 0 mask 0x10 #[1] > # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \ >

[PATCHv2 ipsec] xfrm: fix a warning in xfrm_policy_insert_list

2020-05-24 Thread Xin Long
This waring can be triggered simply by: # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \ priority 1 mark 0 mask 0x10 #[1] # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \ priority 2 mark 0 mask 0x1 #[2] # ip xfrm policy update src 192.16

WARNING in xfrm_policy_insert_list

2019-01-04 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:c5ee066333eb ipv6: Consider sk_bound_dev_if when binding a.. git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=11e796d740 kernel config: https://syzkaller.appspot.com/x/.config?x=b03c5892bb940c76 dashboa