All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel:kprobe: Fix typo issue
@ 2021-03-16 12:57 Xiaofeng Cao
  2021-03-16 17:29 ` Randy Dunlap
  2021-03-17  0:01 ` Masami Hiramatsu
  0 siblings, 2 replies; 3+ messages in thread
From: Xiaofeng Cao @ 2021-03-16 12:57 UTC (permalink / raw)
  To: naveen.n.rao, anil.s.keshavamurthy, davem, mhiramat
  Cc: linux-kernel, Xiaofeng Cao

change 'immmediately' to 'immediately'
change 'quiesence' to 'quiescence'
change 'unneed' to 'unneeded'
change 'sinec' to 'since
change 'sefe' to 'safe''
change 'And' to 'At the'
change 'buy' to 'but'

Signed-off-by: Xiaofeng Cao <caoxiaofeng@yulong.com>
---
 kernel/kprobes.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 745f08fdd7a6..ae3a22d2099b 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -506,7 +506,7 @@ static void do_optimize_kprobes(void)
 	/*
 	 * The optimization/unoptimization refers online_cpus via
 	 * stop_machine() and cpu-hotplug modifies online_cpus.
-	 * And same time, text_mutex will be held in cpu-hotplug and here.
+	 * At the same time, text_mutex will be held in cpu-hotplug and here.
 	 * This combination can cause a deadlock (cpu-hotplug try to lock
 	 * text_mutex but stop_machine can not be done because online_cpus
 	 * has been changed)
@@ -592,12 +592,12 @@ static void kprobe_optimizer(struct work_struct *work)
 
 	/*
 	 * Step 1: Unoptimize kprobes and collect cleaned (unused and disarmed)
-	 * kprobes before waiting for quiesence period.
+	 * kprobes before waiting for quiescence period.
 	 */
 	do_unoptimize_kprobes();
 
 	/*
-	 * Step 2: Wait for quiesence period to ensure all potentially
+	 * Step 2: Wait for quiescence period to ensure all potentially
 	 * preempted tasks to have normally scheduled. Because optprobe
 	 * may modify multiple instructions, there is a chance that Nth
 	 * instruction is preempted. In that case, such tasks can return
@@ -607,10 +607,10 @@ static void kprobe_optimizer(struct work_struct *work)
 	 */
 	synchronize_rcu_tasks();
 
-	/* Step 3: Optimize kprobes after quiesence period */
+	/* Step 3: Optimize kprobes after quiescence period */
 	do_optimize_kprobes();
 
-	/* Step 4: Free cleaned kprobes after quiesence period */
+	/* Step 4: Free cleaned kprobes after quiescence period */
 	do_free_cleaned_kprobes();
 
 	mutex_unlock(&text_mutex);
