lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150924123717.GA1611@wheatley>
Date:	Thu, 24 Sep 2015 14:37:17 +0200
From:	Martin Kletzander <mkletzan@...hat.com>
To:	"Shevchenko, Andriy" <andriy.shevchenko@...el.com>
Cc:	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"corbet@....net" <corbet@....net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"keescook@...omium.org" <keescook@...omium.org>,
	"linux@...musvillemoes.dk" <linux@...musvillemoes.dk>,
	"penguin-kernel@...ove.sakura.ne.jp" 
	<penguin-kernel@...ove.sakura.ne.jp>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"geert+renesas@...der.be" <geert+renesas@...der.be>,
	"tj@...nel.org" <tj@...nel.org>,
	"sboyd@...eaurora.org" <sboyd@...eaurora.org>
Subject: Re: [PATCH v2] lib: Documentation: Synchronize %p formatting
 documentation

On Thu, Sep 24, 2015 at 08:20:27AM +0000, Shevchenko, Andriy wrote:
>On Thu, 2015-09-24 at 11:16 +0300, Andy Shevchenko wrote:
>> On Thu, 2015-09-24 at 10:08 +0200, Martin Kletzander wrote:
>> > Move all pointer-formatting documentation to one place in the code
>> > and
>> > one place in the documentation instead of keeping it in three
>> > places
>> > with different level of completeness.  Documentation/printk
>> > -formats.txt
>> > has detailed information about each modifier, docstring above
>> > pointer()
>> > has short descriptions of them (as that is the function dealing
>> > with
>> > %p)
>> > and docstring above vsprintf() is removed as redundant.  Both
>> > docstrings
>> > in the code that were modified are updated with a reminder of
>> > updating
>> > the documentation upon any further change.
>> >
>>
>> Good for me!
>>
>> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>>
>
>Ah, sorry, it seems you have to distinguish %pn (which seems now as %p
>+ n if I didn't miss anything) and %n.
>

Sorry, my bad, thanks for catching that.

>After addressing this, take my above tag.
>

I added few more tiny fixes (see diff below), is it still OK for me to
add the Reviewed-by there?

Martin

diff --git i/Documentation/printk-formats.txt w/Documentation/printk-formats.txt
index c85e27264a2b..f6d1ab6b1165 100644
--- i/Documentation/printk-formats.txt
+++ w/Documentation/printk-formats.txt
@@ -315,9 +315,11 @@ Command from struct task_struct

 Ignored argument:

-	%pn
+	%n	%n

-	The argument passed will be ignored.
+	The argument passed will be ignored.  In other words, literal "%n" will
+	be in the output and the argument will be considered for next format
+	specifier.

 Thank you for your cooperation and attention.

diff --git i/lib/vsprintf.c w/lib/vsprintf.c
index 07205016415d..3e66fbbae8cd 100644
--- i/lib/vsprintf.c
+++ w/lib/vsprintf.c
@@ -1465,7 +1465,7 @@ int kptr_restrict __read_mostly;
  * - 'Cr' For a clock, it prints the current rate of the clock
  * - 'T' For task_struct->comm
  *
- * ** Please update Documentation/printk-formats.txt when making changes **
+ * ** Please update also Documentation/printk-formats.txt when making changes **
  *
  * Note: The difference between 'S' and 'F' is that on ia64 and ppc64
  * function pointers are really function descriptors, which contain a
@@ -1831,11 +1831,14 @@ qualifier:
  * @fmt: The format string to use
  * @args: Arguments for the format string
  *
- * This function follows C99 vsnprintf, but has some extensions.  See
- * pointer() or Documentation/printk-formats.txt for all format
- * specifiers.
+ * This function follows C99 vsnprintf, but has some extensions:
+ * %n is ignored
+ * %p* is handled by pointer()
+ *
+ * See pointer() or Documentation/printk-formats.txt for more
+ * extensive description.
  *
- * ** Please update the documentation when making changes **
+ * ** Please update the documentation on both places when making changes **
  *
  * The return value is the number of characters which would
  * be generated for the given input, excluding the trailing
--

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