~dannf/ubuntu/+source/linux/+git/trusty:lp1634585

Last commit made on 2016-10-18
Get this branch:
git clone -b lp1634585 https://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/trusty
Only dann frazier can upload to this branch. If you are dann frazier please log in for upload directions.

Branch merges

Branch information

Name:
lp1634585
Repository:
lp:~dannf/ubuntu/+source/linux/+git/trusty

Recent commits

6397e4e... by dann frazier

UBUNTU: [Config] Switch CONFIG_RTC_DRV_EFI back to =y for arm64

BugLink: http://bugs.launchpad.net/bugs/1634585

Looks like this was accidentally switched back to a module in commit
c5dc408e5afa98 "UBUNTU: [Config] CONFIG_LIBFDT=y".

Signed-off-by: dann frazier <email address hidden>

31661fe... by Seth Forshee

UBUNTU: Ubuntu-3.13.0-99.146

Signed-off-by: Seth Forshee <email address hidden>

0dab286... by Paul Mackerras <email address hidden>

UBUNTU: SAUCE: (no-up) powerpc/64: Fix incorrect return value from __copy_tofrom_user

BugLink: http://bugs.launchpad.net/bugs/1632462

Debugging a data corruption issue with virtio-net/vhost-net led to
the observation that __copy_tofrom_user was occasionally returning
a value 16 larger than it should. Since the return value from
__copy_tofrom_user is the number of bytes not copied, this means
that __copy_tofrom_user can occasionally return a value larger
than the number of bytes it was asked to copy. In turn this can
cause higher-level copy functions such as copy_page_to_iter_iovec
to corrupt memory by copying data into the wrong memory locations.

It turns out that the failing case involves a fault on the store
at label 79, and at that point the first unmodified byte of the
destination is at R3 + 16. Consequently the exception handler
for that store needs to add 16 to R3 before using it to work out
how many bytes were not copied, but in this one case it was not
adding the offset to R3. To fix it, this moves the label 179 to
the point where we add 16 to R3. I have checked manually all the
exception handlers for the loads and stores in this code and the
rest of them are correct (it would be excellent to have an
automated test of all the exception cases).

Signed-off-by: Paul Mackerras <email address hidden>
Signed-off-by: Seth Forshee <email address hidden>
Acked-by: Leann Ogasawara <email address hidden>
Acked-by: Brad Figg <email address hidden>

c9a7a9b... by Laurent Dufour

UBUNTU: SAUCE: (no-up) powerpc/pseries: Fix stack corruption in htpe code

BugLink: http://bugs.launchpad.net/bugs/1628976

https://patchwork.kernel.org/patch/9364805/

This commit fixes a stack corruption in the pseries specific code dealing
with the huge pages.

In __pSeries_lpar_hugepage_invalidate() the buffer used to pass arguments
to the hypervisor is not large enough. This leads to a stack corruption
where a previously saved register could be corrupted leading to unexpected
result in the caller, like the following panic:

Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=2048 NUMA pSeries
Modules linked in: virtio_balloon ip_tables x_tables autofs4
virtio_blk 8139too virtio_pci virtio_ring 8139cp virtio
CPU: 11 PID: 1916 Comm: mmstress Not tainted 4.8.0 #76
task: c000000005394880 task.stack: c000000005570000
NIP: c00000000027bf6c LR: c00000000027bf64 CTR: 0000000000000000
REGS: c000000005573820 TRAP: 0300 Not tainted (4.8.0)
MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 84822884 XER:
20000000
CFAR: c00000000010a924 DAR: 420000000014e5e0 DSISR: 40000000 SOFTE: 1
GPR00: c00000000027bf64 c000000005573aa0 c000000000e02800 c000000004447964
GPR04: c00000000404de18 c000000004d38810 00000000042100f5 00000000f5002104
GPR08: e0000000f5002104 0000000000000001 042100f5000000e0 00000000042100f5
GPR12: 0000000000002200 c00000000fe02c00 c00000000404de18 0000000000000000
GPR16: c1ffffffffffe7ff 00003fff62000000 420000000014e5e0 00003fff63000000
GPR20: 0008000000000000 c0000000f7014800 0405e600000000e0 0000000000010000
GPR24: c000000004d38810 c000000004447c10 c00000000404de18 c000000004447964
GPR28: c000000005573b10 c000000004d38810 00003fff62000000 420000000014e5e0
NIP [c00000000027bf6c] zap_huge_pmd+0x4c/0x470
LR [c00000000027bf64] zap_huge_pmd+0x44/0x470
Call Trace:
[c000000005573aa0] [c00000000027bf64] zap_huge_pmd+0x44/0x470 (unreliable)
[c000000005573af0] [c00000000022bbd8] unmap_page_range+0xcf8/0xed0
[c000000005573c30] [c00000000022c2d4] unmap_vmas+0x84/0x120
[c000000005573c80] [c000000000235448] unmap_region+0xd8/0x1b0
[c000000005573d80] [c0000000002378f0] do_munmap+0x2d0/0x4c0
[c000000005573df0] [c000000000237be4] SyS_munmap+0x64/0xb0
[c000000005573e30] [c000000000009560] system_call+0x38/0x108
Instruction dump:
fbe1fff8 fb81ffe0 7c7f1b78 7ca32b78 7cbd2b78 f8010010 7c9a2378 f821ffb1
7cde3378 4bfffea9 7c7b1b79 41820298 <e87f0000> 48000130 7fa5eb78 7fc4f378

