From: Borislav Petkov <bp@suse.de>
To: Jann Horn <jannh@google.com>, Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
the arch/x86 maintainers <x86@kernel.org>,
Andy Lutomirski <luto@kernel.org>,
kernel list <linux-kernel@vger.kernel.org>,
Kees Cook <keescook@chromium.org>,
security@kernel.org
Subject: Re: [PATCH v2] x86/dumpstack: don't dump kernel memory based on usermode RIP
Date: Wed, 29 Aug 2018 16:03:10 +0200 [thread overview]
Message-ID: <20180829140310.GG6337@nazgul.tnic> (raw)
In-Reply-To: <CAG48ez37HBh=0YfP=rLVGGEcFV0zJL_PLVgedFxDtyRgXHMROQ@mail.gmail.com>
On Wed, Aug 29, 2018 at 03:55:32PM +0200, Jann Horn wrote:
> > > diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
> > > index 9c8652974f8e..14b337582b6f 100644
> > > --- a/arch/x86/kernel/dumpstack.c
> > > +++ b/arch/x86/kernel/dumpstack.c
> > > @@ -89,14 +89,21 @@ static void printk_stack_address(unsigned long address, int reliable,
> > > * Thus, the 2/3rds prologue and 64 byte OPCODE_BUFSIZE is just a random
> > > * guesstimate in attempt to achieve all of the above.
> > > */
> > > -void show_opcodes(u8 *rip, const char *loglvl)
> > > +void show_opcodes(struct pt_regs *regs, const char *loglvl)
> > > {
> > > #define PROLOGUE_SIZE 42
> > > #define EPILOGUE_SIZE 21
> > > #define OPCODE_BUFSIZE (PROLOGUE_SIZE + 1 + EPILOGUE_SIZE)
> > > u8 opcodes[OPCODE_BUFSIZE];
> > > + u8 *prologue = (u8 *)(regs->ip - PROLOGUE_SIZE);
> >
> > Just a nitpick:
> >
> > <--- newline here.
>
> The code below this point is still part of the declarations. Do you
> want a newline here anyway? If you say yes, I'll adjust and resend.
Yeah, but I'd like the comment to separate out better. As I said, just a
nitpick.
But no need to resend - I believe tglx is (still) nice enough to fix it
up while applying.
:-)))
Thx.
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
next prev parent reply other threads:[~2018-08-29 14:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 15:49 [PATCH v2] x86/dumpstack: don't dump kernel memory based on usermode RIP Jann Horn
2018-08-28 16:25 ` Borislav Petkov
2018-08-28 16:29 ` Jann Horn
2018-08-29 7:09 ` Borislav Petkov
2018-08-29 7:10 ` Borislav Petkov
2018-08-29 13:55 ` Jann Horn
2018-08-29 14:03 ` Borislav Petkov [this message]
2018-08-30 11:13 ` [tip:x86/urgent] x86/dumpstack: Don't " tip-bot for Jann Horn
2018-08-31 15:12 ` tip-bot for Jann Horn
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=20180829140310.GG6337@nazgul.tnic \
--to=bp@suse.de \
--cc=hpa@zytor.com \
--cc=jannh@google.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=security@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).