<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include, branch v3.4.72</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include?h=v3.4.72</id>
<link rel='self' href='https://git.amat.us/linux/atom/include?h=v3.4.72'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-12-04T18:50:34Z</updated>
<entry>
<title>tracing: Allow events to have NULL strings</title>
<updated>2013-12-04T18:50:34Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-11-26T14:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4d815b62becdae153d9541b49ba323cd58459a97'/>
<id>urn:sha1:4d815b62becdae153d9541b49ba323cd58459a97</id>
<content type='text'>
commit 4e58e54754dc1fec21c3a9e824bc108b05fdf46e upstream.

If an TRACE_EVENT() uses __assign_str() or __get_str on a NULL pointer
then the following oops will happen:

BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [&lt;c127a17b&gt;] strlen+0x10/0x1a
*pde = 00000000 ^M
Oops: 0000 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.13.0-rc1-test+ #2
Hardware name:                  /DG965MQ, BIOS MQ96510J.86A.0372.2006.0605.1717 06/05/2006^M
task: f5cde9f0 ti: f5e5e000 task.ti: f5e5e000
EIP: 0060:[&lt;c127a17b&gt;] EFLAGS: 00210046 CPU: 1
EIP is at strlen+0x10/0x1a
EAX: 00000000 EBX: c2472da8 ECX: ffffffff EDX: c2472da8
ESI: c1c5e5fc EDI: 00000000 EBP: f5e5fe84 ESP: f5e5fe80
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
CR0: 8005003b CR2: 00000000 CR3: 01f32000 CR4: 000007d0
Stack:
 f5f18b90 f5e5feb8 c10687a8 0759004f 00000005 00000005 00000005 00200046
 00000002 00000000 c1082a93 f56c7e28 c2472da8 c1082a93 f5e5fee4 c106bc61^M
 00000000 c1082a93 00000000 00000000 00000001 00200046 00200082 00000000
Call Trace:
 [&lt;c10687a8&gt;] ftrace_raw_event_lock+0x39/0xc0
 [&lt;c1082a93&gt;] ? ktime_get+0x29/0x69
 [&lt;c1082a93&gt;] ? ktime_get+0x29/0x69
 [&lt;c106bc61&gt;] lock_release+0x57/0x1a5
 [&lt;c1082a93&gt;] ? ktime_get+0x29/0x69
 [&lt;c10824dd&gt;] read_seqcount_begin.constprop.7+0x4d/0x75
 [&lt;c1082a93&gt;] ? ktime_get+0x29/0x69^M
 [&lt;c1082a93&gt;] ktime_get+0x29/0x69
 [&lt;c108a46a&gt;] __tick_nohz_idle_enter+0x1e/0x426
 [&lt;c10690e8&gt;] ? lock_release_holdtime.part.19+0x48/0x4d
 [&lt;c10bc184&gt;] ? time_hardirqs_off+0xe/0x28
 [&lt;c1068c82&gt;] ? trace_hardirqs_off_caller+0x3f/0xaf
 [&lt;c108a8cb&gt;] tick_nohz_idle_enter+0x59/0x62
 [&lt;c1079242&gt;] cpu_startup_entry+0x64/0x192
 [&lt;c102299c&gt;] start_secondary+0x277/0x27c
Code: 90 89 c6 89 d0 88 c4 ac 38 e0 74 09 84 c0 75 f7 be 01 00 00 00 89 f0 48 5e 5d c3 55 89 e5 57 66 66 66 66 90 83 c9 ff 89 c7 31 c0 &lt;f2&gt; ae f7 d1 8d 41 ff 5f 5d c3 55 89 e5 57 66 66 66 66 90 31 ff
EIP: [&lt;c127a17b&gt;] strlen+0x10/0x1a SS:ESP 0068:f5e5fe80
CR2: 0000000000000000
---[ end trace 01bc47bf519ec1b2 ]---

New tracepoints have been added that have allowed for NULL pointers
being assigned to strings. To fix this, change the TRACE_EVENT() code
to check for NULL and if it is, it will assign "(null)" to it instead
(similar to what glibc printf does).

