Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 18 Apr 2015 03:00:25 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Format interface changes

On 2015-04-18 01:30, magnum wrote:
> We could try using it for a few helper functions though, like strzcpy()
> and strlen8().

On second thought, those two examples wont benefit at all from restrict
pointers anyway. I think it's mostly for functions involving many
pointers, like the wikipedia example:

void updatePtrs(size_t *ptrA, size_t *ptrB, size_t *val)
{
    *ptrA += *val;
    *ptrB += *val;
}

Here, assuming any or all of the pointers can be aliased, *val has to be
reloaded from memory between the two operations. That's not needed if
all three pointers are declared as restrict. I can't think of any
central "tiny change, huge gain" places in JtR where this would apply.
Things like RC4 might be candidates though.

magnum

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