<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch, branch v3.12.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch?h=v3.12.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch?h=v3.12.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-03-05T16:13:54Z</updated>
<entry>
<title>ARM64: unwind: Fix PC calculation</title>
<updated>2014-03-05T16:13:54Z</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2014-02-14T19:35:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b9cac36b22d4a4c4dca3a42b63931702bd4cc4c8'/>
<id>urn:sha1:b9cac36b22d4a4c4dca3a42b63931702bd4cc4c8</id>
<content type='text'>
commit e306dfd06fcb44d21c80acb8e5a88d55f3d1cf63 upstream.

The frame PC value in the unwind code used to just take the saved LR
value and use that.  That's incorrect as a stack trace, since it shows
the return path stack, not the call path stack.

In particular, it shows faulty information in case the bl is done as
the very last instruction of one label, since the return point will be
in the next label. That can easily be seen with tail calls to panic(),
which is marked __noreturn and thus doesn't have anything useful after it.

Easiest here is to just correct the unwind code and do a -4, to get the
actual call site for the backtrace instead of the return site.

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>xtensa: introduce spill_registers_kernel macro</title>
<updated>2014-03-05T16:13:53Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2014-01-22T04:04:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d33ee5e7f8c3de1a6f407e3568ece84ec51db042'/>
<id>urn:sha1:d33ee5e7f8c3de1a6f407e3568ece84ec51db042</id>
<content type='text'>
commit e2fd1374c705abe4661df3fb6fadb3879c7c1846 upstream.

Most in-kernel users want registers spilled on the kernel stack and
don't require PS.EXCM to be set. That means that they don't need fixup
routine and could reuse regular window overflow mechanism for that,
which makes spill routine very simple.

Suggested-by: Chris Zankel &lt;chris@zankel.net&gt;
Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>xtensa: save current register frame in fast_syscall_spill_registers_fixup</title>
<updated>2014-03-05T16:13:52Z</updated>
<author>
<name>Max Filippov</name>
<email>jcmvbkbc@gmail.com</email>
</author>
<published>2013-10-30T12:18:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=38848e0b02a239b01e5d974a84b8a6b85bcaf48a'/>
<id>urn:sha1:38848e0b02a239b01e5d974a84b8a6b85bcaf48a</id>
<content type='text'>
commit 3251f1e27a5a17f0efd436cfd1e7b9896cfab0a0 upstream.

We need it saved because it contains a3 where we track which register
windows we still need to spill, and fixup handler may call C exception
handlers. Also fix comments.

Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>perf/x86: Fix event scheduling</title>
<updated>2014-03-05T16:13:46Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2014-02-21T15:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=04f4e59ba8d8d7db9fad2c1cee1d4ac6dc8bd7c5'/>
<id>urn:sha1:04f4e59ba8d8d7db9fad2c1cee1d4ac6dc8bd7c5</id>
<content type='text'>
commit 26e61e8939b1fe8729572dabe9a9e97d930dd4f6 upstream.

Vince "Super Tester" Weaver reported a new round of syscall fuzzing (Trinity) failures,
with perf WARN_ON()s triggering. He also provided traces of the failures.

This is I think the relevant bit:

	&gt;    pec_1076_warn-2804  [000] d...   147.926153: x86_pmu_disable: x86_pmu_disable
	&gt;    pec_1076_warn-2804  [000] d...   147.926153: x86_pmu_state: Events: {
	&gt;    pec_1076_warn-2804  [000] d...   147.926156: x86_pmu_state:   0: state: .R config: ffffffffffffffff (          (null))
	&gt;    pec_1076_warn-2804  [000] d...   147.926158: x86_pmu_state:   33: state: AR config: 0 (ffff88011ac99800)
	&gt;    pec_1076_warn-2804  [000] d...   147.926159: x86_pmu_state: }
	&gt;    pec_1076_warn-2804  [000] d...   147.926160: x86_pmu_state: n_events: 1, n_added: 0, n_txn: 1
	&gt;    pec_1076_warn-2804  [000] d...   147.926161: x86_pmu_state: Assignment: {
	&gt;    pec_1076_warn-2804  [000] d...   147.926162: x86_pmu_state:   0-&gt;33 tag: 1 config: 0 (ffff88011ac99800)
	&gt;    pec_1076_warn-2804  [000] d...   147.926163: x86_pmu_state: }
	&gt;    pec_1076_warn-2804  [000] d...   147.926166: collect_events: Adding event: 1 (ffff880119ec8800)

