<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/lib, branch v4.3-rc1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v4.3-rc1</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v4.3-rc1'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2015-09-10T20:29:01Z</updated>
<entry>
<title>zlib_deflate/deftree: remove bi_reverse()</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>yalin wang</name>
<email>yalin.wang2010@gmail.com</email>
</author>
<published>2015-09-09T22:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8b235f2f16a472b8cfc10e8ef1286fcd3331e033'/>
<id>urn:sha1:8b235f2f16a472b8cfc10e8ef1286fcd3331e033</id>
<content type='text'>
Remove bi_reverse() and use generic bitrev32() instead - it should have
better performance on some platforms.

Signed-off-by: yalin wang &lt;yalin.wang2010@gmail.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>lib/decompress_unlzma: Do a NULL check for pointer</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-09-09T22:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e4e29dc4841d21943bec1bc5378ab421d2320d83'/>
<id>urn:sha1:e4e29dc4841d21943bec1bc5378ab421d2320d83</id>
<content type='text'>
Compare pointer-typed values to NULL rather than 0.

The semantic patch that makes this change is available
in scripts/coccinelle/null/badzero.cocci.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.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>lib/decompressors: use real out buf size for gunzip with kernel</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2015-09-09T22:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2d3862d26e67a59340ba1cf1748196c76c5787de'/>
<id>urn:sha1:2d3862d26e67a59340ba1cf1748196c76c5787de</id>
<content type='text'>
When loading x86 64bit kernel above 4GiB with patched grub2, got kernel
gunzip error.

| early console in decompress_kernel
| decompress_kernel:
|       input: [0x807f2143b4-0x807ff61aee]
|      output: [0x807cc00000-0x807f3ea29b] 0x027ea29c: output_len
| boot via startup_64
| KASLR using RDTSC...
|  new output: [0x46fe000000-0x470138cfff] 0x0338d000: output_run_size
|  decompress: [0x46fe000000-0x47007ea29b] &lt;=== [0x807f2143b4-0x807ff61aee]
|
| Decompressing Linux... gz...
|
| uncompression error
|
| -- System halted

the new buffer is at 0x46fe000000ULL, decompressor_gzip is using
0xffffffb901ffffff as out_len.  gunzip in lib/zlib_inflate/inflate.c cap
that len to 0x01ffffff and decompress fails later.

We could hit this problem with crashkernel booting that uses kexec loading
kernel above 4GiB.

We have decompress_* support:
    1. inbuf[]/outbuf[] for kernel preboot.
    2. inbuf[]/flush() for initramfs
    3. fill()/flush() for initrd.
This bug only affect kernel preboot path that use outbuf[].

Add __decompress and take real out_buf_len for gunzip instead of guessing
wrong buf size.

Fixes: 1431574a1c4 (lib/decompressors: fix "no limit" output buffer length)
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Cc: Jon Medhurst &lt;tixy@linaro.org&gt;
Cc: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&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>lib/test_kasan.c: make kmalloc_oob_krealloc_less more correctly</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Wang Long</name>
<email>long.wanglong@huawei.com</email>
</author>
<published>2015-09-09T22:37:22Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6b4a35fc19a9229080dead8a9c316e8857b3e94d'/>
<id>urn:sha1:6b4a35fc19a9229080dead8a9c316e8857b3e94d</id>
<content type='text'>
In kmalloc_oob_krealloc_less, I think it is better to test
the size2 boundary.

If we do not call krealloc, the access of position size1 will still cause
out-of-bounds and access of position size2 does not.  After call krealloc,
the access of position size2 cause out-of-bounds.  So using size2 is more
correct.