Reported-by: Shuah Khan &lt;shuah.kh@samsung.com&gt;
Reported-by: Jovi Zhangwei &lt;jovi.zhangwei@gmail.com&gt;
Link: http://lkml.kernel.org/r/CAGdX0WFeEuy+DtpsJzyzn0343qEEjLX97+o1VREFkUEhndC+5Q@mail.gmail.com
Link: http://lkml.kernel.org/r/528D6972.9010702@samsung.com
Fixes: 9cbf117662e2 ("tracing/events: provide string with undefined size support")
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: map: fixed bug in 64-bit systems</title>
<updated>2013-12-04T18:50:29Z</updated>
<author>
<name>Wang Haitao</name>
<email>wang.haitao1@zte.com.cn</email>
</author>
<published>2013-08-22T11:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09f665049d7ecde55c5fbe4bb419b992288c4608'/>
<id>urn:sha1:09f665049d7ecde55c5fbe4bb419b992288c4608</id>
<content type='text'>
commit a4d62babf988fe5dfde24437fa135ef147bc7aa0 upstream.

Hardware:
	CPU: XLP832,the 64-bit OS
	NOR Flash:S29GL128S 128M
Software:
	Kernel:2.6.32.41
	Filesystem:JFFS2
When writing files, errors appear:
	Write len 182  but return retlen 180
	Write of 182 bytes at 0x072c815c failed. returned -5, retlen 180
	Write len 186  but return retlen 184
	Write of 186 bytes at 0x072caff4 failed. returned -5, retlen 184
These errors exist only in 64-bit systems,not in 32-bit systems. After analysis, we
found that the left shift operation is wrong in map_word_load_partial. For instance:
	unsigned char buf[3] ={0x9e,0x3a,0xea};
	map_bankwidth(map) is 4;
	for (i=0; i &lt; 3; i++) {
		int bitpos;
		bitpos = (map_bankwidth(map)-1-i)*8;
		orig.x[0] &amp;= ~(0xff &lt;&lt; bitpos);
		orig.x[0] |= buf[i] &lt;&lt; bitpos;
	}

The value of orig.x[0] is expected to be 0x9e3aeaff, but in this situation(64-bit
System) we'll get the wrong value of 0xffffffff9e3aeaff due to the 64-bit sign
extension:
buf[i] is defined as "unsigned char" and the left-shift operation will convert it
to the type of "signed int", so when left-shift buf[i] by 24 bits, the final result
will get the wrong value: 0xffffffff9e3aeaff.

If the left-shift bits are less than 24, then sign extension will not occur. Whereas
the bankwidth of the nor flash we used is 4, therefore this BUG emerges.

Signed-off-by: Pang Xunlei &lt;pang.xunlei@zte.com.cn&gt;
Signed-off-by: Zhang Yi &lt;zhang.yi20@zte.com.cn&gt;
Signed-off-by: Lu Zhongjun &lt;lu.zhongjun@zte.com.cn&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>exec/ptrace: fix get_dumpable() incorrect tests</title>
<updated>2013-11-29T18:50:34Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-11-12T23:11:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c0d30628ff1b424f041d83fee37daea5f84eb0a2'/>
<id>urn:sha1:c0d30628ff1b424f041d83fee37daea5f84eb0a2</id>
<content type='text'>
commit d049f74f2dbe71354d43d393ac3a188947811348 upstream.

The get_dumpable() return value is not boolean.  Most users of the
function actually want to be testing for non-SUID_DUMP_USER(1) rather than
SUID_DUMP_DISABLE(0).  The SUID_DUMP_ROOT(2) is also considered a
protected state.  Almost all places did this correctly, excepting the two
places fixed in this patch.

Wrong logic:
    if (dumpable == SUID_DUMP_DISABLE) { /* be protective */ }
        or
    if (dumpable == 0) { /* be protective */ }
        or
    if (!dumpable) { /* be protective */ }

