<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch, branch v3.4.31</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch?h=v3.4.31</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch?h=v3.4.31'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-02-14T18:48:53Z</updated>
<entry>
<title>efi: Make 'efi_enabled' a function to query EFI facilities</title>
<updated>2013-02-14T18:48:53Z</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2012-11-14T09:42:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=739230186fa9d6999f88c53f0cb6d07ed4234fb0'/>
<id>urn:sha1:739230186fa9d6999f88c53f0cb6d07ed4234fb0</id>
<content type='text'>
commit 83e68189745ad931c2afd45d8ee3303929233e7f upstream.

Originally 'efi_enabled' indicated whether a kernel was booted from
EFI firmware. Over time its semantics have changed, and it now
indicates whether or not we are booted on an EFI machine with
bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.

The immediate motivation for this patch is the bug report at,

    https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557

which details how running a platform driver on an EFI machine that is
designed to run under BIOS can cause the machine to become
bricked. Also, the following report,

    https://bugzilla.kernel.org/show_bug.cgi?id=47121

details how running said driver can also cause Machine Check
Exceptions. Drivers need a new means of detecting whether they're
running on an EFI machine, as sadly the expression,

    if (!efi_enabled)

hasn't been a sufficient condition for quite some time.

Users actually want to query 'efi_enabled' for different reasons -
what they really want access to is the list of available EFI
facilities.

For instance, the x86 reboot code needs to know whether it can invoke
the ResetSystem() function provided by the EFI runtime services, while
the ACPI OSL code wants to know whether the EFI config tables were
mapped successfully. There are also checks in some of the platform
driver code to simply see if they're running on an EFI machine (which
would make it a bad idea to do BIOS-y things).

This patch is a prereq for the samsung-laptop fix patch.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Corentin Chary &lt;corentincj@iksaif.net&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Peter Jones &lt;pjones@redhat.com&gt;
Cc: Colin Ian King &lt;colin.king@canonical.com&gt;
Cc: Steve Langasek &lt;steve.langasek@canonical.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad@kernel.org&gt;
Cc: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86-64: Replace left over sti/cli in ia32 audit exit code</title>
<updated>2013-02-11T16:47:18Z</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2013-01-30T07:55:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=11151f33ae2b29f8346f5ac1250c1879e3348cbc'/>
<id>urn:sha1:11151f33ae2b29f8346f5ac1250c1879e3348cbc</id>
<content type='text'>
commit 40a1ef95da85843696fc3ebe5fce39b0db32669f upstream.

For some reason they didn't get replaced so far by their
paravirt equivalents, resulting in code to be run with
interrupts disabled that doesn't expect so (causing, in the
observed case, a BUG_ON() to trigger) when syscall auditing is
enabled.

David (Cc-ed) came up with an identical fix, so likely this can
be taken to count as an ack from him.

Reported-by: Peter Moody &lt;pmoody@google.com&gt;
Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Cc: David Vrabel &lt;david.vrabel@citrix.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Link: http://lkml.kernel.org/r/5108E01902000078000BA9C5@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: David Vrabel &lt;david.vrabel@citrix.com&gt;
Tested-by: Peter Moody &lt;pmoody@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86/Sandy Bridge: Sandy Bridge workaround depends on CONFIG_PCI</title>
<updated>2013-02-04T00:24:42Z</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@linux.intel.com</email>
</author>
<published>2013-01-14T04:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae2bac5c25d3f073d307338d9a84a1fe454c283b'/>
<id>urn:sha1:ae2bac5c25d3f073d307338d9a84a1fe454c283b</id>
<content type='text'>
commit e43b3cec711a61edf047adf6204d542f3a659ef8 upstream.

early_pci_allowed() and read_pci_config_16() are only available if
CONFIG_PCI is defined.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Abdallah Chatila &lt;abdallah.chatila@ericsson.com&gt;

</content>
</entry>
<entry>
<title>x86, efi: Set runtime_version to the EFI spec revision</title>
<updated>2013-02-04T00:24:42Z</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-25T10:07:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=40913e0adeb733053017293b0a5d6e096e47e4a1'/>
<id>urn:sha1:40913e0adeb733053017293b0a5d6e096e47e4a1</id>
<content type='text'>
commit 712ba9e9afc4b3d3d6fa81565ca36fe518915c01 upstream.

efi.runtime_version is erroneously being set to the value of the
vendor's firmware revision instead of that of the implemented EFI
specification. We can't deduce which EFI functions are available based
on the revision of the vendor's firmware since the version scheme is
likely to be unique to each vendor.

What we really need to know is the revision of the implemented EFI
specification, which is available in the EFI System Table header.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>efi, x86: Pass a proper identity mapping in efi_call_phys_prelog</title>
<updated>2013-02-04T00:24:42Z</updated>
<author>
<name>Nathan Zimmer</name>
<email>nzimmer@sgi.com</email>
</author>
<published>2013-01-08T15:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=956b0310a4f4cb0777d1e8a11a23950ec111a13b'/>
<id>urn:sha1:956b0310a4f4cb0777d1e8a11a23950ec111a13b</id>
<content type='text'>
commit b8f2c21db390273c3eaf0e5308faeaeb1e233840 upstream.