Signed-off-by: Wang Long &lt;long.wanglong@huawei.com&gt;
Cc: Andrey Ryabinin &lt;ryabinin.a.a@gmail.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>lib/test_kasan.c: fix a typo</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Wang Long</name>
<email>long.wanglong@huawei.com</email>
</author>
<published>2015-09-09T22:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9789d8e0cfc6b5e265d9b0aa6e86b394a6d216a1'/>
<id>urn:sha1:9789d8e0cfc6b5e265d9b0aa6e86b394a6d216a1</id>
<content type='text'>
Signed-off-by: Wang Long &lt;long.wanglong@huawei.com&gt;
Cc: Andrey Ryabinin &lt;ryabinin.a.a@gmail.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>lib/string_helpers: rename "esc" arg to "only"</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2015-09-09T22:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b40bdb7fb2b8359d5dfe19a91c147465c3d0359b'/>
<id>urn:sha1:b40bdb7fb2b8359d5dfe19a91c147465c3d0359b</id>
<content type='text'>
To further clarify the purpose of the "esc" argument, rename it to "only"
to reflect that it is a limit, not a list of additional characters to
escape.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Suggested-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&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>lib/string_helpers: clarify esc arg in string_escape_mem</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2015-09-09T22:37:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d89a3f7335bb5d9e572ecc287b300161200364eb'/>
<id>urn:sha1:d89a3f7335bb5d9e572ecc287b300161200364eb</id>
<content type='text'>
The esc argument is used to reduce which characters will be escaped.  For
example, using " " with ESCAPE_SPACE will not produce any escaped spaces.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Cc: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.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>lib/bitmap.c: bitmap_parselist can accept string with whitespaces on head or tail</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Pan Xinhui</name>
<email>xinhuix.pan@intel.com</email>
</author>
<published>2015-09-09T22:37:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9bf98f168b7b004c94c766a6989071e0f858def3'/>
<id>urn:sha1:9bf98f168b7b004c94c766a6989071e0f858def3</id>
<content type='text'>
In __bitmap_parselist we can accept whitespaces on head or tail during
every parsing procedure.  If input has valid ranges, there is no reason to
reject the user.

For example, bitmap_parselist(" 1-3, 5, ", &amp;mask, nmaskbits).  After
separating the string, we get " 1-3", " 5", and " ".  It's possible and
reasonable to accept such string as long as the parsing result is correct.

Signed-off-by: Pan Xinhui &lt;xinhuix.pan@intel.com&gt;
Cc: Yury Norov &lt;yury.norov@gmail.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@ezchip.com&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Cc: Sudeep Holla &lt;sudeep.holla@arm.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>lib/bitmap.c: fix a special string handling bug in __bitmap_parselist</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Pan Xinhui</name>
<email>xinhuix.pan@intel.com</email>
</author>
<published>2015-09-09T22:37:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d9282cb66353be502aae09aae75d05a6863eb979'/>
<id>urn:sha1:d9282cb66353be502aae09aae75d05a6863eb979</id>
<content type='text'>
If string end with '-', for exapmle, bitmap_parselist("1,0-",&amp;mask,
nmaskbits), It is not in a valid pattern, so add a check after loop.
Return -EINVAL on such condition.

Signed-off-by: Pan Xinhui &lt;xinhuix.pan@intel.com&gt;
Cc: Yury Norov &lt;yury.norov@gmail.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@ezchip.com&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Cc: Sudeep Holla &lt;sudeep.holla@arm.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>lib/bitmap.c: correct a code style and do some, optimization</title>
<updated>2015-09-10T20:29:01Z</updated>
<author>
<name>Pan Xinhui</name>
<email>xinhuix.pan@intel.com</email>
</author>
<published>2015-09-09T22:37:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d21c3d4d1c6b2a0b85aeae5cc774b1bacc64e5b4'/>
<id>urn:sha1:d21c3d4d1c6b2a0b85aeae5cc774b1bacc64e5b4</id>
<content type='text'>
We can avoid in-loop incrementation of ndigits.  Save current totaldigits
to ndigits before loop, and check ndigits against totaldigits after the
loop.

Signed-off-by: Pan Xinhui &lt;xinhuix.pan@intel.com&gt;
Cc: Yury Norov &lt;yury.norov@gmail.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@ezchip.com&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Cc: Sudeep Holla &lt;sudeep.holla@arm.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>
</feed>
