X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-filter-interpreter.c;h=bd838ccbca7d3fe72eb62b04c4439f785f71303f;hb=a0dac6257b0efc0c17c8b52520e09369b8811b04;hp=8323fbbb2cfe01b6bb63d7d5baae9d734f572757;hpb=241ae9a8fb62c3ce467d244e280062c24e73eb7a;p=lttng-modules.git diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c index 8323fbbb..bd838ccb 100644 --- a/lttng-filter-interpreter.c +++ b/lttng-filter-interpreter.c @@ -20,10 +20,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include +#include #include +LTTNG_STACK_FRAME_NON_STANDARD(lttng_filter_interpret_bytecode); + /* * get_char should be called with page fault handler disabled if it is expected * to handle user-space read. @@ -37,7 +40,7 @@ char get_char(struct estack_entry *reg, size_t offset) char c; /* Handle invalid access as end of string. */ - if (unlikely(!access_ok(VERIFY_READ, + if (unlikely(!lttng_access_ok(VERIFY_READ, reg->u.s.user_str + offset, sizeof(c)))) return '\0'; @@ -119,21 +122,16 @@ int stack_strcmp(struct estack *stack, int top, const char *cmp_type) } } if (unlikely(char_ax == '\0')) { - if (char_bx == '\0') { - diff = 0; - break; - } else { - if (estack_bx(stack, top)->u.s.literal) { - ret = parse_char(estack_bx(stack, top), - &char_bx, &offset_bx); - if (ret == -1) { - diff = 0; - break; - } + if (estack_bx(stack, top)->u.s.literal) { + ret = parse_char(estack_bx(stack, top), + &char_bx, &offset_bx); + if (ret == -1) { + diff = 0; + break; } - diff = 1; - break; } + diff = 1; + break; } if (estack_bx(stack, top)->u.s.literal) { ret = parse_char(estack_bx(stack, top),