Commit Graph

895390 Commits

Author SHA1 Message Date
Paul Lawrence
c58df626a9 ANDROID: Incremental fs: Fix crash on failed lookup
Don't call dput on error code

Change-Id: Ie63645c9ed67fa231829917ae8ca154e049b4921
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Bug: 133435829
(cherry picked from commit 334164ca0f18ea89a922b90020f5e3840a928503)
2020-02-06 18:28:35 +00:00
Yurii Zubrytskyi
e8910f2df6 ANDROID: Incremental fs: Make files writeable
- added chmod() to +0222 to make all backing files and dirs
  writable. vold/system_server have a umask that clears those
  flags, making incfs unusable

Signed-off-by: Yurii Zubrytskyi <zyy@google.com>
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Bug: 133435829
Change-Id: Id9258401570cc2cc7cd5735aace89d379a9b043d
(cherry picked from commit bc5e5bc1d007e99228ca0717daa12639627819ba)
2020-02-06 18:11:16 +00:00
Greg Kroah-Hartman
374b29865b Merge 4cbc418a44 ("Merge branch 'cve-2019-3016' into kvm-next-5.6")
into android-mainline

Baby steps on the merge to make it easier to debug.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5062fa8157ffcbad14795942662628d16e390173
2020-02-06 17:36:22 +01:00
Greg Kroah-Hartman
121c64f6b3 Merge 893e591b59 ("Merge tag 'devicetree-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux") into android-mainline
Baby steps on the 5.6-rc1 merge...

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1a7b968e6020049de82e6925ece08cf91be5c2b8
2020-02-06 14:33:45 +00:00
Donghoon Yu
72bba4e8f9 ANDROID: support GKI image that contains an uncompressed Kernel Image.
how to build:
KERNEL_BINARY=Image

Bug: 148919783
Change-Id: I0b4c4b9a85f301732bbc086a05627b01d7b3cedd
Signed-off-by: Donghoon Yu <hoony.yu@samsung.com>
2020-02-06 11:09:08 +00:00
Paul Lawrence
eab9b254c0 ANDROID: Incremental fs: Remove C++-style comments
Change-Id: I89e1dc6020e596fb36694f8646f78b98f7ad4a7f
Bug: 133435829
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2020-02-05 23:17:25 +00:00
John Stultz
ddb56c8814 ANDROID: db845c: Update db845c_gki.fragment to add support for bluetooth modules
Finally got bluetooth working, so add the modules to
the db845c gki fragment

Bug: 146449535
Change-Id: I0e987fcae3b3c0bff7e6846ab61477d5707c7a5d
Signed-off-by: John Stultz <john.stultz@linaro.org>
2020-02-05 18:00:25 +00:00
Hridya Valsaraju
7760dae8e0 ANDROID: gki_defconfig: Set CONFIG_ANDROID_BINDERFS=y
Enable binderfs.

Bug: 136497735
Test: build, boot, binder devices created in /dev/binderfs
Change-Id: I551ed59e108f49dc0a198fbfd453cde6a2eea0fd
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-02-04 22:25:34 +00:00
Hridya Valsaraju
b437147101 FROMLIST: selinux: Fix typo in filesystem name
Correct the filesystem name to "binder" to enable
genfscon per-file labelling for binderfs.

Fixes: 7a4b519474 ("selinux: allow per-file labelling for binderfs")
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>

Bug: 136497735
Change-Id: I6139ede4eb6e85f5399f826834b062bbf33d28cf
Link: https://lore.kernel.org/patchwork/patch/1188587/
2020-02-04 22:25:24 +00:00
Paul Lawrence
d0adf8bc01 ANDROID: Incremental fs: Remove unneeded compatibility typedef
Bug: 133435829
Test: builds, incfs_test passes
Change-Id: I9b2ad81d230009daadf2c30f3609fda16e79028c
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2020-02-04 04:51:52 +00:00
Paul Lawrence
2802188469 ANDROID: Incremental fs: Enable incrementalfs in GKI
Bug: 133435829
Test: Builds, incfs_test passes
Change-Id: I334088b3aadcffe3f42f991b0d2039ff7b221ac5
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2020-02-04 04:51:43 +00:00
Paul Lawrence
8c43b745a4 ANDROID: Incremental fs: Fix sparse errors
Fix all sparse errors in fs/incfs except
fs/incfs/integrity.c:192:9: warning: Variable length array is used