@@ -631,7 +631,7 @@ void wait_for_kprobe_optimizer(void)
 	while (!list_empty(&optimizing_list) || !list_empty(&unoptimizing_list)) {
 		mutex_unlock(&kprobe_mutex);
 
-		/* this will also make optimizing_work execute immmediately */
+		/* this will also make optimizing_work execute immediately */
 		flush_delayed_work(&optimizing_work);
 		/* @optimizing_work might not have been queued yet, relax */
 		cpu_relax();
@@ -1057,7 +1057,7 @@ static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
 
 err_ftrace:
 	/*
-	 * At this point, sinec ops is not registered, we should be sefe from
+	 * At this point, since ops is not registered, we should be safe from
 	 * registering empty filter.
 	 */
 	ftrace_set_filter_ip(ops, (unsigned long)p->addr, 1, 0);
@@ -1712,7 +1712,7 @@ static struct kprobe *__disable_kprobe(struct kprobe *p)
 			/*
 			 * If kprobes_all_disarmed is set, orig_p
 			 * should have already been disarmed, so
-			 * skip unneed disarming process.
+			 * skip unneeded disarming process.
 			 */
 			if (!kprobes_all_disarmed) {
 				ret = disarm_kprobe(orig_p, true);
@@ -2424,7 +2424,7 @@ static int kprobes_module_callback(struct notifier_block *nb,
 			     within_module_core((unsigned long)p->addr, mod))) {
 				/*
 				 * The vaddr this probe is installed will soon
-				 * be vfreed buy not synced to disk. Hence,
+				 * be vfreed but not synced to disk. Hence,
 				 * disarming the breakpoint isn't needed.
 				 *
 				 * Note, this will also move any optimized probes
-- 
2.25.1


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

* Re: [PATCH] kernel:kprobe: Fix typo issue
  2021-03-16 12:57 [PATCH] kernel:kprobe: Fix typo issue Xiaofeng Cao
@ 2021-03-16 17:29 ` Randy Dunlap
  2021-03-17  0:01 ` Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-03-16 17:29 UTC (permalink / raw)
  To: Xiaofeng Cao, naveen.n.rao, anil.s.keshavamurthy, davem, mhiramat
  Cc: linux-kernel, Xiaofeng Cao

On 3/16/21 5:57 AM, Xiaofeng Cao wrote:
> change 'immmediately' to 'immediately'
> change 'quiesence' to 'quiescence'
> change 'unneed' to 'unneeded'
> change 'sinec' to 'since
> change 'sefe' to 'safe''
> change 'And' to 'At the'
> change 'buy' to 'but'
> 
> Signed-off-by: Xiaofeng Cao <caoxiaofeng@yulong.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  kernel/kprobes.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 745f08fdd7a6..ae3a22d2099b 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -506,7 +506,7 @@ static void do_optimize_kprobes(void)
>  	/*
>  	 * The optimization/unoptimization refers online_cpus via
>  	 * stop_machine() and cpu-hotplug modifies online_cpus.
> -	 * And same time, text_mutex will be held in cpu-hotplug and here.
> +	 * At the same time, text_mutex will be held in cpu-hotplug and here.
>  	 * This combination can cause a deadlock (cpu-hotplug try to lock
>  	 * text_mutex but stop_machine can not be done because online_cpus
>  	 * has been changed)
> @@ -592,12 +592,12 @@ static void kprobe_optimizer(struct work_struct *work)
>  
>  	/*
>  	 * Step 1: Unoptimize kprobes and collect cleaned (unused and disarmed)
> -	 * kprobes before waiting for quiesence period.
> +	 * kprobes before waiting for quiescence period.
>  	 */
>  	do_unoptimize_kprobes();
>  
>  	/*
> -	 * Step 2: Wait for quiesence period to ensure all potentially
> +	 * Step 2: Wait for quiescence period to ensure all potentially
>  	 * preempted tasks to have normally scheduled. Because optprobe
>  	 * may modify multiple instructions, there is a chance that Nth
>  	 * instruction is preempted. In that case, such tasks can return
> @@ -607,10 +607,10 @@ static void kprobe_optimizer(struct work_struct *work)
>  	 */
>  	synchronize_rcu_tasks();
>  
> -	/* Step 3: Optimize kprobes after quiesence period */
> +	/* Step 3: Optimize kprobes after quiescence period */
>  	do_optimize_kprobes();
>  
> -	/* Step 4: Free cleaned kprobes after quiesence period */
> +	/* Step 4: Free cleaned kprobes after quiescence period */
>  	do_free_cleaned_kprobes();
>  
>  	mutex_unlock(&text_mutex);
> @@ -631,7 +631,7 @@ void wait_for_kprobe_optimizer(void)
>  	while (!list_empty(&optimizing_list) || !list_empty(&unoptimizing_list)) {
>  		mutex_unlock(&kprobe_mutex);
>  
> -		/* this will also make optimizing_work execute immmediately */
> +		/* this will also make optimizing_work execute immediately */
>  		flush_delayed_work(&optimizing_work);
>  		/* @optimizing_work might not have been queued yet, relax */
>  		cpu_relax();
> @@ -1057,7 +1057,7 @@ static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
>  
>  err_ftrace:
>  	/*
> -	 * At this point, sinec ops is not registered, we should be sefe from
> +	 * At this point, since ops is not registered, we should be safe from
>  	 * registering empty filter.
>  	 */
>  	ftrace_set_filter_ip(ops, (unsigned long)p->addr, 1, 0);
> @@ -1712,7 +1712,7 @@ static struct kprobe *__disable_kprobe(struct kprobe *p)
>  			/*
>  			 * If kprobes_all_disarmed is set, orig_p
>  			 * should have already been disarmed, so
> -			 * skip unneed disarming process.
> +			 * skip unneeded disarming process.
>  			 */
>  			if (!kprobes_all_disarmed) {
>  				ret = disarm_kprobe(orig_p, true);
> @@ -2424,7 +2424,7 @@ static int kprobes_module_callback(struct notifier_block *nb,
>  			     within_module_core((unsigned long)p->addr, mod))) {
>  				/*
>  				 * The vaddr this probe is installed will soon
> -				 * be vfreed buy not synced to disk. Hence,
> +				 * be vfreed but not synced to disk. Hence,
>  				 * disarming the breakpoint isn't needed.
>  				 *
>  				 * Note, this will also move any optimized probes
> 


-- 
~Randy


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

* Re: [PATCH] kernel:kprobe: Fix typo issue
  2021-03-16 12:57 [PATCH] kernel:kprobe: Fix typo issue Xiaofeng Cao
  2021-03-16 17:29 ` Randy Dunlap
@ 2021-03-17  0:01 ` Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2021-03-17  0:01 UTC (permalink / raw)
  To: Xiaofeng Cao
  Cc: naveen.n.rao, anil.s.keshavamurthy, davem, linux-kernel, Xiaofeng Cao

Hi Xiaofeng,

On Tue, 16 Mar 2021 20:57:51 +0800
Xiaofeng Cao <cxfcosmos@gmail.com> wrote:

> change 'immmediately' to 'immediately'
> change 'quiesence' to 'quiescence'
> change 'unneed' to 'unneeded'
> change 'sinec' to 'since
> change 'sefe' to 'safe''
> change 'And' to 'At the'
> change 'buy' to 'but'

Thanks for the fix!

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>



> 
> Signed-off-by: Xiaofeng Cao <caoxiaofeng@yulong.com>
> ---
>  kernel/kprobes.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 745f08fdd7a6..ae3a22d2099b 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -506,7 +506,7 @@ static void do_optimize_kprobes(void)
>  	/*
>  	 * The optimization/unoptimization refers online_cpus via
>  	 * stop_machine() and cpu-hotplug modifies online_cpus.
> -	 * And same time, text_mutex will be held in cpu-hotplug and here.
> +	 * At the same time, text_mutex will be held in cpu-hotplug and here.
>  	 * This combination can cause a deadlock (cpu-hotplug try to lock
>  	 * text_mutex but stop_machine can not be done because online_cpus
>  	 * has been changed)
> @@ -592,12 +592,12 @@ static void kprobe_optimizer(struct work_struct *work)
>  
>  	/*
>  	 * Step 1: Unoptimize kprobes and collect cleaned (unused and disarmed)
> -	 * kprobes before waiting for quiesence period.
> +	 * kprobes before waiting for quiescence period.
>  	 */
>  	do_unoptimize_kprobes();
>  
>  	/*
> -	 * Step 2: Wait for quiesence period to ensure all potentially
> +	 * Step 2: Wait for quiescence period to ensure all potentially
>  	 * preempted tasks to have normally scheduled. Because optprobe
>  	 * may modify multiple instructions, there is a chance that Nth
>  	 * instruction is preempted. In that case, such tasks can return
> @@ -607,10 +607,10 @@ static void kprobe_optimizer(struct work_struct *work)
>  	 */
>  	synchronize_rcu_tasks();
>  
> -	/* Step 3: Optimize kprobes after quiesence period */
> +	/* Step 3: Optimize kprobes after quiescence period */
>  	do_optimize_kprobes();
>  
> -	/* Step 4: Free cleaned kprobes after quiesence period */
> +	/* Step 4: Free cleaned kprobes after quiescence period */
>  	do_free_cleaned_kprobes();
>  
>  	mutex_unlock(&text_mutex);
> @@ -631,7 +631,7 @@ void wait_for_kprobe_optimizer(void)
>  	while (!list_empty(&optimizing_list) || !list_empty(&unoptimizing_list)) {
>  		mutex_unlock(&kprobe_mutex);
>  
> -		/* this will also make optimizing_work execute immmediately */
> +		/* this will also make optimizing_work execute immediately */
>  		flush_delayed_work(&optimizing_work);
>  		/* @optimizing_work might not have been queued yet, relax */
>  		cpu_relax();
> @@ -1057,7 +1057,7 @@ static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
>  
>  err_ftrace:
>  	/*
> -	 * At this point, sinec ops is not registered, we should be sefe from
> +	 * At this point, since ops is not registered, we should be safe from
>  	 * registering empty filter.
>  	 */
>  	ftrace_set_filter_ip(ops, (unsigned long)p->addr, 1, 0);
> @@ -1712,7 +1712,7 @@ static struct kprobe *__disable_kprobe(struct kprobe *p)
>  			/*
>  			 * If kprobes_all_disarmed is set, orig_p
>  			 * should have already been disarmed, so
> -			 * skip unneed disarming process.
> +			 * skip unneeded disarming process.
>  			 */
>  			if (!kprobes_all_disarmed) {
>  				ret = disarm_kprobe(orig_p, true);
> @@ -2424,7 +2424,7 @@ static int kprobes_module_callback(struct notifier_block *nb,
>  			     within_module_core((unsigned long)p->addr, mod))) {
>  				/*
>  				 * The vaddr this probe is installed will soon
> -				 * be vfreed buy not synced to disk. Hence,
> +				 * be vfreed but not synced to disk. Hence,
>  				 * disarming the breakpoint isn't needed.
>  				 *
>  				 * Note, this will also move any optimized probes
> -- 
> 2.25.1
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

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

end of thread, other threads:[~2021-03-17  0:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 12:57 [PATCH] kernel:kprobe: Fix typo issue Xiaofeng Cao
2021-03-16 17:29 ` Randy Dunlap
2021-03-17  0:01 ` Masami Hiramatsu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.