rv/monitors: Move monitor structure in rodata
Subsystems (2)
Steven Rostedt
maintainerPATCH 1/1 rv/monitors: Move monitor structure in rodata
Missed this patch in pulling in my queue for 6.2.
commit bfa87ac86ce9ff879c5ac49bf09c3999859a8968
Author: Alessandro Carminati <[email protected]> Date: Tue Nov 22 18:36:48 2022 +0100
rv/monitors: Move monitor structure in rodata
It makes sense to move the important monitor structure into rodata to prevent accidental structure modification.
Signed-off-by Alessandro Carminati <[email protected]>
Signed-off-by Steven Rostedt (Google) <[email protected]>
kernel/trace/rv/monitors/wip/wip.h +1 -1
@@ -27,7 +27,7 @@ struct automaton_wip {bool final_states[state_max_wip]; }; -static struct automaton_wip automaton_wip = { +static const struct automaton_wip automaton_wip = { .state_names = {"preemptive" ,"non_preemptive"
kernel/trace/rv/monitors/wwnr/wwnr.h +1 -1
@@ -27,7 +27,7 @@ struct automaton_wwnr {bool final_states[state_max_wwnr]; }; -static struct automaton_wwnr automaton_wwnr = { +static const struct automaton_wwnr automaton_wwnr = { .state_names = {"not_running" ,"running"
tools/verification/dot2/dot2c.py +1 -1
@@ -111,7 +111,7 @@ class Dot2c(Automata): def format_aut_init_header(self): buff = [] - buff.append("static struct %s %s = {" % (self.struct_automaton_def, self.var_automaton_def)) + buff.append("static const struct %s %s = {" % (self.struct_automaton_def, self.var_automaton_def)) return buff def __get_string_vector_per_line_content(self, buff):