linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86_64: use kstack_end() in dumpstack_64.c
@ 2015-02-22 15:23 Adrien Schildknecht
  2015-02-23 17:17 ` Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Adrien Schildknecht @ 2015-02-22 15:23 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86, srostedt, luto, adrien+dev, rostedt, bp,
	linux-kernel

i386 is already using kstack_end() in dumpstack_32.c.
We should also use it to make the code clearer and unify the stack
printing logic some more.

This patch depends on patch "x86: fix output of show_stack_log_lvl()"

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
---
 arch/x86/kernel/dumpstack_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 553573b..5f1c626 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -280,7 +280,7 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
 				pr_cont(" <EOI> ");
 			}
 		} else {
-		if (((long) stack & (THREAD_SIZE-1)) == 0)
+		if (kstack_end(stack))
 			break;
 		}
 		if ((i % STACKSLOTS_PER_LINE) == 0) {
-- 
2.2.1


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

* Re: [PATCH] x86_64: use kstack_end() in dumpstack_64.c
  2015-02-22 15:23 [PATCH] x86_64: use kstack_end() in dumpstack_64.c Adrien Schildknecht
@ 2015-02-23 17:17 ` Steven Rostedt
  2015-02-23 17:20   ` Borislav Petkov
  2015-02-23 17:29   ` Adrien Schildknecht
  2015-02-23 18:02 ` Borislav Petkov
  2015-03-03 11:28 ` [tip:x86/debug] x86/kernel: Use " tip-bot for Adrien Schildknecht
  2 siblings, 2 replies; 7+ messages in thread
From: Steven Rostedt @ 2015-02-23 17:17 UTC (permalink / raw)
  To: Adrien Schildknecht
  Cc: tglx, mingo, hpa, x86, srostedt, luto, bp, linux-kernel

On Sun, 22 Feb 2015 16:23:58 +0100
Adrien Schildknecht <adrien+dev@schischi.me> wrote:

> i386 is already using kstack_end() in dumpstack_32.c.
> We should also use it to make the code clearer and unify the stack
> printing logic some more.

Looks fine to me.

> 
> This patch depends on patch "x86: fix output of show_stack_log_lvl()"

I'm curious to what the dependency is? What would break if we apply
this without that patch?

-- Steve

