Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374613 > unrolled thread

[PATCH] uprobes/x86: constify uprobe_xol_ops structures

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2016-04-09 13:40 +0200
Last post2016-04-13 13:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] uprobes/x86: constify uprobe_xol_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2016-04-09 13:40 +0200
    [tip:perf/core] uprobes/x86: Constify uprobe_xol_ops structures tip-bot for Julia Lawall <tipbot@zytor.com> - 2016-04-13 13:40 +0200

#1374613 — [PATCH] uprobes/x86: constify uprobe_xol_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2016-04-09 13:40 +0200
Subject[PATCH] uprobes/x86: constify uprobe_xol_ops structures
Message-ID<rlZp8-4bC-11@gated-at.bofh.it>
The uprobe_xol_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 arch/x86/kernel/uprobes.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index bf4db6e..bd07415 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -578,7 +578,7 @@ static void default_abort_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
 	riprel_post_xol(auprobe, regs);
 }
 
-static struct uprobe_xol_ops default_xol_ops = {
+static const struct uprobe_xol_ops default_xol_ops = {
 	.pre_xol  = default_pre_xol_op,
 	.post_xol = default_post_xol_op,
 	.abort	  = default_abort_op,
@@ -695,7 +695,7 @@ static void branch_clear_offset(struct arch_uprobe *auprobe, struct insn *insn)
 		0, insn->immediate.nbytes);
 }
 
-static struct uprobe_xol_ops branch_xol_ops = {
+static const struct uprobe_xol_ops branch_xol_ops = {
 	.emulate  = branch_emulate_op,
 	.post_xol = branch_post_xol_op,
 };

[toc] | [next] | [standalone]


#1377806 — [tip:perf/core] uprobes/x86: Constify uprobe_xol_ops structures

Fromtip-bot for Julia Lawall <tipbot@zytor.com>
Date2016-04-13 13:40 +0200
Subject[tip:perf/core] uprobes/x86: Constify uprobe_xol_ops structures
Message-ID<rnrjm-x5-65@gated-at.bofh.it>
In reply to#1374613
Commit-ID:  dac429874d8156d97460c61049e202b2dcc15df8
Gitweb:     http://git.kernel.org/tip/dac429874d8156d97460c61049e202b2dcc15df8
Author:     Julia Lawall <Julia.Lawall@lip6.fr>
AuthorDate: Sat, 9 Apr 2016 13:17:29 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 13 Apr 2016 09:55:42 +0200

uprobes/x86: Constify uprobe_xol_ops structures

The uprobe_xol_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel-janitors@vger.kernel.org
Link: http://lkml.kernel.org/r/1460200649-32526-1-git-send-email-Julia.Lawall@lip6.fr
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/uprobes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index bf4db6e..bd07415 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -578,7 +578,7 @@ static void default_abort_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
 	riprel_post_xol(auprobe, regs);
 }
 
-static struct uprobe_xol_ops default_xol_ops = {
+static const struct uprobe_xol_ops default_xol_ops = {
 	.pre_xol  = default_pre_xol_op,
 	.post_xol = default_post_xol_op,
 	.abort	  = default_abort_op,
@@ -695,7 +695,7 @@ static void branch_clear_offset(struct arch_uprobe *auprobe, struct insn *insn)
 		0, insn->immediate.nbytes);
 }
 
-static struct uprobe_xol_ops branch_xol_ops = {
+static const struct uprobe_xol_ops branch_xol_ops = {
 	.emulate  = branch_emulate_op,
 	.post_xol = branch_post_xol_op,
 };

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web