summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/TCG/2647
blob: 95aa38449c41c344c5e4bdebab8b44cb0c21fee7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
TCG: 0.994
user-level: 0.945
architecture: 0.905
graphic: 0.799
peripherals: 0.785
performance: 0.749
mistranslation: 0.733
hypervisor: 0.595
device: 0.552
permissions: 0.517
arm: 0.494
PID: 0.456
x86: 0.447
ppc: 0.438
VMM: 0.424
semantic: 0.419
assembly: 0.408
register: 0.396
i386: 0.387
network: 0.333
debug: 0.325
files: 0.317
virtual: 0.312
socket: 0.311
vnc: 0.281
kernel: 0.275
boot: 0.243
KVM: 0.218
risc-v: 0.137
--------------------
TCG: 0.980
kernel: 0.815
x86: 0.431
debug: 0.229
files: 0.218
register: 0.197
virtual: 0.160
performance: 0.082
ppc: 0.067
i386: 0.056
architecture: 0.037
KVM: 0.037
user-level: 0.019
semantic: 0.017
hypervisor: 0.016
VMM: 0.015
permissions: 0.015
PID: 0.015
device: 0.014
arm: 0.012
assembly: 0.011
boot: 0.011
risc-v: 0.010
network: 0.008
peripherals: 0.005
socket: 0.005
graphic: 0.005
vnc: 0.004
mistranslation: 0.002

A code error in accel/tcg/user-exec.c
Description of problem:
accel/tcg/user-exec.c:
```
static int probe_access_internal(CPUArchState *env, vaddr addr,
                                 int fault_size, MMUAccessType access_type,
                                 bool nonfault, uintptr_t ra)
{
    int acc_flag;
    bool maperr;

    switch (access_type) {
    case MMU_DATA_STORE:
        acc_flag = PAGE_WRITE_ORG;
        break;
    case MMU_DATA_LOAD:
        acc_flag = PAGE_READ;
        break;
    case MMU_INST_FETCH:
        acc_flag = PAGE_EXEC;
        break;
    default:
        g_assert_not_reached();
    }

    if (guest_addr_valid_untagged(addr)) {
        int page_flags = page_get_flags(addr);
        if (page_flags & acc_flag) {
            if ((acc_flag == PAGE_READ || acc_flag == PAGE_WRITE)
                && cpu_plugin_mem_cbs_enabled(env_cpu(env))) {
                return TLB_MMIO;
            }
            return 0; /* success */
        }
        maperr = !(page_flags & PAGE_VALID);
    } else {
        maperr = true;
    }

    if (nonfault) {
        return TLB_INVALID_MASK;
    }

    cpu_loop_exit_sigsegv(env_cpu(env), addr, access_type, maperr, ra);
}
```
The conditional judgment "acc_flag == PAGE_WRITE" seems to have an issue, because acc_flag can only be PAGE_WRITE_ORG, PAGE_READ or PAGE_EXEC from the previous code.