Test: incfs_test passes
Bug: 133435829
Change-Id: I9c2e26e4e1a06a894977f11a3c8559b968dd115e
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2020-02-04 04:51:35 +00:00
Paul Lawrence
6855de4adb ANDROID: Fixing incremental fs style issues
Removed WARN_ONs
Removed compatibilty code
Fixed tab issue

Bug: 133435829
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I8a9e9ead48a65fd09c2d01d22f65d9a352f118e2
2020-02-04 04:51:28 +00:00
Paul Lawrence
74e8c51563 ANDROID: Make incfs selftests pass
Fixed incfs_test build errors
Fixed Kconfig errors
Readded .gitignore

Test: With just enabling CONFIG_INCREMENTAL_FS, both defconfig and
cuttlefish_defconfig build and incfs_test runs and passes

Bug: 133435829
Change-Id: Id3247ffcc63a095f66dcedf554017a06c5a9ce4a
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2020-02-04 04:51:16 +00:00
Eugene Zemtsov
c6819dd778 ANDROID: Initial commit of Incremental FS
Fully working incremental fs filesystem

Signed-off-by: Eugene Zemtsov <ezemtsov@google.com>
Signed-off-by: Paul Lawrence <paullawrence@google.com>

Bug: 133435829
Change-Id: I14741a61ce7891a0f9054e70f026917712cbef78
2020-02-04 04:51:09 +00:00
Alistair Delva
d9cb255af3 Revert "security,lockdown,selinux: implement SELinux lockdown"
This reverts commit 59438b4647.

This unblocks the booting of Android on newer kernels. It is a temporary
workaround and the correct fix is to add new core sepolicy.

Bug: 148822198
Change-Id: Ic521cb760c867c12dfcb7d2752280fbb0eddb82c
Signed-off-by: Alistair Delva <adelva@google.com>
2020-02-03 17:54:26 -08:00
Greg Kroah-Hartman
52ced52490 Revert "Revert "FROMLIST: scsi: ufs: Add dev ref clock gating wait time support""
This reverts commit 8326ceb4bc which was
commit 1ddc9771d5.  It was fixed up by
hand due to the scsi upstream merge.

Bug: 143632303
Link: https://lore.kernel.org/patchwork/patch/1149892/
Cc: Can Guo <cang@codeaurora.org>
Cc: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I69900cab82eb84a384db3b30c5a6311964ec9d91
2020-02-03 16:46:15 +00:00
Greg Kroah-Hartman
bf01359e5f Revert "Revert "FROMLIST: scsi: ufs: Flush exception event before suspend""
This reverts commit 4b4777168d which was a
revert of commit 12db3a26e4.  We added it
back by hand after the scsi upstream tree merge

Bug: 143632303
Cc: Sayali Lokhande <sayalil@codeaurora.org>
Cc: Asutosh Das <asutoshd@codeaurora.org>
Cc: Can Guo <cang@codeaurora.org>
Cc: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I36f2931b04f7963b7121511d6061c13a18891b77
2020-02-03 16:46:06 +00:00
Greg Kroah-Hartman
7881aee544 Merge 39bed42de2 ("Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma") into android-mainline
Baby steps in the 5.6-rc1 merge cycle to make things easier to review
and debug.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0fa183764fd1adbde44e8181f0b3df6cff4da18b
2020-02-03 15:34:37 +00:00
Greg Kroah-Hartman
4f92040911 Revert "Revert "FROMLIST: scsi: ufs: export hibern8 entry and exit""
This reverts commit 0990eff7509fecafad9a44a56801c97e8e8ce9c6 which was a
revert of commit 38c1605e75.

We need these symbols back, so add the patch back.

Bug: 143136976
Cc: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I39f86820c3b0e5901006c588870d5efeda2e92f0
2020-02-03 14:11:50 +00:00
Greg Kroah-Hartman
caca4aee82 Merge 33c84e89ab ("Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi") into android-mainline
Baby steps in the 5.6-rc1 merge cycle to make things easier to review
and debug.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I21591d9c9b073f02dde6aae031bd740fe512251b
2020-02-03 12:58:11 +00:00
Greg Kroah-Hartman
4b4777168d Revert "FROMLIST: scsi: ufs: Flush exception event before suspend"
This reverts commit 12db3a26e4.

In order to merge with the scsi code upstream, this needs to be
reverted.  Hopefully we can merge it back later...