So we add the insn:p event (fd[23]).

At this point we should have:

  n_events = 2, n_added = 1, n_txn = 1

	&gt;    pec_1076_warn-2804  [000] d...   147.926170: collect_events: Adding event: 0 (ffff8800c9e01800)
	&gt;    pec_1076_warn-2804  [000] d...   147.926172: collect_events: Adding event: 4 (ffff8800cbab2c00)

We try and add the {BP,cycles,br_insn} group (fd[3], fd[4], fd[15]).
These events are 0:cycles and 4:br_insn, the BP event isn't x86_pmu so
that's not visible.

	group_sched_in()
	  pmu-&gt;start_txn() /* nop - BP pmu */
	  event_sched_in()
	     event-&gt;pmu-&gt;add()

So here we should end up with:

  0: n_events = 3, n_added = 2, n_txn = 2
  4: n_events = 4, n_added = 3, n_txn = 3

But seeing the below state on x86_pmu_enable(), the must have failed,
because the 0 and 4 events aren't there anymore.

Looking at group_sched_in(), since the BP is the leader, its
event_sched_in() must have succeeded, for otherwise we would not have
seen the sibling adds.

But since neither 0 or 4 are in the below state; their event_sched_in()
must have failed; but I don't see why, the complete state: 0,0,1:p,4
fits perfectly fine on a core2.

However, since we try and schedule 4 it means the 0 event must have
succeeded!  Therefore the 4 event must have failed, its failure will
have put group_sched_in() into the fail path, which will call:

	event_sched_out()
	  event-&gt;pmu-&gt;del()

on 0 and the BP event.

Now x86_pmu_del() will reduce n_events; but it will not reduce n_added;
giving what we see below:

 n_event = 2, n_added = 2, n_txn = 2

	&gt;    pec_1076_warn-2804  [000] d...   147.926177: x86_pmu_enable: x86_pmu_enable
	&gt;    pec_1076_warn-2804  [000] d...   147.926177: x86_pmu_state: Events: {
	&gt;    pec_1076_warn-2804  [000] d...   147.926179: x86_pmu_state:   0: state: .R config: ffffffffffffffff (          (null))
	&gt;    pec_1076_warn-2804  [000] d...   147.926181: x86_pmu_state:   33: state: AR config: 0 (ffff88011ac99800)
	&gt;    pec_1076_warn-2804  [000] d...   147.926182: x86_pmu_state: }
	&gt;    pec_1076_warn-2804  [000] d...   147.926184: x86_pmu_state: n_events: 2, n_added: 2, n_txn: 2
	&gt;    pec_1076_warn-2804  [000] d...   147.926184: x86_pmu_state: Assignment: {
	&gt;    pec_1076_warn-2804  [000] d...   147.926186: x86_pmu_state:   0-&gt;33 tag: 1 config: 0 (ffff88011ac99800)
	&gt;    pec_1076_warn-2804  [000] d...   147.926188: x86_pmu_state:   1-&gt;0 tag: 1 config: 1 (ffff880119ec8800)
	&gt;    pec_1076_warn-2804  [000] d...   147.926188: x86_pmu_state: }
	&gt;    pec_1076_warn-2804  [000] d...   147.926190: x86_pmu_enable: S0: hwc-&gt;idx: 33, hwc-&gt;last_cpu: 0, hwc-&gt;last_tag: 1 hwc-&gt;state: 0

So the problem is that x86_pmu_del(), when called from a
group_sched_in() that fails (for whatever reason), and without x86_pmu
TXN support (because the leader is !x86_pmu), will corrupt the n_added
state.

