1 /*
2  * Copyright (C) 2021 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <sys/types.h>
20 
21 enum scudo_command {
22     SCUDO_NOP,
23     SCUDO_ONE_MALLOC,
24     SCUDO_ONE_CALLOC,
25     SCUDO_ONE_REALLOC,
26     SCUDO_MANY_MALLOC,
27     SCUDO_ONE_NEW,
28     SCUDO_ONE_NEW_ARR,
29     SCUDO_MALLOC_AND_NEW,
30     SCUDO_DOUBLE_FREE,
31     SCUDO_REALLOC_AFTER_FREE,
32     SCUDO_DEALLOC_TYPE_MISMATCH,
33     SCUDO_REALLOC_TYPE_MISMATCH,
34     SCUDO_ALLOC_LARGE,
35     SCUDO_ALLOC_BENCHMARK,
36     SCUDO_UNTAGGED_MEMREF_SMALL,
37     SCUDO_TAGGED_MEMREF_SMALL,
38     SCUDO_UNTAGGED_MEMREF_LARGE,
39     SCUDO_TAGGED_MEMREF_LARGE,
40     SCUDO_MEMTAG_MISMATCHED_READ,
41     SCUDO_MEMTAG_MISMATCHED_WRITE,
42     SCUDO_MEMTAG_READ_AFTER_FREE,
43     SCUDO_MEMTAG_WRITE_AFTER_FREE,
44     SCUDO_TEST_FAIL,
45     SCUDO_BAD_CMD
46 };
47 
48 struct scudo_msg {
49     uint8_t cmd;
50 };
51