Bug: 143632303
Cc: Sayali Lokhande <sayalil@codeaurora.org>
Cc: Asutosh Das <asutoshd@codeaurora.org>
Cc: Can Guo <cang@codeaurora.org>
Cc: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I86d51bd65965a5e0b3dcce5c72a2e1dca50fd0c6
2020-02-03 12:32:16 +00:00
Greg Kroah-Hartman
1543a45023 Revert "FROMLIST: scsi: ufs: export hibern8 entry and exit"
This reverts commit 38c1605e75.

In order to merge with the scsi code upstream, this needs to be
reverted.  Hopefully we can merge it back later...

Bug: 143136976
Cc: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4ba46c9e11a3882131449efcc8a45481348fbea1
2020-02-03 12:32:13 +00:00
Greg Kroah-Hartman
1954732ea5 Revert "FROMLIST: scsi: ufs: Do not rely on prefetched data"
This reverts commit c1f1db3714.

In order to merge with the scsi code upstream, this needs to be
reverted.  Hopefully we can merge it back later...

Bug: 143632303
Link: https://lore.kernel.org/patchwork/patch/1147024/
Cc: Can Guo <cang@codeaurora.org>
Cc: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2d7a785fda4eb705396ffb01a24c92fe91841c1b
2020-02-03 12:32:10 +00:00
Greg Kroah-Hartman
8326ceb4bc Revert "FROMLIST: scsi: ufs: Add dev ref clock gating wait time support"
This reverts commit 1ddc9771d5.

In order to merge with the scsi code upstream, this needs to be
reverted.  Hopefully we can merge it back later...

Bug: 143632303
Link: https://lore.kernel.org/patchwork/patch/1149892/
Cc: Can Guo <cang@codeaurora.org>
Cc: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I18af522146462e8212e8ffba437fbb23bca3318a
2020-02-03 12:32:00 +00:00
Greg Kroah-Hartman
2fa0ed8af5 Merge e9f8ca0ae7 ("Merge tag 'for-5.6/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm") into android-mainline
Baby steps in the 5.6-rc1 merge cycle to make things easier to review
and debug.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2d3a69b5256f71ae18b500b0ef145f93e4255dbc
2020-02-03 10:42:29 +00:00
Greg Kroah-Hartman
2b0f7f511d Merge b3a6082223 ("Merge branch 'for-v5.6' of git://git.kernel.org:/pub/scm/linux/kernel/git/jmorris/linux-security") into android-mainline
Baby steps in the 5.6-rc1 merge cycle to make things easier to review
and debug.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I084fc068d4c94625e63441029e08e143146d97b7
2020-02-03 10:13:20 +00:00
Ram Muthiah
358c6ef08a ANDROID: gki: Enable DRM_GEM_SHMEM_HELPER for GKI
Bug: 139431025
Test: Treehugger
Change-Id: I9a454e4f1e988627a5318ccffd9714a955dd50df
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
2020-02-01 03:01:29 +00:00
Ram Muthiah
7f31c11fd0 ANDROID: gki: Removed cf modules from gki_defconfig
Bug: 139431025
Test: Treehugger
Change-Id: Ib1de19b851f8dc07f77e4b6ec5acf88b6051b070
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
2020-02-01 00:27:50 +00:00
Ram Muthiah
64b9a20673 ANDROID: Remove default y for VIRTIO_PCI_LEGACY
Bug: 139431025
Test: Treehugger
Change-Id: I6943cf6b1fedc2b82332c1dcf9a91281a3ca5627
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
2020-01-31 16:13:56 -08:00
Sami Tolvanen
dd447e0f04 ANDROID: kallsyms: strip hashes from static functions with ThinLTO and CFI
With CONFIG_THINLTO and CFI both enabled, LLVM appends a hash to the
names of all static functions. This breaks userspace tools, so strip
out the hash from output.

Bug: 147422318
Change-Id: Ie19a59d9d0681298be54e73064badc361c0f7014
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2020-01-31 16:14:38 +00:00
Sami Tolvanen
8be5d29b7b ANDROID: bpf: disable CFI for dispatcher functions
BPF dispatcher functions are patched at runtime to perform direct
instead of indirect calls. Disable CFI for the dispatcher functions
to avoid conflicts.

(re-add due to merge conflicts previously)

