From: "Justin He (Arm Technology China)" <Justin.He@arm.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Kees Cook <keescook@chromium.org>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Shuah Khan <shuah@kernel.org>,
"Tobin C. Harding" <tobin@kernel.org>
Subject: RE: [PATCH 2/2] lib/test_printf: add test of null/invalid pointer dereference for dentry
Date: Fri, 16 Aug 2019 08:31:57 +0000 [thread overview]
Message-ID: <DB7PR08MB3082AEAE86FD463713FA4825F7AF0@DB7PR08MB3082.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20190816082642.6xdrxnrnv42vq4um@pathway.suse.cz>
Hi Petr
> -----Original Message-----
> From: Petr Mladek <pmladek@suse.com>
> Sent: 2019年8月16日 16:27
> To: Justin He (Arm Technology China) <Justin.He@arm.com>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>; Sergey Senozhatsky
> <sergey.senozhatsky@gmail.com>; Thomas Gleixner <tglx@linutronix.de>;
> Andy Shevchenko <andriy.shevchenko@linux.intel.com>; linux-
> kernel@vger.kernel.org; Kees Cook <keescook@chromium.org>; Steven
> Rostedt (VMware) <rostedt@goodmis.org>; Shuah Khan
> <shuah@kernel.org>; Tobin C. Harding <tobin@kernel.org>
> Subject: Re: [PATCH 2/2] lib/test_printf: add test of null/invalid pointer
> dereference for dentry
>
> On Fri 2019-08-09 09:24:57, Jia He wrote:
> > This add some additional test cases of null/invalid pointer dereference
> > for dentry and file (%pd and %pD)
> >
> > Signed-off-by: Jia He <justin.he@arm.com>
> > ---
> > lib/test_printf.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/lib/test_printf.c b/lib/test_printf.c
> > index 944eb50f3862..befedffeb476 100644
> > --- a/lib/test_printf.c
> > +++ b/lib/test_printf.c
> > @@ -455,6 +455,13 @@ dentry(void)
> > test("foo", "%pd", &test_dentry[0]);
> > test("foo", "%pd2", &test_dentry[0]);
> >
> > + /* test the null/invalid pointer case for dentry */
> > + test("(null)", "%pd", NULL);
> > + test("(efault)", "%pd", PTR_INVALID);
> > + /* test the null/invalid pointer case for file */
>
> The two comments mention something that is obvious from the code.
>
No problem, ok with me 😊
--
Cheers,
Justin (Jia He)
> I have pushed the patch as is and removed the comments in
> a follow up patch [1]. Both are in printk.git, branch for-5.4.
>
> > + test("(null)", "%pD", NULL);
> > + test("(efault)", "%pD", PTR_INVALID);
>
> Reference:
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git/commi
> t/?h=for-5.4&id=8ebea6ea1a7ed5d67ecbb2a493c716a2a89c0be2
>
> Best Regards,
> Petr
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
next prev parent reply other threads:[~2019-08-16 8:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 1:24 [PATCH 1/2] vsprintf: Prevent crash when dereferencing invalid pointers for %pD Jia He
2019-08-09 1:24 ` [PATCH 2/2] lib/test_printf: add test of null/invalid pointer dereference for dentry Jia He
2019-08-09 10:51 ` Andy Shevchenko
2019-08-16 8:26 ` Petr Mladek
2019-08-16 8:31 ` Justin He (Arm Technology China) [this message]
2019-08-09 10:51 ` [PATCH 1/2] vsprintf: Prevent crash when dereferencing invalid pointers for %pD Andy Shevchenko
2019-08-09 10:56 ` Justin He (Arm Technology China)
2019-08-16 8:20 ` Petr Mladek
2019-08-15 7:52 ` Sergey Senozhatsky
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=DB7PR08MB3082AEAE86FD463713FA4825F7AF0@DB7PR08MB3082.eurprd08.prod.outlook.com \
--to=justin.he@arm.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=geert+renesas@glider.be \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=tobin@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
all inboxes | Powered by JetHome®