page alloc wrapper: Fix get_pfnblock_flags_mask prototype
[lttng-modules.git] / lttng-filter.h
index 3fba528e25a58a3d5da85aae8ace95342b932345..f358fa3cdec72869f67b9282570b5ff7b185c6c3 100644 (file)
@@ -1,32 +1,15 @@
-#ifndef _LTTNG_FILTER_H
-#define _LTTNG_FILTER_H
-
-/*
+/* SPDX-License-Identifier: MIT
+ *
  * lttng-filter.h
  *
  * LTTng modules filter header.
  *
  * Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
  */
 
+#ifndef _LTTNG_FILTER_H
+#define _LTTNG_FILTER_H
+
 #include <linux/kernel.h>
 
 #include <lttng-events.h>
@@ -59,7 +42,7 @@ struct bytecode_runtime {
        size_t data_alloc_len;
        char *data;
        uint16_t len;
-       char code[0];
+       char code[];
 };
 
 enum entry_type {
@@ -108,6 +91,7 @@ struct filter_get_index_data {
                size_t len;
                enum object_type type;
                bool rev_bo;    /* reverse byte order */
+               bool user;      /* from userspace */
        } elem;
 };
 
@@ -117,6 +101,7 @@ struct vstack_load {
        enum object_type object_type;
        const struct lttng_event_field *field;
        bool rev_bo;    /* reverse byte order */
+       bool user;      /* from userspace */
 };
 
 struct vstack_entry {
@@ -185,6 +170,7 @@ struct load_ptr {
        enum object_type object_type;
        const void *ptr;
        bool rev_bo;
+       bool user;      /* from userspace */
        /* Temporary place-holders for contexts. */
        union {
                int64_t s64;
@@ -207,7 +193,7 @@ struct estack_entry {
                        const char __user *user_str;
                        size_t seq_len;
                        enum estack_string_literal_type literal_type;
-                       int user;               /* is string from userspace ? */
+                       bool user;              /* is string from userspace ? */
                } s;
                struct load_ptr ptr;
        } u;
@@ -252,6 +238,7 @@ struct estack {
 const char *lttng_filter_print_op(enum filter_op op);
 
 int lttng_filter_validate_bytecode(struct bytecode_runtime *bytecode);
+int lttng_filter_validate_bytecode_load(struct bytecode_runtime *bytecode);
 int lttng_filter_specialize_bytecode(struct lttng_event *event,
                struct bytecode_runtime *bytecode);
 
This page took 0.025184 seconds and 4 git commands to generate.