Update efi_call_phys_prelog to install an identity mapping of all available
memory.  This corrects a bug on very large systems with more then 512 GB in
which bios would not be able to access addresses above not in the mapping.

The result is a crash that looks much like this.

BUG: unable to handle kernel paging request at 000000effd870020
IP: [&lt;0000000078bce331&gt;] 0x78bce330
PGD 0
Oops: 0000 [#1] SMP
Modules linked in:
CPU 0
Pid: 0, comm: swapper/0 Tainted: G        W    3.8.0-rc1-next-20121224-medusa_ntz+ #2 Intel Corp. Stoutland Platform
RIP: 0010:[&lt;0000000078bce331&gt;]  [&lt;0000000078bce331&gt;] 0x78bce330
RSP: 0000:ffffffff81601d28  EFLAGS: 00010006
RAX: 0000000078b80e18 RBX: 0000000000000004 RCX: 0000000000000004
RDX: 0000000078bcf958 RSI: 0000000000002400 RDI: 8000000000000000
RBP: 0000000078bcf760 R08: 000000effd870000 R09: 0000000000000000
R10: 0000000000000000 R11: 00000000000000c3 R12: 0000000000000030
R13: 000000effd870000 R14: 0000000000000000 R15: ffff88effd870000
FS:  0000000000000000(0000) GS:ffff88effe400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000effd870020 CR3: 000000000160c000 CR4: 00000000000006b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper/0 (pid: 0, threadinfo ffffffff81600000, task ffffffff81614400)
Stack:
 0000000078b80d18 0000000000000004 0000000078bced7b ffff880078b81fff
 0000000000000000 0000000000000082 0000000078bce3a8 0000000000002400
 0000000060000202 0000000078b80da0 0000000078bce45d ffffffff8107cb5a
Call Trace:
 [&lt;ffffffff8107cb5a&gt;] ? on_each_cpu+0x77/0x83
 [&lt;ffffffff8102f4eb&gt;] ? change_page_attr_set_clr+0x32f/0x3ed
 [&lt;ffffffff81035946&gt;] ? efi_call4+0x46/0x80
 [&lt;ffffffff816c5abb&gt;] ? efi_enter_virtual_mode+0x1f5/0x305
 [&lt;ffffffff816aeb24&gt;] ? start_kernel+0x34a/0x3d2
 [&lt;ffffffff816ae5ed&gt;] ? repair_env_string+0x60/0x60
 [&lt;ffffffff816ae2be&gt;] ? x86_64_start_reservations+0xba/0xc1
 [&lt;ffffffff816ae120&gt;] ? early_idt_handlers+0x120/0x120
 [&lt;ffffffff816ae419&gt;] ? x86_64_start_kernel+0x154/0x163
Code:  Bad RIP value.
RIP  [&lt;0000000078bce331&gt;] 0x78bce330
 RSP &lt;ffffffff81601d28&gt;
CR2: 000000effd870020
---[ end trace ead828934fef5eab ]---

Signed-off-by: Nathan Zimmer &lt;nzimmer@sgi.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Signed-off-by: Robin Holt &lt;holt@sgi.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86/msr: Add capabilities check</title>
<updated>2013-02-04T00:24:42Z</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2012-11-15T13:06:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4031dfce34e8e8355c649f950a9ec7ccad20beee'/>
<id>urn:sha1:4031dfce34e8e8355c649f950a9ec7ccad20beee</id>
<content type='text'>
commit c903f0456bc69176912dee6dd25c6a66ee1aed00 upstream.

At the moment the MSR driver only relies upon file system
checks. This means that anything as root with any capability set
can write to MSRs. Historically that wasn't very interesting but
on modern processors the MSRs are such that writing to them
provides several ways to execute arbitary code in kernel space.
Sample code and documentation on doing this is circulating and
MSR attacks are used on Windows 64bit rootkits already.

In the Linux case you still need to be able to open the device
file so the impact is fairly limited and reduces the security of
some capability and security model based systems down towards
that of a generic "root owns the box" setup.

Therefore they should require CAP_SYS_RAWIO to prevent an
elevation of capabilities. The impact of this is fairly minimal
on most setups because they don't have heavy use of
capabilities. Those using SELinux, SMACK or AppArmor rules might
want to consider if their rulesets on the MSR driver could be
tighter.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone</title>
<updated>2013-02-04T00:24:40Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2013-01-14T18:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=112ae50d212e65816b9de8ea0010a430569d2fc6'/>
<id>urn:sha1:112ae50d212e65816b9de8ea0010a430569d2fc6</id>
<content type='text'>
commit 568dca15aa2a0f4ddee255894ec393a159f13147 upstream.

Patrik Kluba reports that the preempt count becomes invalid due
to the preempt_enable() call being unbalanced with a
preempt_disable() call in the vfp assembly routines. This happens
because preempt_enable() and preempt_disable() update preempt
counts under PREEMPT_COUNT=y but the vfp assembly routines do so
under PREEMPT=y. In a configuration where PREEMPT=n and
DEBUG_ATOMIC_SLEEP=y, PREEMPT_COUNT=y and so the preempt_enable()
call in VFP_bounce() keeps subtracting from the preempt count
until it goes negative.

Fix this by always using PREEMPT_COUNT to decided when to update
preempt counts in the ARM assembly code.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Reported-by: Patrik Kluba &lt;pkluba@dension.com&gt;
Tested-by: Patrik Kluba &lt;pkluba@dension.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ARM: at91: rm9200: remake the BGA as default version</title>
<updated>2013-02-04T00:24:40Z</updated>
<author>
<name>Jean-Christophe PLAGNIOL-VILLARD</name>
<email>plagnioj@jcrosoft.com</email>
</author>
<published>2012-12-23T18:07:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=399f41521ecb4dfb55bf86210864ce7c60157d8a'/>
<id>urn:sha1:399f41521ecb4dfb55bf86210864ce7c60157d8a</id>
<content type='text'>
commit 36224d0fe0f34cdde66a381708853ebadeac799c upstream.

Make BGA as the default version as we are supposed to just have
to specify when we use the PQFP version.

Issue was existing since commit:
3e90772 (ARM: at91: fix at91rm9200 soc subtype handling).

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ARM: DMA: Fix struct page iterator in dma_cache_maint() to work with sparsemem</title>
<updated>2013-02-04T00:24:40Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2013-01-19T11:05:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=96b3ce5cd4186b58085c03412416e9d540e90183'/>
<id>urn:sha1:96b3ce5cd4186b58085c03412416e9d540e90183</id>
<content type='text'>
commit 15653371c67c3fbe359ae37b720639dd4c7b42c5 upstream.

Subhash Jadavani reported this partial backtrace:
  Now consider this call stack from MMC block driver (this is on the ARMv7
  based board):

  [&lt;c001b50c&gt;] (v7_dma_inv_range+0x30/0x48) from [&lt;c0017b8c&gt;] (dma_cache_maint_page+0x1c4/0x24c)
  [&lt;c0017b8c&gt;] (dma_cache_maint_page+0x1c4/0x24c) from [&lt;c0017c28&gt;] (___dma_page_cpu_to_dev+0x14/0x1c)
  [&lt;c0017c28&gt;] (___dma_page_cpu_to_dev+0x14/0x1c) from [&lt;c0017ff8&gt;] (dma_map_sg+0x3c/0x114)

This is caused by incrementing the struct page pointer, and running off
the end of the sparsemem page array.  Fix this by incrementing by pfn
instead, and convert the pfn to a struct page.

Suggested-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Tested-by: Subhash Jadavani &lt;subhashj@codeaurora.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>xen: Fix stack corruption in xen_failsafe_callback for 32bit PVOPS guests.</title>
<updated>2013-01-21T19:45:25Z</updated>
<author>
<name>Frediano Ziglio</name>
<email>frediano.ziglio@citrix.com</email>
</author>
<published>2013-01-16T12:00:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=df1ffc8ee5cefbadd7477dda7ba0facafa3853a7'/>
<id>urn:sha1:df1ffc8ee5cefbadd7477dda7ba0facafa3853a7</id>
<content type='text'>
commit 9174adbee4a9a49d0139f5d71969852b36720809 upstream.

This fixes CVE-2013-0190 / XSA-40

There has been an error on the xen_failsafe_callback path for failed
iret, which causes the stack pointer to be wrong when entering the
iret_exc error path.  This can result in the kernel crashing.

In the classic kernel case, the relevant code looked a little like:

        popl %eax      # Error code from hypervisor
        jz 5f
        addl $16,%esp
        jmp iret_exc   # Hypervisor said iret fault
5:      addl $16,%esp
                       # Hypervisor said segment selector fault

Here, there are two identical addls on either option of a branch which
appears to have been optimised by hoisting it above the jz, and
converting it to an lea, which leaves the flags register unaffected.

In the PVOPS case, the code looks like:

        popl_cfi %eax         # Error from the hypervisor
        lea 16(%esp),%esp     # Add $16 before choosing fault path
        CFI_ADJUST_CFA_OFFSET -16
        jz 5f
        addl $16,%esp         # Incorrectly adjust %esp again
        jmp iret_exc

It is possible unprivileged userspace applications to cause this
behaviour, for example by loading an LDT code selector, then changing
the code selector to be not-present.  At this point, there is a race
condition where it is possible for the hypervisor to return back to
userspace from an interrupt, fault on its own iret, and inject a
failsafe_callback into the kernel.

This bug has been present since the introduction of Xen PVOPS support
in commit 5ead97c84 (xen: Core Xen implementation), in 2.6.23.

Signed-off-by: Frediano Ziglio &lt;frediano.ziglio@citrix.com&gt;
Signed-off-by: Andrew Cooper &lt;andrew.cooper3@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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