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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 17 Feb 2020 14:02:10 -0500 From: Gabriel Krisman Bertazi <krisman@...labora.com> To: Daniel Rosenberg <drosen@...gle.com> Cc: Eric Biggers <ebiggers@...nel.org>, "Theodore Ts'o" <tytso@....edu>, linux-ext4@...r.kernel.org, Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>, linux-f2fs-devel@...ts.sourceforge.net, linux-fscrypt@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk>, Richard Weinberger <richard@....at>, linux-mtd@...ts.infradead.org, Andreas Dilger <adilger.kernel@...ger.ca>, Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org, kernel-team@...roid.com Subject: Re: [PATCH v7 1/8] unicode: Add utf8_casefold_iter Daniel Rosenberg <drosen@...gle.com> writes: > On Tue, Feb 11, 2020 at 7:38 PM Eric Biggers <ebiggers@...nel.org> wrote: >> >> Indirect function calls are expensive these days for various reasons, including >> Spectre mitigations and CFI. Are you sure it's okay from a performance >> perspective to make an indirect call for every byte of the pathname? >> >> > +typedef int (*utf8_itr_actor_t)(struct utf8_itr_context *, int byte, int pos); >> >> The byte argument probably should be 'u8', to avoid confusion about whether it's >> a byte or a Unicode codepoint. >> just for the record, we use int utf8byte because it can fail error codes, but that is not the case here. It should be u8. > > Gabriel, what do you think here? I could change it to either exposing > the things necessary to do the hashing in libfs, or instead of the > general purpose iterator, just have a hash function inside of unicode > that will compute the hash given a seed value. Sorry for the delay, I'm away on a long vacation and intentionally staying away from my laptop :) Eric has a very good point, if not prohibitively, it is unnecessarily expensive for a hot path. Why not expose utf8ncursor and utf8byte to libfs and implement the hash in libfs? -- Gabriel Krisman Bertazi
Powered by blists - more mailing lists