Bug: 145210207
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7edf6052e121d16ccb0f3d3492ff4eefedfa509e
2020-01-31 08:24:35 +01:00
Greg Kroah-Hartman
c37185c6d3 Merge bd2463ac7d ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") into android-common
Baby steps in the 5.6-rc1 merge cycle to make things easier to review
and debug.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4c44b3c32065ea0ed8175b31665f2a4195a27300
2020-01-31 08:22:22 +01:00
Greg Kroah-Hartman
eae549d63b Revert "UPSTREAM: bpf: Move trampoline JIT image allocation to a function"
This reverts commit aa2cc4ed15.

It conflicts with the upstream BPF changes so needs to be dropped for
now as it will show up throught the BPF tree.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0a38cbaf388c3362f8fd7fad7139b16ea9967fe7
2020-01-31 08:20:27 +01:00
Greg Kroah-Hartman
d12d53b72f Revert "UPSTREAM: bpf: Introduce BPF dispatcher"
This reverts commit 22cf3ea720.

It conflicts with the BPF merge and will come in through the upstream
tree.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I404d2e9efcd6057d481be2562cb9b2a559b70e58
2020-01-31 08:20:27 +01:00
Greg Kroah-Hartman
4f91256854 Revert "UPSTREAM: bpf, xdp: Start using the BPF dispatcher for XDP"
This reverts commit 3ea9abc389.

It conflicts with the BPF merge from upstream and will come in through
that tree.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I59c2176184c955d240b571d000460d89c6d2f80d
2020-01-31 08:19:45 +01:00
Greg Kroah-Hartman
cf29e01887 Revert "UPSTREAM: bpf, x86: Align dispatcher branch targets to 16B"
This reverts commit f6a4d900cc.

It conflicts with the BPF merge and will come in through that tree
instead.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idffa84def2a994a306c79803d49b7461adfae44c
2020-01-31 08:19:11 +01:00
Greg Kroah-Hartman
24e0e1f009 Revert "ANDROID: bpf: disable CFI for dispatcher functions"
This reverts commit cedd91c6f4.

It conflicts with the BPF merge and will have to be added back later "by
hand".

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9b070d804c16b12a416ddc630c4440ea85f5531b
2020-01-31 08:18:43 +01:00
Greg Kroah-Hartman
13e3108408 Merge a78208e243 ("Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6") into android-mainline
Baby steps in the 5.6-rc1 merge cycle to make things easier to review
and debug.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6d63f7c9484210bae7474a809defd1aaa58e15f8
2020-01-31 07:23:04 +01:00
Paolo Bonzini
4cbc418a44 Merge branch 'cve-2019-3016' into kvm-next-5.6
From Boris Ostrovsky:

The KVM hypervisor may provide a guest with ability to defer remote TLB
flush when the remote VCPU is not running. When this feature is used,
the TLB flush will happen only when the remote VPCU is scheduled to run
again. This will avoid unnecessary (and expensive) IPIs.

Under certain circumstances, when a guest initiates such deferred action,
the hypervisor may miss the request. It is also possible that the guest
may mistakenly assume that it has already marked remote VCPU as needing
a flush when in fact that request had already been processed by the
hypervisor. In both cases this will result in an invalid translation
being present in a vCPU, potentially allowing accesses to memory locations
in that guest's address space that should not be accessible.

Note that only intra-guest memory is vulnerable.

The five patches address both of these problems:
1. The first patch makes sure the hypervisor doesn't accidentally clear
a guest's remote flush request
2. The rest of the patches prevent the race between hypervisor
acknowledging a remote flush request and guest issuing a new one.

Conflicts:
	arch/x86/kvm/x86.c [move from kvm_arch_vcpu_free to kvm_arch_vcpu_destroy]
2020-01-30 18:47:59 +01:00
Boris Ostrovsky
a6bd811f12 x86/KVM: Clean up host's steal time structure
Now that we are mapping kvm_steal_time from the guest directly we
don't need keep a copy of it in kvm_vcpu_arch.st. The same is true
for the stime field.

This is part of CVE-2019-3016.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-01-30 18:45:55 +01:00
Boris Ostrovsky
b043138246 x86/KVM: Make sure KVM_VCPU_FLUSH_TLB flag is not missed
There is a potential race in record_steal_time() between setting
host-local vcpu->arch.st.steal.preempted to zero (i.e. clearing
KVM_VCPU_PREEMPTED) and propagating this value to the guest with
kvm_write_guest_cached(). Between those two events the guest may
still see KVM_VCPU_PREEMPTED in its copy of kvm_steal_time, set
KVM_VCPU_FLUSH_TLB and assume that hypervisor will do the right
thing. Which it won't.

