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>] [day] [month] [year] [list]
Date:	Thu, 28 Dec 2006 17:07:36 -0300
From:	"Horst H. von Brand" <vonbrand@....utfsm.cl>
To:	"Daniel Marjamäki" <daniel.marjamaki@...il.com>
cc:	linux-kernel@...r.kernel.org
Subject: Re: Want comments regarding patch 

Daniel Marjamäki <daniel.marjamaki@...il.com> wrote:
> I sent a patch with this content:
> 
> -       for (i = 0; i < MAX_PIRQS; i++)
> -               pirq_entries[i] = -1;
> +       memset(pirq_entries, -1, sizeof(pirq_entries));
> 
> I'd like to know if you have any comments to this change. It was of
> course my intention to make the code shorter, simpler and faster.

- Is this code in some fast path? If so, I'd set up a constant array that
  is memcpy()'d over the variable (or used to initialize it) as needed.
- If not, what is the point? Shaving off a few bytes/cycles and paying for
  that with massive developer confusion? What if the constant changes and
  is -2, or 1, tomorrow?
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Casilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