Correct logic:
    if (dumpable != SUID_DUMP_USER) { /* be protective */ }
        or
    if (dumpable != 1) { /* be protective */ }

Without this patch, if the system had set the sysctl fs/suid_dumpable=2, a
user was able to ptrace attach to processes that had dropped privileges to
that user.  (This may have been partially mitigated if Yama was enabled.)

The macros have been moved into the file that declares get/set_dumpable(),
which means things like the ia64 code can see them too.

CVE-2013-2929

Reported-by: Vasily Kulikov &lt;segoon@openwall.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>include/linux/fs.h: disable preempt when acquire i_size_seqcount write lock</title>
<updated>2013-11-29T18:50:33Z</updated>
<author>
<name>Fan Du</name>
<email>fan.du@windriver.com</email>
</author>
<published>2013-04-30T22:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f22ff9d05def87a049c5c8c7b86539bd4f8e3172'/>
<id>urn:sha1:f22ff9d05def87a049c5c8c7b86539bd4f8e3172</id>
<content type='text'>
commit 74e3d1e17b2e11d175970b85acd44f5927000ba2 upstream.

Two rt tasks bind to one CPU core.

The higher priority rt task A preempts a lower priority rt task B which
has already taken the write seq lock, and then the higher priority rt
task A try to acquire read seq lock, it's doomed to lockup.

rt task A with lower priority: call write
i_size_write                                        rt task B with higher priority: call sync, and preempt task A
  write_seqcount_begin(&amp;inode-&gt;i_size_seqcount);    i_size_read
  inode-&gt;i_size = i_size;                             read_seqcount_begin &lt;-- lockup here...

So disable preempt when acquiring every i_size_seqcount *write* lock will
cure the problem.

Signed-off-by: Fan Du &lt;fan.du@windriver.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Zhao Hongjiang &lt;zhaohongjiang@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>exec: do not abuse -&gt;cred_guard_mutex in threadgroup_lock()</title>
<updated>2013-11-29T18:50:33Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2013-04-30T22:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=df4011e050b4e80165a317424e6b3367dfa7697c'/>
<id>urn:sha1:df4011e050b4e80165a317424e6b3367dfa7697c</id>
<content type='text'>
commit e56fb2874015370e3b7f8d85051f6dce26051df9 upstream.

threadgroup_lock() takes signal-&gt;cred_guard_mutex to ensure that
thread_group_leader() is stable.  This doesn't look nice, the scope of
this lock in do_execve() is huge.

And as Dave pointed out this can lead to deadlock, we have the
following dependencies:

	do_execve:		cred_guard_mutex -&gt; i_mutex
	cgroup_mount:		i_mutex -&gt; cgroup_mutex
	attach_task_by_pid:	cgroup_mutex -&gt; cred_guard_mutex

Change de_thread() to take threadgroup_change_begin() around the
switch-the-leader code and change threadgroup_lock() to avoid
-&gt;cred_guard_mutex.

Note that de_thread() can't sleep with -&gt;group_rwsem held, this can
obviously deadlock with the exiting leader if the writer is active, so it
does threadgroup_change_end() before schedule().

Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@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;
[ zhj: adjust context ]
Signed-off-by: Zhao Hongjiang &lt;zhaohongjiang@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>inet: fix possible memory corruption with UDP_CORK and UFO</title>
<updated>2013-11-04T12:23:41Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-10-21T22:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=478e9a72b5e0cc9ecd8b787db90dec01d283123c'/>
<id>urn:sha1:478e9a72b5e0cc9ecd8b787db90dec01d283123c</id>
<content type='text'>
[ This is a simplified -stable version of a set of upstream commits. ]

This is a replacement patch only for stable which does fix the problems
handled by the following two commits in -net:

"ip_output: do skb ufo init for peeked non ufo skb as well" (e93b7d748be887cd7639b113ba7d7ef792a7efb9)
"ip6_output: do skb ufo init for peeked non ufo skb as well" (c547dbf55d5f8cf615ccc0e7265e98db27d3fb8b)

