mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user