linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] x86: fix typo in comment for poke_text_early
@ 2019-09-02 10:24 Marco Ammon
  2019-09-02 10:24 ` [PATCH 2/3] x86: fix typo in comment for alternative_instructions Marco Ammon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Marco Ammon @ 2019-09-02 10:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H . Peter Anvin,
	x86, trivial, Marco Ammon

In the documentation for text_poke_early, "protected again" should
actually be "protected against". This patch fixes the spelling mistake.

Signed-off-by: Marco Ammon <marco.ammon@fau.de>
---
 arch/x86/include/asm/text-patching.h | 4 ++--
 arch/x86/kernel/alternative.c        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/text-patching.h b/arch/x86/include/asm/text-patching.h
index 70c09967a999..5e8319bb207a 100644
--- a/arch/x86/include/asm/text-patching.h
+++ b/arch/x86/include/asm/text-patching.h
@@ -45,8 +45,8 @@ extern void text_poke_early(void *addr, const void *opcode, size_t len);
  * no thread can be preempted in the instructions being modified (no iret to an
  * invalid instruction possible) or if the instructions are changed from a
  * consistent state to another consistent state atomically.
- * On the local CPU you need to be protected again NMI or MCE handlers seeing an
- * inconsistent instruction while you patch.
+ * On the local CPU you need to be protected against NMI or MCE handlers seeing
+ * an inconsistent instruction while you patch.
  */
 extern void *text_poke(void *addr, const void *opcode, size_t len);
 extern void *text_poke_kgdb(void *addr, const void *opcode, size_t len);
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index ccd32013c47a..0eefd497e3d8 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -753,8 +753,8 @@ void __init alternative_instructions(void)
  * When you use this code to patch more than one byte of an instruction
  * you need to make sure that other CPUs cannot execute this code in parallel.
  * Also no thread must be currently preempted in the middle of these
- * instructions. And on the local CPU you need to be protected again NMI or MCE
- * handlers seeing an inconsistent instruction while you patch.
+ * instructions. And on the local CPU you need to be protected against NMI or
+ * MCE handlers seeing an inconsistent instruction while you patch.
  */
 void __init_or_module text_poke_early(void *addr, const void *opcode,
 				      size_t len)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] x86: fix typo in comment for alternative_instructions
  2019-09-02 10:24 [PATCH 1/3] x86: fix typo in comment for poke_text_early Marco Ammon
@ 2019-09-02 10:24 ` Marco Ammon
  2019-09-02 10:24 ` [PATCH 3/3] x86: kprobes: fix typo in comment Marco Ammon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Marco Ammon @ 2019-09-02 10:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H . Peter Anvin,
	x86, trivial, Marco Ammon

In the documentation for alternative_instructions, "a unlikely" should
actually be "an unlikely". This patch fixes the mistake.

Signed-off-by: Marco Ammon <marco.ammon@fau.de>
---
 arch/x86/kernel/alternative.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 0eefd497e3d8..9d3a971ea364 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -713,7 +713,7 @@ void __init alternative_instructions(void)
 	 * Don't stop machine check exceptions while patching.
 	 * MCEs only happen when something got corrupted and in this
 	 * case we must do something about the corruption.
-	 * Ignoring it is worse than a unlikely patching race.
+	 * Ignoring it is worse than an unlikely patching race.
 	 * Also machine checks tend to be broadcast and if one CPU
 	 * goes into machine check the others follow quickly, so we don't
 	 * expect a machine check to cause undue problems during to code
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] x86: kprobes: fix typo in comment
  2019-09-02 10:24 [PATCH 1/3] x86: fix typo in comment for poke_text_early Marco Ammon
  2019-09-02 10:24 ` [PATCH 2/3] x86: fix typo in comment for alternative_instructions Marco Ammon
