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>
This commit is contained in:
Xiang Wang authored and Atish Patra committed 2019-03-06 11:10:35 -08:00
1 parent 27fae182dc
commit 9eb8f0f90d
11 files changed
+45 -43

No files matched your search

+1 -1
View File
@@ -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,