From 5beda3c6fe5b72aac95b4c13746ae598dfd64c01 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Mon, 13 May 2019 17:09:39 +1000 Subject: nvram: Flag dangerous NVRAM options Most nvram options used by skiboot are just for debug or testing for regressions. They should never be used long term. We've hit a number of issues in testing and the field where nvram options have been set "temporarily" but haven't been properly cleared after, resulting in crashes or real bugs being masked. This patch marks most nvram options used by skiboot as dangerous and prints a chicken to remind users of the problem. Signed-off-by: Michael Neuling Reviewed-by: Samuel Mendoza-Jonas Acked-By: Alistair Popple Signed-off-by: Stewart Smith --- include/nvram.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/nvram.h') diff --git a/include/nvram.h b/include/nvram.h index 012c107..a018a11 100644 --- a/include/nvram.h +++ b/include/nvram.h @@ -24,7 +24,9 @@ bool nvram_validate(void); bool nvram_has_loaded(void); bool nvram_wait_for_load(void); -const char *nvram_query(const char *name); -bool nvram_query_eq(const char *key, const char *value); +const char *nvram_query_safe(const char *name); +const char *nvram_query_dangerous(const char *name); +bool nvram_query_eq_safe(const char *key, const char *value); +bool nvram_query_eq_dangerous(const char *key, const char *value); #endif /* __NVRAM_H */ -- cgit v1.1