15 #include <linux/errno.h>
16 #include <linux/kernel.h>
18 #include <linux/slab.h>
56 tsize = table_size(
th.td_lolen,
th.td_flags);
80 if (is_vmalloc_addr(table))
98 static int verify_dfa(
struct aa_dfa *dfa,
int flags)
100 size_t i, state_count, trans_count;
137 for (i = 0; i < state_count; i++) {
141 if (
BASE_TABLE(dfa)[i] + 255 >= trans_count) {
148 for (i = 0; i < trans_count; i++) {
167 static void dfa_free(
struct aa_dfa *dfa)
212 kref_init(&dfa->
count);
232 table = unpack_table(data, size);
236 switch (table->
td_id) {
271 error = verify_dfa(dfa, flags);
280 return ERR_PTR(error);
300 const char *
str,
int len)
317 pos = base[
state] + equiv[(
u8) *str++];
318 if (check[pos] == state)
326 pos = base[
state] + (
u8) *str++;
327 if (check[pos] == state)
367 pos = base[
state] + equiv[(
u8) *str++];
368 if (check[pos] == state)
376 pos = base[
state] + (
u8) *str++;
377 if (check[pos] == state)
412 pos = base[
state] + equiv[(
u8) c];
413 if (check[pos] == state)
420 if (check[pos] == state)