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/sifive | |
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/sifive')
-rw-r--r-- | platform/sifive/fu540/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/sifive/fu540/platform.c b/platform/sifive/fu540/platform.c index a244d10..c14275a 100644 --- a/platform/sifive/fu540/platform.c +++ b/platform/sifive/fu540/platform.c @@ -187,7 +187,7 @@ static int fu540_system_down(u32 type) return 0; } -struct sbi_platform platform = { +const struct sbi_platform platform = { .name = "SiFive Freedom U540", .features = SBI_PLATFORM_DEFAULT_FEATURES, .hart_count = FU540_HART_COUNT, |