diff options
author | Xiang Wang <wxjstz@126.com> | 2019-03-06 10:29:34 +0300 |
---|---|---|
committer | Atish Patra <atishp04@gmail.com> | 2019-03-06 22:10:35 +0300 |
commit | 9eb8f0f90d5c873576d18d405bbd932ad9688741 (patch) | |
tree | b1e5b974fe6d35fef9b141c955ba8ddad43cdf87 /platform/qemu/virt/platform.c | |
parent | 27fae182dc54e08314034a03eeb583b94c64f4c8 (diff) | |
download | opensbi-9eb8f0f90d5c873576d18d405bbd932ad9688741.tar.xz |
platform: Make the `platform` read-only
platform should be a read-only variable, if it is placed in the data
segment, it may be exploited.
Signed-off-by: Xiang Wang <wxjstz@126.com>
Diffstat (limited to 'platform/qemu/virt/platform.c')
-rw-r--r-- | platform/qemu/virt/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/qemu/virt/platform.c b/platform/qemu/virt/platform.c index ab40b93..fd4d829 100644 --- a/platform/qemu/virt/platform.c +++ b/platform/qemu/virt/platform.c @@ -134,7 +134,7 @@ static int virt_system_down(u32 type) return 0; } -struct sbi_platform platform = { +const struct sbi_platform platform = { .name = "QEMU Virt Machine", .features = SBI_PLATFORM_DEFAULT_FEATURES, .hart_count = VIRT_HART_COUNT, |