Most of the time, the bug is surfacing in a caller up in the stack from
__pSeries_lpar_hugepage_invalidate() which is quite confusing.

This bug is pending since v3.11 but was hidden if a caller of the
caller of __pSeries_lpar_hugepage_invalidate() has pushed the corruped
register (r18 in this case) in the stack and is not using it until
restoring it. GCC 6.2.0 seems to raise it more frequently.

This commit also change the definition of the parameter buffer in
pSeries_lpar_flush_hash_range() to rely on the global define
PLPAR_HCALL9_BUFSIZE (no functional change here).

Fixes: 1a5272866f87 ("powerpc: Optimize hugepage invalidate")
Cc: <email address hidden>
Cc: Aneesh Kumar K.V <email address hidden>
Signed-off-by: Laurent Dufour <email address hidden>
Reviewed-by: Aneesh Kumar K.V <email address hidden>
Acked-by: Balbir Singh <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Seth Forshee <email address hidden>
Acked-by: Leann Ogasawara <email address hidden>
Signed-off-by: Seth Forshee <email address hidden>

097dd5a... by Marcelo Cerri

crypto: sha1-powerpc - little-endian support

BugLink: https://bugs.launchpad.net/bugs/1629977

The driver does not handle endianness properly when loading the input
data.

Signed-off-by: Marcelo Cerri <email address hidden>
Signed-off-by: Herbert Xu <email address hidden>
(cherry picked from commit 74ff6cb3aa438490ad8f8432e7b68dbcfa5ca449)
Signed-off-by: Marcelo Cerri <email address hidden>
Acked-by: Brad Figg <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>

48a0089... by Tim Gardner

Revert "x86/efi: Save and restore FPU context around efi_calls (x86_64)"

BugLink: http://bugs.launchpad.net/bugs/1608854

This reverts commit b635025056fd967bb0ee213cd7da6e91fe68ba10.

Causes failure to boot on some Dell and HP platforms.

Partial revert to the __kernel_fpu_begin()/__kernel_fpu_end() calls.
Leave the include file alone as its absense causes i386 compile errors.

Signed-off-by: Tim Gardner <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Brad Figg <email address hidden>

e51dffa... by Tim Gardner

UBUNTU: SAUCE: UEFI: Set EFI_SECURE_BOOT bit in x86_efi_facility

BugLink: http://bugs.launchpad.net/bugs/1593075
BugLink: http://bugs.launchpad.net/bugs/1608854

/proc/sys/kernel/secure_boot depends on this bit.

Signed-off-by: Tim Gardner <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Brad Figg <email address hidden>

dfa613e... by Tim Gardner

UBUNTU: SAUCE: UEFI: Add secure boot and MOK SB State disabled sysctl

BugLink: http://bugs.launchpad.net/bugs/1593075
BugLink: http://bugs.launchpad.net/bugs/1608854

This is a better method for detecting the state of secure boot and
the MOKSBState override, as opposed to grepping status from the kernel log.
Both variables return 0 or 1. If secure_boot==0 then signed module
enforcement is not enabled. Likewise, if moksbstate_disabled==1 then
signed module enforcement is not enabled. The only conditions uder which
signed module enforcement is enabled is when secure_boot==1 and
moksbstate_disabled==0.

/proc/sys/kernel/secure_boot
/proc/sys/kernel/moksbstate_disabled

Signed-off-by: Tim Gardner <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Brad Figg <email address hidden>

cc2770e... by Tim Gardner

UBUNTU: SAUCE: UEFI: Display MOKSBState when disabled

BugLink: http://bugs.launchpad.net/bugs/1571691
BugLink: http://bugs.launchpad.net/bugs/1566221
BugLink: http://bugs.launchpad.net/bugs/1608854

It would be much simpler if one could pass MOKSBState via a global variable,
but the the EFI bits appear to be managed and linked a bit differently then
a normal text section. Hence the shennanigans with boot_params.secure_boot.

Signed-off-by: Tim Gardner <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Brad Figg <email address hidden>

f2fb2f0... by Josh Boyer <email address hidden>

UBUNTU: SAUCE: UEFI: efi: Disable secure boot if shim is in insecure mode

BugLink: http://bugs.launchpad.net/bugs/1571691
BugLink: http://bugs.launchpad.net/bugs/1566221
BugLink: http://bugs.launchpad.net/bugs/1608854

git://pkgs.fedoraproject.org/rpms/kernel.git

A user can manually tell the shim boot loader to disable validation of
images it loads. When a user does this, it creates a UEFI variable called
MokSBState that does not have the runtime attribute set. Given that the
user explicitly disabled validation, we can honor that and not enable
secure boot mode if that variable is set.

Signed-off-by: Josh Boyer <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Brad Figg <email address hidden>