<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/lib/vsprintf.c, branch linux-2.6.30.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.30.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.30.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2009-04-08T15:03:44Z</updated>
<entry>
<title>printk: fix wrong format string iter for printk</title>
<updated>2009-04-08T15:03:44Z</updated>
<author>
<name>Zhaolei</name>
<email>zhaolei@cn.fujitsu.com</email>
</author>
<published>2009-03-27T09:09:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=022624a758dc9489388a99ad29577b4c8c09237c'/>
<id>urn:sha1:022624a758dc9489388a99ad29577b4c8c09237c</id>
<content type='text'>
printk("%Q");

 Output before patch:  %QQ
 Output  after patch:  %Q

Signed-off-by: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Acked-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: torvalds@linux-foundation.org
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;49CC97B6.7040809@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>vsprintf: unify the format decoding layer for its 3 users, cleanup</title>
<updated>2009-03-14T11:37:09Z</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@gmail.com</email>
</author>
<published>2009-03-14T11:08:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ed681a91ab805341675d166a9592551093c0a2d9'/>
<id>urn:sha1:ed681a91ab805341675d166a9592551093c0a2d9</id>
<content type='text'>
Impact: cleanup

Rename FORMAT_TYPE_WITDH
 to =&gt; FORMAT_TYPE_WIDTH

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>fix regression from "vsprintf: unify the format decoding layer for its 3 users"</title>
<updated>2009-03-14T11:37:08Z</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@gmail.com</email>
</author>
<published>2009-03-14T11:08:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=adf26f84a62b492e002d3b75af671f23ddd3be0a'/>
<id>urn:sha1:adf26f84a62b492e002d3b75af671f23ddd3be0a</id>
<content type='text'>
Jeremy Fitzhardinge reported:

&gt; Change fef20d9c1380f04ba9492d6463148db07b413708, "vsprintf:
&gt; unify the format decoding layer for its 3 users", causes a
&gt; regression in xenbus which results in no devices getting
&gt; attached to a new domain.

%.*s is broken - fix it.

Reported-by: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>vsprintf: fix bug in negative value printing</title>
<updated>2009-03-10T12:15:06Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-09T20:15:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=39e874f8afbdb3745e2406ce4ecbde9ac4cbaa78'/>
<id>urn:sha1:39e874f8afbdb3745e2406ce4ecbde9ac4cbaa78</id>
<content type='text'>
Sitsofe Wheeler found and bisected that while unifying the
vsprintf format decoding in:

  fef20d9: vsprintf: unify the format decoding layer for its 3 users

The sign flag has been dropped out in favour of
precise types (ie: LONG/ULONG).

But the format helper number() still needs this flag to keep track of
the signedness unless it will consider all numbers as unsigned.

Also add an explicit cast to int (for %d) while parsing with va_arg()
to ensure the highest bit is well extended on the 64 bits number that
hosts the value in case of negative values.

Reported-Bisected-Tested-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
LKML-Reference: &lt;20090309201503.GA5010@nowhere&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>vsprintf: unify the format decoding layer for its 3 users</title>
<updated>2009-03-06T16:44:27Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-06T16:21:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fef20d9c1380f04ba9492d6463148db07b413708'/>
<id>urn:sha1:fef20d9c1380f04ba9492d6463148db07b413708</id>
<content type='text'>
An new optimization is making its way to ftrace. Its purpose is to
make trace_printk() consuming less memory and be faster.

Written by Lai Jiangshan, the approach is to delay the formatting
job from tracing time to output time.

Currently, a call to trace_printk() will format the whole string and
insert it into the ring buffer. Then you can read it on /debug/tracing/trace
file.

The new implementation stores the address of the format string and
the binary parameters into the ring buffer, making the packet more compact
and faster to insert.
Later, when the user exports the traces, the format string is retrieved
with the binary parameters and the formatting job is eventually done.

The new implementation rewrites a lot of format decoding bits from
vsnprintf() function, making now 3 differents functions to maintain
in their duplicated parts of printf format decoding bits.

