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:	Wed, 20 Nov 2013 14:55:11 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	pmoore@...hat.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] cipso: simplify cipso_v4_translate() when
 !CONFIG_NETLABEL

From: Paul Moore <pmoore@...hat.com>
Date: Wed, 20 Nov 2013 14:45:19 -0500

> Looking at the original conditional:
> 
>  if ((tag_len == 0) || (opt[opt_iter + 1] > (opt_len - opt_iter))
> 
> ... and the replacement:
> 
>  if ((tag_len == 0) || (tag_len > (opt_len - opt_iter)))
> 
> ... we notice that "(opt[opt_iter + 1] > (opt_len - opt_iter))" has been 
> replaced with "(tag_len > (opt_len - opt_iter))", substituting 'tag_len' for 
> 'opt[opt_iter + 1]'.  This is acceptable because the the first statement in 
> the for loop is:
> 
>  tag_len = opt[opt_iter + 1]
> 
> ... which matches the substitution in the conditional.  I'm not sure how much 
> more explicit I can be about this change, it is really pretty minor.

Then, two things:

1) This is a cleanup, and therefore not suitable for submission right now
   because the net-next tree is closed.

2) A more suitable commit log message would have been "Don't needlessly
   recompute 'opt[opt_iter + 1]' as we already have it stored in tag_len".

   Then anyone who reads this commit message can say "yes, obviously this
   is a correct change and matches what the patch is doing"

Thanks.
--
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