aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-09-22 19:43:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:29 -0400
commit88e9d34c727883d7d6f02cf1475b3ec98b8480c7 (patch)
tree475f544536d52739e0929e7727cab5124e855a06 /kernel/trace/ftrace.c
parentb7ed698cc9d556306a4088c238e2ea9311ea2cb3 (diff)
seq_file: constify seq_operations
Make all seq_operations structs const, to help mitigate against revectoring user-triggerable function pointers. This is derived from the grsecurity patch, although generated from scratch because it's simpler than extracting the changes from there. Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index c71e91bf7372..23df7771c937 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1520,7 +1520,7 @@ static int t_show(struct seq_file *m, void *v)
1520 return 0; 1520 return 0;
1521} 1521}
1522 1522
1523static struct seq_operations show_ftrace_seq_ops = { 1523static const struct seq_operations show_ftrace_seq_ops = {
1524 .start = t_start, 1524 .start = t_start,
1525 .next = t_next, 1525 .next = t_next,
1526 .stop = t_stop, 1526 .stop = t_stop,
@@ -2459,7 +2459,7 @@ static int g_show(struct seq_file *m, void *v)
2459 return 0; 2459 return 0;
2460} 2460}
2461 2461
2462static struct seq_operations ftrace_graph_seq_ops = { 2462static const struct seq_operations ftrace_graph_seq_ops = {
2463 .start = g_start, 2463 .start = g_start,
2464 .next = g_next, 2464 .next = g_next,
2465 .stop = g_stop, 2465 .stop = g_stop,