From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68A88C2BA83 for ; Wed, 12 Feb 2020 03:38:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40C8720842 for ; Wed, 12 Feb 2020 03:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581478688; bh=QFEFG/81Rfdx+DhaJa330Iy0plXtvuXYAYlLrbnAw4s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=k/Mjb/zZCUt94xzH8TJ1Hvhl4uJXkDZcPxps9F/IZtZ58pBybFdR5yv8f5zW6ZdiR X97Z8g9H5NFJyt7sLrZU54aVXYbHcT5eFbhbpwRxOS3bflK3/+m6MSMsSbpwGjV6bc bJubtObJTCjHAKe9c0+ol5gfuGSKVP585XVvgT4s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727897AbgBLDiF (ORCPT ); Tue, 11 Feb 2020 22:38:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:38648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727695AbgBLDiF (ORCPT ); Tue, 11 Feb 2020 22:38:05 -0500 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D8E112073C; Wed, 12 Feb 2020 03:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581478684; bh=QFEFG/81Rfdx+DhaJa330Iy0plXtvuXYAYlLrbnAw4s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kgLuYeSFpKxnDdxa83uM8r7H8S2iSSVhydJQbgl1WskDbn0S35JXuXY6oYMb6AFqU HxO5QSmEbAmJQYLuF8FimrMwI0rN+5dYv0mjVwfxsOCEj+bKApbx/sRGflnZL6TTxF hsjxh+dI86q2CbBRmKMiAXqhZqvYy14nr51t/CqE= Date: Tue, 11 Feb 2020 19:38:00 -0800 From: Eric Biggers To: Daniel Rosenberg Cc: Theodore Ts'o , linux-ext4@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, Alexander Viro , Richard Weinberger , linux-mtd@lists.infradead.org, Andreas Dilger , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Gabriel Krisman Bertazi , kernel-team@android.com Subject: Re: [PATCH v7 1/8] unicode: Add utf8_casefold_iter Message-ID: <20200212033800.GC870@sol.localdomain> References: <20200208013552.241832-1-drosen@google.com> <20200208013552.241832-2-drosen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200208013552.241832-2-drosen@google.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Feb 07, 2020 at 05:35:45PM -0800, Daniel Rosenberg wrote: > This function will allow other uses of unicode to act upon a casefolded > string without needing to allocate their own copy of one. > > The actor function can return an nonzero value to exit early. > > Signed-off-by: Daniel Rosenberg > --- > fs/unicode/utf8-core.c | 25 ++++++++++++++++++++++++- > include/linux/unicode.h | 10 ++++++++++ > 2 files changed, 34 insertions(+), 1 deletion(-) > > diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c > index 2a878b739115d..db050bf59a32b 100644 > --- a/fs/unicode/utf8-core.c > +++ b/fs/unicode/utf8-core.c > @@ -122,9 +122,32 @@ int utf8_casefold(const struct unicode_map *um, const struct qstr *str, > } > return -EINVAL; > } > - > EXPORT_SYMBOL(utf8_casefold); > > +int utf8_casefold_iter(const struct unicode_map *um, const struct qstr *str, > + struct utf8_itr_context *ctx) > +{ > + const struct utf8data *data = utf8nfdicf(um->version); > + struct utf8cursor cur; > + int c; > + int res = 0; > + int pos = 0; > + > + if (utf8ncursor(&cur, data, str->name, str->len) < 0) > + return -EINVAL; > + > + while ((c = utf8byte(&cur))) { > + if (c < 0) > + return c; > + res = ctx->actor(ctx, c, pos); > + pos++; > + if (res) > + return res; > + } > + return res; > +} > +EXPORT_SYMBOL(utf8_casefold_iter); 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. - Eric From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D004BC2BA83 for ; Wed, 12 Feb 2020 03:38:33 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F37A2073C for ; Wed, 12 Feb 2020 03:38:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="P4Ld1gZQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="a6a4VzgS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="kgLuYeSF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F37A2073C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1j1irA-0003CM-6q; Wed, 12 Feb 2020 03:38:32 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1j1ir4-0003C7-V8 for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Feb 2020 03:38:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jqjp8DR9BpSBkCVT4AyTGBZkwOJQhZg/XHWI/DKBslQ=; b=P4Ld1gZQR5kWEDr5oFIoNMykvJ +K6uELaxej4hGr8gc60JeGNYprgWTGZ6DQm/FelnqR6rZdPosYrUDNEcCylgU8G9xA27+VyiEvOhJ hjcVADtVzBG1pO1ynHtjDmNt8o8v6qTy45ysMehwQWyBWWblsByQfs2yIrtcz7RhQC5A=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=jqjp8DR9BpSBkCVT4AyTGBZkwOJQhZg/XHWI/DKBslQ=; b=a6a4VzgSLhZs3FGhc4vQJMj5fX w+BZGXxK7EojGtVb7zDMhQ/hEF5NCIliM8QzQYSu5o8nDnsMKFmQyMWSqwFUVgWBuOiZqQNq6C8Fr Ay9oKZ3MrZDV5wzsDbmuOMj2x0PAKpa2h83Ce1oxRFdVLjtLN/z16vXMdP4W8kO49lso=; Received: from [198.145.29.99] (helo=mail.kernel.org) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1j1iqy-0015rx-0C for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Feb 2020 03:38:26 +0000 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D8E112073C; Wed, 12 Feb 2020 03:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581478684; bh=QFEFG/81Rfdx+DhaJa330Iy0plXtvuXYAYlLrbnAw4s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kgLuYeSFpKxnDdxa83uM8r7H8S2iSSVhydJQbgl1WskDbn0S35JXuXY6oYMb6AFqU HxO5QSmEbAmJQYLuF8FimrMwI0rN+5dYv0mjVwfxsOCEj+bKApbx/sRGflnZL6TTxF hsjxh+dI86q2CbBRmKMiAXqhZqvYy14nr51t/CqE= Date: Tue, 11 Feb 2020 19:38:00 -0800 From: Eric Biggers To: Daniel Rosenberg Message-ID: <20200212033800.GC870@sol.localdomain> References: <20200208013552.241832-1-drosen@google.com> <20200208013552.241832-2-drosen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200208013552.241832-2-drosen@google.com> X-Headers-End: 1j1iqy-0015rx-0C Subject: Re: [f2fs-dev] [PATCH v7 1/8] unicode: Add utf8_casefold_iter X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-team@android.com, Theodore Ts'o , Jonathan Corbet , Richard Weinberger , Andreas Dilger , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org, Alexander Viro , linux-fsdevel@vger.kernel.org, Jaegeuk Kim , linux-ext4@vger.kernel.org, Gabriel Krisman Bertazi Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Fri, Feb 07, 2020 at 05:35:45PM -0800, Daniel Rosenberg wrote: > This function will allow other uses of unicode to act upon a casefolded > string without needing to allocate their own copy of one. > > The actor function can return an nonzero value to exit early. > > Signed-off-by: Daniel Rosenberg > --- > fs/unicode/utf8-core.c | 25 ++++++++++++++++++++++++- > include/linux/unicode.h | 10 ++++++++++ > 2 files changed, 34 insertions(+), 1 deletion(-) > > diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c > index 2a878b739115d..db050bf59a32b 100644 > --- a/fs/unicode/utf8-core.c > +++ b/fs/unicode/utf8-core.c > @@ -122,9 +122,32 @@ int utf8_casefold(const struct unicode_map *um, const struct qstr *str, > } > return -EINVAL; > } > - > EXPORT_SYMBOL(utf8_casefold); > > +int utf8_casefold_iter(const struct unicode_map *um, const struct qstr *str, > + struct utf8_itr_context *ctx) > +{ > + const struct utf8data *data = utf8nfdicf(um->version); > + struct utf8cursor cur; > + int c; > + int res = 0; > + int pos = 0; > + > + if (utf8ncursor(&cur, data, str->name, str->len) < 0) > + return -EINVAL; > + > + while ((c = utf8byte(&cur))) { > + if (c < 0) > + return c; > + res = ctx->actor(ctx, c, pos); > + pos++; > + if (res) > + return res; > + } > + return res; > +} > +EXPORT_SYMBOL(utf8_casefold_iter); 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. - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D255C2BA83 for ; Wed, 12 Feb 2020 03:38:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 331D82073C for ; Wed, 12 Feb 2020 03:38:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JD8TaQEM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="kgLuYeSF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 331D82073C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zrxpqeM1ORDhIvq9j5OjF8tynuZR7XSFljll7MXc9sI=; b=JD8TaQEMjWLnQ9 dbXcoCYMSONJdiXQhd2F7vPkNPFNd1rs1otuaJxmSRNfQXISW8mOfJLIZW+JglEzXqubUrNIu19CB W1wid/VHh+mmOxDY0+G8liuYQdlcmQ5Q/7cl+H54oUYH5MxBAjr6evMTzmKbZxALOdvdKa79FRdjU SfUID5Cejt/PtOeHZXO22MtxKAKh+DomVGze0i5q5pf08EkvAJLnnlyc7rT10JBLb0jFykrFz1L4A FglAXohbvMCDMCBhqNUOqbwqDaL3VksGwnepCgU+CIkqGLh5QHEuEFUlFtMesplvLpDWxZZBfCm9i YlgvsUWmwOOzJpNmUXWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1iqo-0001AA-BQ; Wed, 12 Feb 2020 03:38:10 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1iqm-00019A-3O for linux-mtd@lists.infradead.org; Wed, 12 Feb 2020 03:38:09 +0000 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D8E112073C; Wed, 12 Feb 2020 03:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581478684; bh=QFEFG/81Rfdx+DhaJa330Iy0plXtvuXYAYlLrbnAw4s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kgLuYeSFpKxnDdxa83uM8r7H8S2iSSVhydJQbgl1WskDbn0S35JXuXY6oYMb6AFqU HxO5QSmEbAmJQYLuF8FimrMwI0rN+5dYv0mjVwfxsOCEj+bKApbx/sRGflnZL6TTxF hsjxh+dI86q2CbBRmKMiAXqhZqvYy14nr51t/CqE= Date: Tue, 11 Feb 2020 19:38:00 -0800 From: Eric Biggers To: Daniel Rosenberg Subject: Re: [PATCH v7 1/8] unicode: Add utf8_casefold_iter Message-ID: <20200212033800.GC870@sol.localdomain> References: <20200208013552.241832-1-drosen@google.com> <20200208013552.241832-2-drosen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200208013552.241832-2-drosen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200211_193808_163925_28A0CA8F X-CRM114-Status: GOOD ( 16.72 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-team@android.com, Theodore Ts'o , Jonathan Corbet , Richard Weinberger , Andreas Dilger , Chao Yu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org, Alexander Viro , linux-fsdevel@vger.kernel.org, Jaegeuk Kim , linux-ext4@vger.kernel.org, Gabriel Krisman Bertazi Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Fri, Feb 07, 2020 at 05:35:45PM -0800, Daniel Rosenberg wrote: > This function will allow other uses of unicode to act upon a casefolded > string without needing to allocate their own copy of one. > > The actor function can return an nonzero value to exit early. > > Signed-off-by: Daniel Rosenberg > --- > fs/unicode/utf8-core.c | 25 ++++++++++++++++++++++++- > include/linux/unicode.h | 10 ++++++++++ > 2 files changed, 34 insertions(+), 1 deletion(-) > > diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c > index 2a878b739115d..db050bf59a32b 100644 > --- a/fs/unicode/utf8-core.c > +++ b/fs/unicode/utf8-core.c > @@ -122,9 +122,32 @@ int utf8_casefold(const struct unicode_map *um, const struct qstr *str, > } > return -EINVAL; > } > - > EXPORT_SYMBOL(utf8_casefold); > > +int utf8_casefold_iter(const struct unicode_map *um, const struct qstr *str, > + struct utf8_itr_context *ctx) > +{ > + const struct utf8data *data = utf8nfdicf(um->version); > + struct utf8cursor cur; > + int c; > + int res = 0; > + int pos = 0; > + > + if (utf8ncursor(&cur, data, str->name, str->len) < 0) > + return -EINVAL; > + > + while ((c = utf8byte(&cur))) { > + if (c < 0) > + return c; > + res = ctx->actor(ctx, c, pos); > + pos++; > + if (res) > + return res; > + } > + return res; > +} > +EXPORT_SYMBOL(utf8_casefold_iter); 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. - Eric ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/