> 
> Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
> ---
>  arch/x86/kernel/dumpstack_64.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
> index 553573b..5f1c626 100644
> --- a/arch/x86/kernel/dumpstack_64.c
> +++ b/arch/x86/kernel/dumpstack_64.c
> @@ -280,7 +280,7 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
>  				pr_cont(" <EOI> ");
>  			}
>  		} else {
> -		if (((long) stack & (THREAD_SIZE-1)) == 0)
> +		if (kstack_end(stack))
>  			break;
>  		}
>  		if ((i % STACKSLOTS_PER_LINE) == 0) {


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

* Re: [PATCH] x86_64: use kstack_end() in dumpstack_64.c
  2015-02-23 17:17 ` Steven Rostedt
@ 2015-02-23 17:20   ` Borislav Petkov
  2015-02-23 17:29   ` Adrien Schildknecht
  1 sibling, 0 replies; 7+ messages in thread
From: Borislav Petkov @ 2015-02-23 17:20 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Adrien Schildknecht, tglx, mingo, hpa, x86, srostedt, luto, linux-kernel

On Mon, Feb 23, 2015 at 12:17:51PM -0500, Steven Rostedt wrote:
> I'm curious to what the dependency is? What would break if we apply
> this without that patch?

Nah, no dependency - it causes just a little fuzz when the previous one
is missing.

I'll apply it to the proper tree and fixup the commit message :)

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

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

* Re: [PATCH] x86_64: use kstack_end() in dumpstack_64.c
  2015-02-23 17:17 ` Steven Rostedt
  2015-02-23 17:20   ` Borislav Petkov
@ 2015-02-23 17:29   ` Adrien Schildknecht
  2015-02-23 17:54     ` Steven Rostedt
  1 sibling, 1 reply; 7+ messages in thread
From: Adrien Schildknecht @ 2015-02-23 17:29 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: tglx, mingo, hpa, x86, srostedt, luto, bp, linux-kernel

> > This patch depends on patch "x86: fix output of
> > show_stack_log_lvl()"
> 
> I'm curious to what the dependency is? What would break if we apply
> this without that patch?

Maybe I misunderstood "dependency".
I mean that this patch won't apply properly since a line of the context
was changed by the previous patch.
"if ((i % STACKSLOTS_PER_LINE) == 0) {"

-- 
Adrien Schildknecht

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

* Re: [PATCH] x86_64: use kstack_end() in dumpstack_64.c
  2015-02-23 17:29   ` Adrien Schildknecht
@ 2015-02-23 17:54     ` Steven Rostedt
  0 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2015-02-23 17:54 UTC (permalink / raw)
  To: Adrien Schildknecht
  Cc: tglx, mingo, hpa, x86, srostedt, luto, bp, linux-kernel

On Mon, 23 Feb 2015 18:29:05 +0100
Adrien Schildknecht <adrien+dev@schischi.me> wrote:

> > > This patch depends on patch "x86: fix output of
> > > show_stack_log_lvl()"
> > 
> > I'm curious to what the dependency is? What would break if we apply
> > this without that patch?
> 
> Maybe I misunderstood "dependency".
> I mean that this patch won't apply properly since a line of the context
> was changed by the previous patch.
> "if ((i % STACKSLOTS_PER_LINE) == 0) {"
> 

Yeah, "dependency" is a bit ambiguous here. It can mean both "this
patch wont work without said patch" as well as "this patch wont apply
without said patch". Probably would have been better to say that it
won't apply to avoid the ambiguity.

Also, these types of notes are best stated after the '---' line. As
it's good information for the maintainer pulling in the patch, but
should not go in the change log. Same for comments like "Changes since
version 1 of this series".

That is:

i386 is already using kstack_end() in dumpstack_32.c.
We should also use it to make the code clearer and unify the stack
printing logic some more.

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
---
Note: This patch depends on patch "x86: fix output of show_stack_log_lvl()"
or it might not apply properly.

 arch/x86/kernel/dumpstack_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


The change log for the above stops at the '---'.

-- Steve

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

* Re: [PATCH] x86_64: use kstack_end() in dumpstack_64.c
  2015-02-22 15:23 [PATCH] x86_64: use kstack_end() in dumpstack_64.c Adrien Schildknecht
  2015-02-23 17:17 ` Steven Rostedt
@ 2015-02-23 18:02 ` Borislav Petkov
  2015-03-03 11:28 ` [tip:x86/debug] x86/kernel: Use " tip-bot for Adrien Schildknecht
  2 siblings, 0 replies; 7+ messages in thread
From: Borislav Petkov @ 2015-02-23 18:02 UTC (permalink / raw)
  To: Adrien Schildknecht
  Cc: tglx, mingo, hpa, x86, srostedt, luto, rostedt, linux-kernel

On Sun, Feb 22, 2015 at 04:23:58PM +0100, Adrien Schildknecht wrote:
> i386 is already using kstack_end() in dumpstack_32.c.
> We should also use it to make the code clearer and unify the stack
> printing logic some more.
> 
> This patch depends on patch "x86: fix output of show_stack_log_lvl()"
> 
> Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

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

* [tip:x86/debug] x86/kernel: Use kstack_end() in dumpstack_64.c
  2015-02-22 15:23 [PATCH] x86_64: use kstack_end() in dumpstack_64.c Adrien Schildknecht
  2015-02-23 17:17 ` Steven Rostedt
  2015-02-23 18:02 ` Borislav Petkov
@ 2015-03-03 11:28 ` tip-bot for Adrien Schildknecht
  2 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Adrien Schildknecht @ 2015-03-03 11:28 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: torvalds, bp, adrien+dev, mingo, tglx, hpa, rostedt, linux-kernel

Commit-ID:  04769ae3ac72f86324a189b69f53bf3bfb61acfd
Gitweb:     http://git.kernel.org/tip/04769ae3ac72f86324a189b69f53bf3bfb61acfd
Author:     Adrien Schildknecht <adrien+dev@schischi.me>
AuthorDate: Sun, 22 Feb 2015 16:23:58 +0100
Committer:  Borislav Petkov <bp@suse.de>
CommitDate: Mon, 23 Feb 2015 18:37:13 +0100

x86/kernel: Use kstack_end() in dumpstack_64.c

i386 is already using kstack_end() in dumpstack_32.c. We should also
use it to make the code clearer and unify the stack printing logic some
more.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: c: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1424618638-6375-1-git-send-email-adrien+dev@schischi.me
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/kernel/dumpstack_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 553573b..5f1c626 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -280,7 +280,7 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
 				pr_cont(" <EOI> ");
 			}
 		} else {
-		if (((long) stack & (THREAD_SIZE-1)) == 0)
+		if (kstack_end(stack))
 			break;
 		}
 		if ((i % STACKSLOTS_PER_LINE) == 0) {

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

end of thread, other threads:[~2015-03-03 11:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-22 15:23 [PATCH] x86_64: use kstack_end() in dumpstack_64.c Adrien Schildknecht
2015-02-23 17:17 ` Steven Rostedt
2015-02-23 17:20   ` Borislav Petkov
2015-02-23 17:29   ` Adrien Schildknecht
2015-02-23 17:54     ` Steven Rostedt
2015-02-23 18:02 ` Borislav Petkov
2015-03-03 11:28 ` [tip:x86/debug] x86/kernel: Use " tip-bot for Adrien Schildknecht

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).