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]
Message-ID: <CA+55aFzVrAQnmt7a_SKqOVyHrY55_uRP1yL4NGAXspeee6ZkRQ@mail.gmail.com>
Date:	Tue, 10 Dec 2013 12:08:20 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Will Deacon <will.deacon@....com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH 2/2] word-at-a-time: provide generic big-endian
 zero_bytemask implementation

Hmm. Did you try to time this?

Also, I really have #ifdef's in code, and I think we'd be better off
just exposing a function that does this

+#ifdef __BIG_ENDIAN
+       mask = ~(~0ul >> tcount*8);
+#else
        mask = ~(~0ul << tcount*8);
+#endif

thing. I think it would logically go together with zero_bytemask(),
call it something like "bytemask_from_count()" or something. Hmm? It's
basically just the reverse of "count_masked_bytes()", which we also
have an abstraction for.

So the #ifdef really looks out of place for me. We've generated all
these nice abstractions for all the other mask handling, and then you
add that ugly ifdef for this case.

                 Linus
--
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