On 19/03/21 2:35 am, Eric Biggers wrote:
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?
Hi Eric,
I just sent a v3 with static_call implementation.
- Eric