Instad of copying, we should map kvm_steal_time and that will
guarantee atomicity of accesses to @preempted.

This is part of CVE-2019-3016.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-01-30 18:45:55 +01:00
Boris Ostrovsky
917248144d x86/kvm: Cache gfn to pfn translation
__kvm_map_gfn()'s call to gfn_to_pfn_memslot() is
* relatively expensive
* in certain cases (such as when done from atomic context) cannot be called

Stashing gfn-to-pfn mapping should help with both cases.

This is part of CVE-2019-3016.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-01-30 18:45:55 +01:00
Boris Ostrovsky
1eff70a9ab x86/kvm: Introduce kvm_(un)map_gfn()
kvm_vcpu_(un)map operates on gfns from any current address space.
In certain cases we want to make sure we are not mapping SMRAM
and for that we can use kvm_(un)map_gfn() that we are introducing
in this patch.

This is part of CVE-2019-3016.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-01-30 18:45:54 +01:00
Boris Ostrovsky
8c6de56a42 x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit
kvm_steal_time_set_preempted() may accidentally clear KVM_VCPU_FLUSH_TLB
bit if it is called more than once while VCPU is preempted.

This is part of CVE-2019-3016.

(This bug was also independently discovered by Jim Mattson
<jmattson@google.com>)

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-01-30 18:45:54 +01:00
Paolo Bonzini
1d5920c306 Merge tag 'kvm-ppc-next-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD
Second KVM PPC update for 5.6

* Fix compile warning on 32-bit machines
* Fix locking error in secure VM support
2020-01-30 18:14:26 +01:00
Paolo Bonzini
621ab20c06 Merge tag 'kvmarm-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm updates for Linux 5.6

- Fix MMIO sign extension
- Fix HYP VA tagging on tag space exhaustion
- Fix PSTATE/CPSR handling when generating exception
- Fix MMU notifier's advertizing of young pages
- Fix poisoned page handling
- Fix PMU SW event handling
- Fix TVAL register access
- Fix AArch32 external abort injection
- Fix ITS unmapped collection handling
- Various cleanups
2020-01-30 18:13:14 +01:00
Eric Biggers
5cc45ee595 Merge f0d8744143 ("Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt") into android-mainline
Merge the upstream merge of fscrypt-for-linus, to resolve conflicts
between the fscrypt changes that went upstream in 5.6 and the inline
crypto and hardware-wrapped key support that is currently being carried
in the Android common kernels.

Conflicts:
        fs/crypto/Kconfig
        fs/crypto/bio.c
        fs/crypto/fname.c
        fs/crypto/fscrypt_private.h
        fs/crypto/keyring.c
        fs/crypto/keysetup.c
        include/uapi/linux/fscrypt.h

Merge resolution notes:

- In fscrypt_zeroout_range(), split the inline crypto case into a
  separate function fscrypt_zeroout_range_inlinecrypt(), as mixing the
  two cases together became much harder due to the upstream changes.

- Allow the size of fscrypt-provisioning keys to be up to
  FSCRYPT_MAX_HW_WRAPPED_KEY_SIZE rather than FSCRYPT_MAX_KEY_SIZE.

Change-Id: Ib1e6b9eda8fb5dcfc6bdc8fa89d93f72b088c5f6
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-01-30 08:50:02 -08:00
Sami Tolvanen
cedd91c6f4 ANDROID: bpf: disable CFI for dispatcher functions
BPF dispatcher functions are patched at runtime to perform direct
instead of indirect calls. Disable CFI for the dispatcher functions
to avoid conflicts.

Bug: 145210207
Change-Id: I61dc7ce8a549145a79b7e69c646888578e0641ba
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2020-01-30 08:17:01 -08:00
Björn Töpel
f6a4d900cc UPSTREAM: bpf, x86: Align dispatcher branch targets to 16B
>From Intel 64 and IA-32 Architectures Optimization Reference Manual,
3.4.1.4 Code Alignment, Assembly/Compiler Coding Rule 11: All branch
targets should be 16-byte aligned.

This commits aligns branch targets according to the Intel manual.

The nops used to align branch targets make the dispatcher larger, and
therefore the number of supported dispatch points/programs are
descreased from 64 to 48.

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191213175112.30208-7-bjorn.topel@gmail.com
(cherry picked from commit 116eb788f5)
Bug: 145210207
Change-Id: I04996cd41bf109aaa63b5aa23773c34ef1f90d8b
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2020-01-30 08:17:01 -08:00