Re: [PATCH v2 4/4] fs: unicode: Add utf8 module and a unicode layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 18, 2021 at 07:03:05PM +0530, Shreeya Patel wrote:
> +struct unicode_ops {
> +	struct module *owner;
> +	int (*validate)(const struct unicode_map *um, const struct qstr *str);
> +	int (*strncmp)(const struct unicode_map *um, const struct qstr *s1,
> +		       const struct qstr *s2);
> +	int (*strncasecmp)(const struct unicode_map *um, const struct qstr *s1,
> +			   const struct qstr *s2);
> +	int (*strncasecmp_folded)(const struct unicode_map *um, const struct qstr *cf,
> +				  const struct qstr *s1);
> +	int (*normalize)(const struct unicode_map *um, const struct qstr *str,
> +			 unsigned char *dest, size_t dlen);
> +	int (*casefold)(const struct unicode_map *um, const struct qstr *str,
> +			unsigned char *dest, size_t dlen);
> +	int (*casefold_hash)(const struct unicode_map *um, const void *salt,
> +			     struct qstr *str);
> +	struct unicode_map* (*load)(const char *version);
> +};

Indirect calls are expensive these days, especially due to the Spectre
mitigations.  Would it make sense to use static calls
(include/linux/static_call.h) instead for this?

- Eric



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux