From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Vernon Lovejoy <vlovejoy@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/show_trace_log_lvl: ensure stack pointer is aligned, again
Date: Thu, 27 Apr 2023 21:31:58 -0700 [thread overview]
Message-ID: <20230428043158.r5omehiaqawcac2y@treble> (raw)
In-Reply-To: <20230427140054.GA17800@redhat.com>
On Thu, Apr 27, 2023 at 04:00:54PM +0200, Oleg Nesterov wrote:
> diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
> index 0bf6779187dd..71ab445a29c3 100644
> --- a/arch/x86/kernel/dumpstack.c
> +++ b/arch/x86/kernel/dumpstack.c
> @@ -214,6 +214,7 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
> * - hardirq stack
> * - entry stack
> */
> + stack = PTR_ALIGN(stack, sizeof(long));
> for ( ; stack; stack = PTR_ALIGN(stack_info.next_sp, sizeof(long))) {
> const char *stack_name;
Seems reasonable, though 'stack' is already initialized a few lines
above this, so it would be cleaner to do the PTR_ALIGN then. Or even
better, just move it all to the for loop:
for (stack = PTR_ALIGN(stack ? : get_stack_pointer(task, regs));
stack;
stack = PTR_ALIGN(stack_info.next_sp, sizeof(long))) {
--
Josh
next prev parent reply other threads:[~2023-04-28 4:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 14:00 Oleg Nesterov
2023-04-28 4:31 ` Josh Poimboeuf [this message]
2023-04-28 6:55 ` Oleg Nesterov
2023-04-28 23:57 ` Josh Poimboeuf
2023-04-29 10:08 ` Oleg Nesterov
2023-04-30 11:59 ` David Laight
2023-04-30 19:00 ` Oleg Nesterov
2023-05-12 2:20 ` Josh Poimboeuf
2023-05-12 10:43 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230428043158.r5omehiaqawcac2y@treble \
--to=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vlovejoy@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®