[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR08MB43764CC4C5CE337239ECA1B7F7089@AM6PR08MB4376.eurprd08.prod.outlook.com>
Date: Wed, 23 Jun 2021 03:27:54 +0000
From: Justin He <Justin.He@....com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
CC: "Peter Zijlstra (Intel)" <peterz@...radead.org>,
Eric Biggers <ebiggers@...gle.com>,
"Ahmed S. Darwish" <a.darwish@...utronix.de>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
Matthew Wilcox <willy@...radead.org>,
Christoph Hellwig <hch@...radead.org>, nd <nd@....com>,
Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Jonathan Corbet <corbet@....net>,
Alexander Viro <viro@...iv.linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: RE: [PATCH v5 4/4] lib/test_printf.c: add test cases for '%pD'
Hi Rasmus
> -----Original Message-----
> From: Rasmus Villemoes <linux@...musvillemoes.dk>
> Sent: Wednesday, June 23, 2021 4:52 AM
> To: Justin He <Justin.He@....com>; Petr Mladek <pmladek@...e.com>; Steven
> Rostedt <rostedt@...dmis.org>; Sergey Senozhatsky
> <senozhatsky@...omium.org>; Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com>; Jonathan Corbet <corbet@....net>;
> Alexander Viro <viro@...iv.linux.org.uk>; Linus Torvalds <torvalds@...ux-
> foundation.org>
> Cc: Peter Zijlstra (Intel) <peterz@...radead.org>; Eric Biggers
> <ebiggers@...gle.com>; Ahmed S. Darwish <a.darwish@...utronix.de>; linux-
> doc@...r.kernel.org; linux-kernel@...r.kernel.org; linux-
> fsdevel@...r.kernel.org; Matthew Wilcox <willy@...radead.org>; Christoph
> Hellwig <hch@...radead.org>; nd <nd@....com>
> Subject: Re: [PATCH v5 4/4] lib/test_printf.c: add test cases for '%pD'
>
> On 22/06/2021 16.06, Jia He wrote:
> > After the behaviour of specifier '%pD' is changed to print the full path
> > of struct file, the related test cases are also updated.
> >
> > Given the full path string of '%pD' is prepended from the end of the
> scratch
> > buffer, the check of "wrote beyond the nul-terminator" should be skipped
> > for '%pD'.
> >
> > Parameterize the new using_scratch_space in __test, do_test to skip the
> > test case mentioned above,
>
> I actually prefer the first suggestion of just having a file-global bool.
Yes, this is my previous proposal, but seems it is not satisfying 😉.
--
Cheers,
Justin (Jia He)
>
> If and when we get other checks that need to be done selectively [e.g.
> "snprintf into a too short buffer produces a prefix of the full string",
> which also came up during this discussion but was ultimately kept]
> depending on the %<whatever> being exercised, we can add a "u32 nocheck"
> with a bunch of bits saying what to elide.
>
> Not insisting either way, just my $0.02.
>
Powered by blists - more mailing lists