@ 2019-09-02 10:24 ` Marco Ammon
  2019-09-02 12:10 ` [PATCH 1/3] x86: fix typo in comment for poke_text_early Borislav Petkov
  2019-09-02 12:14 ` [tip: x86/cleanups] x86: Correct misc typos tip-bot2 for Marco Ammon
  3 siblings, 0 replies; 5+ messages in thread
From: Marco Ammon @ 2019-09-02 10:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H . Peter Anvin,
	x86, trivial, Marco Ammon

In the comment for arch_prepare_optimized_kprobe, "instuction" should
actually be "instruction". This patch fixes the typo.

Signed-off-by: Marco Ammon <marco.ammon@fau.de>
---
 arch/x86/kernel/kprobes/opt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index 9d4aedece363..282d559121d6 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -403,7 +403,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op,
 			   (u8 *)op->kp.addr + op->optinsn.size);
 	len += RELATIVEJUMP_SIZE;
 
-	/* We have to use text_poke for instuction buffer because it is RO */
+	/* We have to use text_poke for instruction buffer because it is RO */
 	text_poke(slot, buf, len);
 	ret = 0;
 out:
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] x86: fix typo in comment for poke_text_early
  2019-09-02 10:24 [PATCH 1/3] x86: fix typo in comment for poke_text_early Marco Ammon
  2019-09-02 10:24 ` [PATCH 2/3] x86: fix typo in comment for alternative_instructions Marco Ammon
  2019-09-02 10:24 ` [PATCH 3/3] x86: kprobes: fix typo in comment Marco Ammon
@ 2019-09-02 12:10 ` Borislav Petkov
  2019-09-02 12:14 ` [tip: x86/cleanups] x86: Correct misc typos tip-bot2 for Marco Ammon
  3 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2019-09-02 12:10 UTC (permalink / raw)
  To: Marco Ammon
  Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86,
	trivial

On Mon, Sep 02, 2019 at 12:24:34PM +0200, Marco Ammon wrote:
> In the documentation for text_poke_early, "protected again" should
> actually be "protected against". This patch fixes the spelling mistake.

For the future:

Avoid having "This patch" or "This commit" in the commit message. It is
tautologically useless.

Also, do

$ git grep 'This patch' Documentation/process

for more details.

I've merged those patches into a single one and have applied it.

Thx.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip: x86/cleanups] x86: Correct misc typos
  2019-09-02 10:24 [PATCH 1/3] x86: fix typo in comment for poke_text_early Marco Ammon
                   ` (2 preceding siblings ...)
  2019-09-02 12:10 ` [PATCH 1/3] x86: fix typo in comment for poke_text_early Borislav Petkov
@ 2019-09-02 12:14 ` tip-bot2 for Marco Ammon
  3 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Marco Ammon @ 2019-09-02 12:14 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Marco Ammon, Borislav Petkov, Daniel Bristot de Oliveira,
	H. Peter Anvin, Ingo Molnar, Juergen Gross, Masami Hiramatsu,
	Nadav Amit, Peter Zijlstra, Pu Wen, Rick Edgecombe,
	Steven Rostedt (VMware),
	Thomas Gleixner, trivial, x86-ml, Ingo Molnar, Borislav Petkov,
	linux-kernel

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     32b1cbe380417f2ed80f758791179de6b05795ab
Gitweb:        https://git.kernel.org/tip/32b1cbe380417f2ed80f758791179de6b05795ab
Author:        Marco Ammon <marco.ammon@fau.de>
AuthorDate:    Mon, 02 Sep 2019 14:02:59 +02:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Mon, 02 Sep 2019 14:02:59 +02:00

x86: Correct misc typos

Correct spelling typos in comments in different files under arch/x86/.

 [ bp: Merge into a single patch, massage. ]

Signed-off-by: Marco Ammon <marco.ammon@fau.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Nadav Amit <namit@vmware.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Pu Wen <puwen@hygon.cn>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: trivial@kernel.org
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190902102436.27396-1-marco.ammon@fau.de
---
 arch/x86/include/asm/text-patching.h | 4 ++--
 arch/x86/kernel/alternative.c        | 6 +++---
 arch/x86/kernel/kprobes/opt.c        | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/include/asm/text-patching.h b/arch/x86/include/asm/text-patching.h
index 70c0996..5e8319b 100644
--- a/arch/x86/include/asm/text-patching.h
+++ b/arch/x86/include/asm/text-patching.h
@@ -45,8 +45,8 @@ extern void text_poke_early(void *addr, const void *opcode, size_t len);
  * no thread can be preempted in the instructions being modified (no iret to an
  * invalid instruction possible) or if the instructions are changed from a
  * consistent state to another consistent state atomically.
- * On the local CPU you need to be protected again NMI or MCE handlers seeing an
- * inconsistent instruction while you patch.
+ * On the local CPU you need to be protected against NMI or MCE handlers seeing
+ * an inconsistent instruction while you patch.
  */
 extern void *text_poke(void *addr, const void *opcode, size_t len);
 extern void *text_poke_kgdb(void *addr, const void *opcode, size_t len);
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index ccd3201..9d3a971 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -713,7 +713,7 @@ void __init alternative_instructions(void)
 	 * Don't stop machine check exceptions while patching.
 	 * MCEs only happen when something got corrupted and in this
 	 * case we must do something about the corruption.
-	 * Ignoring it is worse than a unlikely patching race.
+	 * Ignoring it is worse than an unlikely patching race.
 	 * Also machine checks tend to be broadcast and if one CPU
 	 * goes into machine check the others follow quickly, so we don't
 	 * expect a machine check to cause undue problems during to code
@@ -753,8 +753,8 @@ void __init alternative_instructions(void)
  * When you use this code to patch more than one byte of an instruction
  * you need to make sure that other CPUs cannot execute this code in parallel.
  * Also no thread must be currently preempted in the middle of these
- * instructions. And on the local CPU you need to be protected again NMI or MCE
- * handlers seeing an inconsistent instruction while you patch.
+ * instructions. And on the local CPU you need to be protected against NMI or
+ * MCE handlers seeing an inconsistent instruction while you patch.
  */
 void __init_or_module text_poke_early(void *addr, const void *opcode,
 				      size_t len)
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index 9d4aede..b348dd5 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -403,7 +403,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op,
 			   (u8 *)op->kp.addr + op->optinsn.size);
 	len += RELATIVEJUMP_SIZE;
 
-	/* We have to use text_poke for instuction buffer because it is RO */
+	/* We have to use text_poke() for instruction buffer because it is RO */
 	text_poke(slot, buf, len);
 	ret = 0;
 out:

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-02 12:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 10:24 [PATCH 1/3] x86: fix typo in comment for poke_text_early Marco Ammon
2019-09-02 10:24 ` [PATCH 2/3] x86: fix typo in comment for alternative_instructions Marco Ammon
2019-09-02 10:24 ` [PATCH 3/3] x86: kprobes: fix typo in comment Marco Ammon
2019-09-02 12:10 ` [PATCH 1/3] x86: fix typo in comment for poke_text_early Borislav Petkov
2019-09-02 12:14 ` [tip: x86/cleanups] x86: Correct misc typos tip-bot2 for Marco Ammon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).