~kmously/ubuntu/+source/linux/+git/bionic:temp-for-respin

Last commit made on 2020-12-09
Get this branch:
git clone -b temp-for-respin https://git.launchpad.net/~kmously/ubuntu/+source/linux/+git/bionic
Only Khaled El Mously can upload to this branch. If you are Khaled El Mously please log in for upload directions.

Branch merges

Branch information

Name:
temp-for-respin
Repository:
lp:~kmously/ubuntu/+source/linux/+git/bionic

Recent commits

97cb675... by Khaled El Mously

Revert "md: add md_submit_discard_bio() for submitting discard bio"

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

This reverts commit edf4cd46cf86430f67499035ae461e2e9d23ffa6.

Signed-off-by: Khalid Elmously <email address hidden>

bcac7a8... by Khaled El Mously

Revert "md/raid10: extend r10bio devs to raid disks"

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

This reverts commit db7d25b0ea2059561bd0b9b789467bdc395f1b85.

Signed-off-by: Khalid Elmously <email address hidden>

a458f00... by Khaled El Mously

Revert "md/raid10: pull codes that wait for blocked dev into one function"

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

This reverts commit 3da589e0b3b189d6482cd84d2d49bc488d9e4c2e.

Signed-off-by: Khalid Elmously <email address hidden>

1e3878f... by Khaled El Mously

Revert "md/raid10: improve raid10 discard request"

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

This reverts commit 66a445416fb7d84b50f6bbfe2051ab33da158d92.

Signed-off-by: Khalid Elmously <email address hidden>

c8dddf0... by Khaled El Mously

Revert "md/raid10: improve discard request for far layout"

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

This reverts commit a40a97259c33993797495cb2e8576f43a05ec286.

Signed-off-by: Khalid Elmously <email address hidden>

6272d97... by Thadeu Lima de Souza Cascardo

UBUNTU: Ubuntu-4.15.0-126.129

Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>

2a372d7... by Thadeu Lima de Souza Cascardo

UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1905305
Properties: no-test-build
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>

fbb68b6... by Nicholas Piggin <email address hidden>

powerpc/64s: flush L1D after user accesses

IBM Power9 processors can speculatively operate on data in the L1 cache before
it has been completely validated, via a way-prediction mechanism. It is not possible
for an attacker to determine the contents of impermissible memory using this method,
since these systems implement a combination of hardware and software security measures
to prevent scenarios where protected data could be leaked.

However these measures don't address the scenario where an attacker induces
the operating system to speculatively execute instructions using data that the
attacker controls. This can be used for example to speculatively bypass "kernel
user access prevention" techniques, as discovered by Anthony Steinhauser of
Google's Safeside Project. This is not an attack by itself, but there is a possibility
it could be used in conjunction with side-channels or other weaknesses in the
privileged code to construct an attack.

This issue can be mitigated by flushing the L1 cache between privilege boundaries
of concern. This patch flushes the L1 cache after user accesses.

This is part of the fix for CVE-2020-4788.

Signed-off-by: Nicholas Piggin <email address hidden>
Signed-off-by: Daniel Axtens <email address hidden>
CVE-2020-4788
(backported from commit 9a32a7e78bd0cd9a9b6332cbdc345ee5ffd0c5de)
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Juerg Haefliger <email address hidden>

d23b4e3... by Nicholas Piggin <email address hidden>

powerpc/uaccess: Evaluate macro arguments once, before user access is allowed

get/put_user() can be called with nontrivial arguments. fs/proc/page.c
has a good example:

    if (put_user(stable_page_flags(ppage), out)) {

stable_page_flags() is quite a lot of code, including spin locks in
the page allocator.

Ensure these arguments are evaluated before user access is allowed.

This improves security by reducing code with access to userspace, but
it also fixes a PREEMPT bug with KUAP on powerpc/64s:
stable_page_flags() is currently called with AMR set to allow writes,
it ends up calling spin_unlock(), which can call preempt_schedule. But
the task switch code can not be called with AMR set (it relies on
interrupts saving the register), so this blows up.

It's fine if the code inside allow_user_access() is preemptible,
because a timer or IPI will save the AMR, but it's not okay to
explicitly cause a reschedule.

Fixes: de78a9c42a79 ("powerpc: Add a framework for Kernel Userspace Access Protection")
Signed-off-by: Nicholas Piggin <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
Link: https://<email address hidden>
(backported from commit d02f6b7dab8228487268298ea1f21081c0b4b3eb)
Signed-off-by: Daniel Axtens <email address hidden>
CVE-2020-4788
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Juerg Haefliger <email address hidden>

57d8f80... by Andrew Donnellan <email address hidden>

powerpc: Fix __clear_user() with KUAP enabled

The KUAP implementation adds calls in clear_user() to enable and
disable access to userspace memory. However, it doesn't add these to
__clear_user(), which is used in the ptrace regset code.

As there's only one direct user of __clear_user() (the regset code),
and the time taken to set the AMR for KUAP purposes is going to
dominate the cost of a quick access_ok(), there's not much point
having a separate path.

Rename __clear_user() to __arch_clear_user(), and make __clear_user()
just call clear_user().

Reported-by: <email address hidden>
Reported-by: Daniel Axtens <email address hidden>
Suggested-by: Michael Ellerman <email address hidden>
Fixes: de78a9c42a79 ("powerpc: Add a framework for Kernel Userspace Access Protection")
Signed-off-by: Andrew Donnellan <email address hidden>
[mpe: Use __arch_clear_user() for the asm version like arm64 & nds32]
Signed-off-by: Michael Ellerman <email address hidden>
Link: https://<email address hidden>
(backported from commit 61e3acd8c693a14fc69b824cb5b08d02cb90a6e7)
Signed-off-by: Daniel Axtens <email address hidden>
CVE-2020-4788
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Juerg Haefliger <email address hidden>