Fix: bytecode: Validate register type for instructions expecting unknown type
[lttng-modules.git] / src / lttng-abi.c
index 68ea7ac35805b336ecc006079662dc4f3d981d04..be8bfe1e5027e23ec42acd8cccba99813b517a32 100644 (file)
@@ -1584,6 +1584,8 @@ int lttng_abi_validate_event_param(struct lttng_kernel_event *event_param)
        switch (event_param->instrumentation) {
        case LTTNG_KERNEL_SYSCALL:
                switch (event_param->u.syscall.entryexit) {
+               case LTTNG_KERNEL_SYSCALL_ENTRY:
+               case LTTNG_KERNEL_SYSCALL_EXIT:
                case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
                        break;
                default:
@@ -1596,7 +1598,7 @@ int lttng_abi_validate_event_param(struct lttng_kernel_event *event_param)
                        return -EINVAL;
                }
                switch (event_param->u.syscall.match) {
-               case LTTNG_SYSCALL_MATCH_NAME:
+               case LTTNG_KERNEL_SYSCALL_MATCH_NAME:
                        break;
                default:
                        return -EINVAL;
@@ -1746,7 +1748,8 @@ long lttng_event_notifier_ioctl(struct file *file, unsigned int cmd, unsigned lo
                        return -EINVAL;
                case LTTNG_TYPE_ENABLER:
                        event_notifier_enabler = file->private_data;
-                       return lttng_event_notifier_enabler_attach_bytecode(event_notifier_enabler,
+                       return lttng_event_notifier_enabler_attach_filter_bytecode(
+                                       event_notifier_enabler,
                                (struct lttng_kernel_filter_bytecode __user *) arg);
                default:
                        WARN_ON_ONCE(1);
@@ -2299,7 +2302,8 @@ long lttng_event_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                case LTTNG_TYPE_ENABLER:
                {
                        event_enabler = file->private_data;
-                       return lttng_event_enabler_attach_bytecode(event_enabler,
+                       return lttng_event_enabler_attach_filter_bytecode(
+                               event_enabler,
                                (struct lttng_kernel_filter_bytecode __user *) arg);
                }
                default:
This page took 0.024139 seconds and 4 git commands to generate.