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]
Date:	Tue, 12 May 2015 16:25:07 +0800
From:	Li RongQing <roy.qing.li@...il.com>
To:	Steffen Klassert <steffen.klassert@...unet.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH][next] xfrm: optimise xfrm_policy_lookup_bytype

On Mon, May 11, 2015 at 8:06 PM, Steffen Klassert
<steffen.klassert@...unet.com> wrote:
> Please explain why it is unnecessary to continue with the
> loop here. In general a commit message should explain why
> this code is changed.
>
Ok, I will add


>> +                     break;
>
> priority is initialized with ~0U at the beginning of this function.
> What if someone has an inexact policy with priority ~0U configured?
> With your change, this policy will never match because we don't even
> try to search for it.

The original code can not handle this kind of policy whose priority is ~0U,
I will fix it when resubmit this patch.

1121         chain = &net->xfrm.policy_inexact[dir];
1122         hlist_for_each_entry(pol, chain, bydst) {
1123                 err = xfrm_policy_match(pol, fl, type, family, dir);
1124                 if (err) {
1125                         if (err == -ESRCH)
1126                                 continue;
1127                         else {
1128                                 ret = ERR_PTR(err);
1129                                 goto fail;
1130                         }
1131                 } else if (pol->priority < priority) {
1132                         ret = pol;
1133                         break;
1134                 }
1135         }
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