Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rv/monitors: Move monitor structure in rodata

It makes sense to move the important monitor structure into rodata to
prevent accidental structure modification.

Link: https://lkml.kernel.org/r/20221122173648.4732-1-acarmina@redhat.com

Signed-off-by: Alessandro Carminati <acarmina@redhat.com>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Alessandro Carminati and committed by
Steven Rostedt (Google)
bfa87ac8 eb9d5894

+3 -3
+1 -1
kernel/trace/rv/monitors/wip/wip.h
··· 27 27 bool final_states[state_max_wip]; 28 28 }; 29 29 30 - static struct automaton_wip automaton_wip = { 30 + static const struct automaton_wip automaton_wip = { 31 31 .state_names = { 32 32 "preemptive", 33 33 "non_preemptive"
+1 -1
kernel/trace/rv/monitors/wwnr/wwnr.h
··· 27 27 bool final_states[state_max_wwnr]; 28 28 }; 29 29 30 - static struct automaton_wwnr automaton_wwnr = { 30 + static const struct automaton_wwnr automaton_wwnr = { 31 31 .state_names = { 32 32 "not_running", 33 33 "running"
+1 -1
tools/verification/dot2/dot2c.py
··· 111 111 112 112 def format_aut_init_header(self): 113 113 buff = [] 114 - buff.append("static struct %s %s = {" % (self.struct_automaton_def, self.var_automaton_def)) 114 + buff.append("static const struct %s %s = {" % (self.struct_automaton_def, self.var_automaton_def)) 115 115 return buff 116 116 117 117 def __get_string_vector_per_line_content(self, buff):