Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1555729
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/4] x86/unwind: include __schedule() in stack traces |
| Date | 2017-01-10 18:30 +0100 |
| Message-ID | <sY8pc-4aE-1@gated-at.bofh.it> (permalink) |
| References | <sXMyl-7wx-11@gated-at.bofh.it> <sXMyl-7wx-13@gated-at.bofh.it> <sY1H4-8v8-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jan 10, 2017 at 11:14:51AM +0100, Miroslav Benes wrote:
> On Mon, 9 Jan 2017, Josh Poimboeuf wrote:
> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> > ---
> > arch/x86/include/asm/stacktrace.h | 5 +----
> > arch/x86/include/asm/switch_to.h | 10 +++++++++-
> > 2 files changed, 10 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/stacktrace.h b/arch/x86/include/asm/stacktrace.h
> > index 20ce3db..2e41c50 100644
> > --- a/arch/x86/include/asm/stacktrace.h
> > +++ b/arch/x86/include/asm/stacktrace.h
> > @@ -52,16 +52,13 @@ static inline bool on_stack(struct stack_info *info, void *addr, size_t len)
> > static inline unsigned long *
> > get_frame_pointer(struct task_struct *task, struct pt_regs *regs)
> > {
> > - struct inactive_task_frame *frame;
> > -
> > if (regs)
> > return (unsigned long *)regs->bp;
> >
> > if (task == current)
> > return __builtin_frame_address(0);
> >
> > - frame = (struct inactive_task_frame *)task->thread.sp;
> > - return (unsigned long *)READ_ONCE_NOCHECK(frame->bp);
> > + return &((struct inactive_task_frame *)task->thread.sp)->bp;
>
> You effectively remove one of the changes from the previous patch -
> READ_ONCE_NOCHECK. Is it intentional?
Yes, notice that it's no longer reading the value of bp on the stack.
It's instead getting a pointer to it. Since there's no longer a stack
access, READ_ONCE_NOCHECK is no longer needed.
--
Josh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3/4] x86/unwind: include __schedule() in stack traces Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-09 19:10 +0100
Re: [PATCH 3/4] x86/unwind: include __schedule() in stack traces Miroslav Benes <mbenes@suse.cz> - 2017-01-10 11:20 +0100
Re: [PATCH 3/4] x86/unwind: include __schedule() in stack traces Josh Poimboeuf <jpoimboe@redhat.com> - 2017-01-10 18:30 +0100
Re: [PATCH 3/4] x86/unwind: include __schedule() in stack traces Miroslav Benes <mbenes@suse.cz> - 2017-01-10 21:10 +0100
[tip:x86/urgent] x86/unwind: Include __schedule() in stack traces tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2017-01-12 11:20 +0100
csiph-web