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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 9 Nov 2016 13:19:02 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Andrei Vagin <avagin@...nvz.org>
Cc:     Linux Kernel <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] proc: optimize render_sigset_t()

On Wed, Nov 9, 2016 at 12:37 AM, Andrei Vagin <avagin@...nvz.org> wrote:

> @@ -245,10 +247,13 @@ void render_sigset_t(struct seq_file *m, const char *header,
>                 if (sigismember(set, i+2)) x |= 2;
>                 if (sigismember(set, i+3)) x |= 4;
>                 if (sigismember(set, i+4)) x |= 8;
> -               seq_printf(m, "%x", x);
> +               buf[j++] = hex_asc[x];
>         } while (i >= 4);
>
> -       seq_putc(m, '\n');
> +       buf[j++] = '\n';
> +       buf[j++] = 0;
> +
> +       seq_puts(m, buf);

seq_write() should be used to avoid re-reading in strlen().
Anyway I suspect bulk conversion SIMD-style will still be faster.


     Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