Suggested by Ingo Molnar, this patch tries to factorize the most
possible common bits from these functions.
The real common part between them is the format decoding. Although
they do somewhat similar jobs, their way to export or import the parameters
is very different. Thus, only the decoding layer is extracted, unless you see
other parts that could be worth factorized.

Changes in V2:

- Address a suggestion from Linus to group the format_decode() parameters inside
  a structure.

Changes in v3:

- Address other cleanups suggested by Ingo and Linus such as passing the
  printf_spec struct to the format helpers: pointer()/number()/string()
  Note that this struct is passed by copy and not by address. This is to
  avoid side effects because these functions often change these values and the
  changes shoudn't be persistant when a callee helper returns.
  It would be too risky.

- Various cleanups (code alignement, switch/case instead of if/else fountains).

- Fix a bug that printed the first format specifier following a %p

Changes in v4:

- drop unapropriate const qualifier loss while casting fmt to a char *
  (thanks to Vegard Nossum for having pointed this out).

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1236356510-8381-6-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>vsprintf: add binary printf</title>
<updated>2009-03-06T16:39:04Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2009-03-06T16:21:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4370aa4aa75391a5e2e06bccb0919109f725ed8e'/>
<id>urn:sha1:4370aa4aa75391a5e2e06bccb0919109f725ed8e</id>
<content type='text'>
Impact: add new APIs for binary trace printk infrastructure

vbin_printf(): write args to binary buffer, string is copied
when "%s" is occurred.

bstr_printf(): read from binary buffer for args and format a string

[fweisbec@gmail.com: rebase]

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
LKML-Reference: &lt;1236356510-8381-2-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>strict_strto* is not strict enough</title>
<updated>2009-01-06T23:59:12Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@suse.cz</email>
</author>
<published>2009-01-06T22:40:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e899aa823ad74860a17b541b0ad38f513728923d'/>
<id>urn:sha1:e899aa823ad74860a17b541b0ad38f513728923d</id>
<content type='text'>
It decodes "\n" as 0, which is bad, because stray echo into backlight
will turn your backlight off, etc...

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Cc: Yi Yang &lt;yi.y.yang@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Make %p print '(null)' for NULL pointers</title>
<updated>2009-01-03T19:46:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-01-03T19:46:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d97106ab53f812910a62d18afb9dbe882819c1ba'/>
<id>urn:sha1:d97106ab53f812910a62d18afb9dbe882819c1ba</id>
<content type='text'>
Before, when we only ever printed out the pointer value itself, a NULL
pointer would never cause issues and might as well be printed out as
just its numeric value.

However, with the extended %p formats, especially %pR, we might validly
want to print out resources for debugging.  And sometimes they don't
even exist, and the resource pointer is just NULL.  Print it out as
such, rather than oopsing.

This is a more generic version of a patch done by Trent Piepho (catching
all %p cases rather than just %pR, and using "(null)" instead of
"[NULL]" to match glibc).

Requested-by: Trent Piepho &lt;xyzzy@speakeasy.org&gt;
Acked-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>aoe: remove private mac address format function</title>
<updated>2008-11-25T08:40:37Z</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-11-25T08:40:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=411c41eea58bd3500cf897e2c27dd5330935a3a8'/>
<id>urn:sha1:411c41eea58bd3500cf897e2c27dd5330935a3a8</id>
<content type='text'>
Add %pm to omit the colons when printing a mac address.

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>printk: ipv4 address digits printed in reverse order</title>
<updated>2008-11-04T01:09:55Z</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-11-04T01:09:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b9ac99855dcc0316ba2feee2b0d3e578f8315b75'/>
<id>urn:sha1:b9ac99855dcc0316ba2feee2b0d3e578f8315b75</id>
<content type='text'>
put_dec_trunc prints the digits in reverse order and is reversed
inside number(). Continue using put_dec_trunc, but reverse each quad
in ip4_addr_string.

[Noticed by Julius Volz]

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