Three frames are written on a corked udp socket for which the output
netdevice has UFO enabled.  If the first and third frame are smaller than
the mtu and the second one is bigger, we enqueue the second frame with
skb_append_datato_frags without initializing the gso fields. This leads
to the third frame appended regulary and thus constructing an invalid skb.

This fixes the problem by always using skb_append_datato_frags as soon
as the first frag got enqueued to the skb without marking the packet
as SKB_GSO_UDP.

The problem with only two frames for ipv6 was fixed by "ipv6: udp
packets following an UFO enqueued packet need also be handled by UFO"
(2811ebac2521ceac84f2bdae402455baa6a7fb47).

Cc: Jiri Pirko &lt;jiri@resnulli.us&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: fix cipso packet validation when !NETLABEL</title>
<updated>2013-11-04T12:23:41Z</updated>
<author>
<name>Seif Mazareeb</name>
<email>seif@marvell.com</email>
</author>
<published>2013-10-18T03:33:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2b5f6d110ee835cba1742c999cabd30a54c10b76'/>
<id>urn:sha1:2b5f6d110ee835cba1742c999cabd30a54c10b76</id>
<content type='text'>
[ Upstream commit f2e5ddcc0d12f9c4c7b254358ad245c9dddce13b ]

When CONFIG_NETLABEL is disabled, the cipso_v4_validate() function could loop
forever in the main loop if opt[opt_iter +1] == 0, this will causing a kernel
crash in an SMP system, since the CPU executing this function will
stall /not respond to IPIs.

This problem can be reproduced by running the IP Stack Integrity Checker
(http://isic.sourceforge.net) using the following command on a Linux machine
connected to DUT:

"icmpsic -s rand -d &lt;DUT IP address&gt; -r 123456"
wait (1-2 min)

Signed-off-by: Seif Mazareeb &lt;seif@marvell.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: dst: provide accessor function to dst-&gt;xfrm</title>
<updated>2013-11-04T12:23:41Z</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevich@gmail.com</email>
</author>
<published>2013-10-16T02:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e5d72cd013a30bbd3a835243b635f0b85c4dd0a'/>
<id>urn:sha1:3e5d72cd013a30bbd3a835243b635f0b85c4dd0a</id>
<content type='text'>
[ Upstream commit e87b3998d795123b4139bc3f25490dd236f68212 ]

dst-&gt;xfrm is conditionally defined.  Provide accessor funtion that
is always available.

Signed-off-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tcp: must unclone packets before mangling them</title>
<updated>2013-11-04T12:23:40Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-10-15T18:54:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=11db1e4cee071defc371d0fc7f1740024fbe5b06'/>
<id>urn:sha1:11db1e4cee071defc371d0fc7f1740024fbe5b06</id>
<content type='text'>
[ Upstream commit c52e2421f7368fd36cbe330d2cf41b10452e39a9 ]

TCP stack should make sure it owns skbs before mangling them.

We had various crashes using bnx2x, and it turned out gso_size
was cleared right before bnx2x driver was populating TC descriptor
of the _previous_ packet send. TCP stack can sometime retransmit
packets that are still in Qdisc.

Of course we could make bnx2x driver more robust (using
ACCESS_ONCE(shinfo-&gt;gso_size) for example), but the bug is TCP stack.

We have identified two points where skb_unclone() was needed.

This patch adds a WARN_ON_ONCE() to warn us if we missed another
fix of this kind.

Kudos to Neal for finding the root cause of this bug. Its visible
using small MSS.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>random: run random_int_secret_init() run after all late_initcalls</title>
<updated>2013-10-22T08:02:25Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-09-10T14:52:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c2f271001295e9d4b1cca3a01502795e4f0d1639'/>
<id>urn:sha1:c2f271001295e9d4b1cca3a01502795e4f0d1639</id>
<content type='text'>
commit 47d06e532e95b71c0db3839ebdef3fe8812fca2c upstream.

The some platforms (e.g., ARM) initializes their clocks as
late_initcalls for some unknown reason.  So make sure
random_int_secret_init() is run after all of the late_initcalls are
run.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
