diff options
author | Xiang Wang <wxjstz@126.com> | 2019-03-06 15:29:34 +0800 |
---|---|---|
committer | Atish Patra <atishp04@gmail.com> | 2019-03-06 11:10:35 -0800 |
commit | 9eb8f0f90d5c873576d18d405bbd932ad9688741 (patch) | |
tree | b1e5b974fe6d35fef9b141c955ba8ddad43cdf87 /platform/template | |
parent | 27fae182dc54e08314034a03eeb583b94c64f4c8 (diff) |
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/template')
-rw-r--r-- | platform/template/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/template/platform.c b/platform/template/platform.c index c14398f..866d273 100644 --- a/platform/template/platform.c +++ b/platform/template/platform.c @@ -207,7 +207,7 @@ static int platform_system_shutdown(u32 type) /* * Platform descriptor. */ -struct sbi_platform platform = { +const struct sbi_platform platform = { .name = "platform-name", .features = SBI_PLATFORM_DEFAULT_FEATURES, |