Reported-and-Tested-by: Vince Weaver &lt;vincent.weaver@maine.edu&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Link: http://lkml.kernel.org/r/20140221150312.GF3104@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>x86: dma-mapping: fix GFP_ATOMIC macro usage</title>
<updated>2014-03-05T16:13:45Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2014-01-24T13:49:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=42458ecf9f1498ff0b227b59b23eee9890abbc12'/>
<id>urn:sha1:42458ecf9f1498ff0b227b59b23eee9890abbc12</id>
<content type='text'>
commit c091c71ad2218fc50a07b3d1dab85783f3b77efd upstream.

GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other
flags, where meaningful is the LACK of __GFP_WAIT flag. To check if caller
wants to perform an atomic allocation, the code must test for a lack of the
__GFP_WAIT flag. This patch fixes the issue introduced in v3.5-rc1.

Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>powerpc/crashdump : Fix page frame number check in copy_oldmem_page</title>
<updated>2014-03-05T16:13:45Z</updated>
<author>
<name>Laurent Dufour</name>
<email>ldufour@linux.vnet.ibm.com</email>
</author>
<published>2014-02-24T16:30:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=370dd2d91350c6c6ffcff910b191dc95eb31c7a1'/>
<id>urn:sha1:370dd2d91350c6c6ffcff910b191dc95eb31c7a1</id>
<content type='text'>
commit f5295bd8ea8a65dc5eac608b151386314cb978f1 upstream.

In copy_oldmem_page, the current check using max_pfn and min_low_pfn to
decide if the page is backed or not, is not valid when the memory layout is
not continuous.

This happens when running as a QEMU/KVM guest, where RTAS is mapped higher
in the memory. In that case max_pfn points to the end of RTAS, and a hole
between the end of the kdump kernel and RTAS is not backed by PTEs. As a
consequence, the kdump kernel is crashing in copy_oldmem_page when accessing
in a direct way the pages in that hole.

This fix relies on the memblock's service memblock_is_region_memory to
check if the read page is part or not of the directly accessible memory.

Signed-off-by: Laurent Dufour &lt;ldufour@linux.vnet.ibm.com&gt;
Tested-by: Mahesh Salgaonkar &lt;mahesh@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly</title>
<updated>2014-03-05T16:13:45Z</updated>
<author>
<name>Tony Breeds</name>
<email>tony@bakeyournoodle.com</email>
</author>
<published>2014-02-20T10:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4fe2fdcab4dfef44f48e19c8ffabbbe7401f031f'/>
<id>urn:sha1:4fe2fdcab4dfef44f48e19c8ffabbbe7401f031f</id>
<content type='text'>
commit 41dd03a94c7d408d2ef32530545097f7d1befe5c upstream.

Currently we're storing a host endian RTAS token in
rtas_stop_self_args.token.  We then pass that directly to rtas.  This is
fine on big endian however on little endian the token is not what we
expect.

This will typically result in hitting:
	panic("Alas, I survived.\n");

To fix this we always use the stop-self token in host order and always
convert it to be32 before passing this to rtas.

Signed-off-by: Tony Breeds &lt;tony@bakeyournoodle.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>powerpc: Increase stack redzone for 64-bit userspace to 512 bytes</title>
<updated>2014-03-05T16:13:45Z</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2014-02-26T06:07:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a99ca7fc8b4d2c3e01f3caab239ea9e96d81efc'/>
<id>urn:sha1:5a99ca7fc8b4d2c3e01f3caab239ea9e96d81efc</id>
<content type='text'>
commit 573ebfa6601fa58b439e7f15828762839ccd306a upstream.

The new ELFv2 little-endian ABI increases the stack redzone -- the
area below the stack pointer that can be used for storing data --
from 288 bytes to 512 bytes.  This means that we need to allow more
space on the user stack when delivering a signal to a 64-bit process.

To make the code a bit clearer, we define new USER_REDZONE_SIZE and
KERNEL_REDZONE_SIZE symbols in ptrace.h.  For now, we leave the
kernel redzone size at 288 bytes, since increasing it to 512 bytes
would increase the size of interrupt stack frames correspondingly.

Gcc currently only makes use of 288 bytes of redzone even when
compiling for the new little-endian ABI, and the kernel cannot
currently be compiled with the new ABI anyway.

