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] [day] [month] [year] [list]
Message-ID: <CAJC2YLb+YM11jzWLVTea6gEa=Ou2rdJC1rY9TbK+yOpAfyWFyg@mail.gmail.com>
Date:   Thu, 13 Sep 2018 22:44:56 +0300
From:   Eugene Korenevsky <ekorenevsky@...il.com>
To:     David.Laight@...lab.com
Cc:     Davidlohr Bueso <dave@...olabs.net>, linux-efi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>
Subject: Re: [PATCH v3] efi: take size of partition entry from GPT header

> > Please rearrange this like:
> >
> >        for (i = 0; i < le32_to_cpu(gpt->num_partition_entries) &&
> >                             i < state->limit-1; i++)
>
> Better still cache le32_to_cpu(gpt->num_partition_entries) to a local
> so that it only has to be calculated once (even if it gets spilled
> to the stack).
> It can be bounded by state->limit-1 at the same time.

This is block I/O, slow path. No need for such micro optimizations here.
GCC is capable to do such optimizations automatically, and it does as
I can see from disassembly.
Anyway this would be a subject for another patch.

-- 
Eugene

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