summaryrefslogtreecommitdiff
path: root/platform/kendryte
diff options
context:
space:
mode:
authorXiang Wang <wxjstz@126.com>2019-03-06 10:29:34 +0300
committerAtish Patra <atishp04@gmail.com>2019-03-06 22:10:35 +0300
commit9eb8f0f90d5c873576d18d405bbd932ad9688741 (patch)
treeb1e5b974fe6d35fef9b141c955ba8ddad43cdf87 /platform/kendryte
parent27fae182dc54e08314034a03eeb583b94c64f4c8 (diff)
downloadopensbi-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/kendryte')
-rw-r--r--platform/kendryte/k210/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c
index 104edcc..cba83da 100644
--- a/platform/kendryte/k210/platform.c
+++ b/platform/kendryte/k210/platform.c
@@ -98,7 +98,7 @@ static int k210_system_shutdown(u32 type)
return 0;
}
-struct sbi_platform platform = {
+const struct sbi_platform platform = {
.name = "Kendryte K210",
.features = SBI_PLATFORM_HAS_TIMER_VALUE,