In the future, hopefully gcc will provide an option to control the
amount of redzone used, and then we could reduce it even more.

This also changes the code in arch_compat_alloc_user_space() to
preserve the expanded redzone.  It is not clear why this function would
ever be used on a 64-bit process, though.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>kvm: x86: fix emulator buffer overflow (CVE-2014-0049)</title>
<updated>2014-03-05T16:13:43Z</updated>
<author>
<name>Andrew Honig</name>
<email>ahonig@google.com</email>
</author>
<published>2014-02-27T18:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ee593d3a91514d37f19251daa9d57edfb27e45e7'/>
<id>urn:sha1:ee593d3a91514d37f19251daa9d57edfb27e45e7</id>
<content type='text'>
commit a08d3b3b99efd509133946056531cdf8f3a0c09b upstream.

The problem occurs when the guest performs a pusha with the stack
address pointing to an mmio address (or an invalid guest physical
address) to start with, but then extending into an ordinary guest
physical address.  When doing repeated emulated pushes
emulator_read_write sets mmio_needed to 1 on the first one.  On a
later push when the stack points to regular memory,
mmio_nr_fragments is set to 0, but mmio_is_needed is not set to 0.

As a result, KVM exits to userspace, and then returns to
complete_emulated_mmio.  In complete_emulated_mmio
vcpu-&gt;mmio_cur_fragment is incremented.  The termination condition of
vcpu-&gt;mmio_cur_fragment == vcpu-&gt;mmio_nr_fragments is never achieved.
The code bounces back and fourth to userspace incrementing
mmio_cur_fragment past it's buffer.  If the guest does nothing else it
eventually leads to a a crash on a memcpy from invalid memory address.

However if a guest code can cause the vm to be destroyed in another
vcpu with excellent timing, then kvm_clear_async_pf_completion_queue
can be used by the guest to control the data that's pointed to by the
call to cancel_work_item, which can be used to gain execution.

Fixes: f78146b0f9230765c6315b2e14f56112513389ad
Signed-off-by: Andrew Honig &lt;ahonig@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use</title>
<updated>2014-03-05T16:13:41Z</updated>
<author>
<name>Chen Gang</name>
<email>gang.chen.5i5j@gmail.com</email>
</author>
<published>2014-02-01T12:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=92ffeda00eeff3b33f9a41011d9ac5779d2eb131'/>
<id>urn:sha1:92ffeda00eeff3b33f9a41011d9ac5779d2eb131</id>
<content type='text'>
commit 8d80390cfc9434d5aa4fb9e5f9768a66b30cb8a6 upstream.

For avr32 cross compiler, do not define '__linux__' internally, so it
will cause issue with allmodconfig.

The related error:

    CC [M]  fs/coda/psdev.o
  In file included from include/linux/coda.h:64,
                   from fs/coda/psdev.c:45:
  include/uapi/linux/coda.h:221: error: expected specifier-qualifier-list before 'u_quad_t'

The related toolchain version (which only download, not re-compile):

  [root@gchen linux-next]# /upstream/toolchain/download/avr32-gnu-toolchain-linux_x86/bin/avr32-gcc -v
  Using built-in specs.
  Target: avr32
  Configured with: /data2/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/src/gcc/configure --target=avr32 --host=i686-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-languages=c,c++ --disable-nls --disable-libssp --disable-libstdcxx-pch --with-dwarf2 --enable-version-specific-runtime-libs --disable-shared --enable-doc --with-mpfr-lib=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/lib --with-mpfr-include=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/include --with-gmp=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --with-mpc=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-__cxa_atexit --disable-shared --with-newlib --with-pkgversion=AVR_32_bit_GNU_Toolchain_3.4.2_435 --with-bugurl=http://www
.atmel.com/avr
  Thread model: single
  gcc version 4.4.7 (AVR_32_bit_GNU_Toolchain_3.4.2_435)

Signed-off-by: Chen Gang &lt;gang.chen.5i5j@gmail.com&gt;
Acked-by: Hans-Christian Egtvedt &lt;hegtvedt@cisco.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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