Commit Graph

929601 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
068dbd8a6d Revert "ANDROID: efi/libstub: disable LTO"
This reverts commit a4fa5799c0 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia81e7927c504b549faf75c65ab3418bda0930d79
2020-06-24 08:49:36 +02:00
Greg Kroah-Hartman
226fd68780 Revert "ANDROID: drivers/misc/lkdtm: disable LTO for rodata.o"
This reverts commit 95788bcf46 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iae782ce51812ecc9b7f8508e428f0db504b5d169
2020-06-24 08:47:45 +02:00
Greg Kroah-Hartman
0472716d99 Revert "ANDROID: init: ensure initcall ordering with LTO"
This reverts commit 6c5ad8b10e as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0b67a8a0d4b54c5be30f0bfc5abdd1422b7ab2f1
2020-06-24 08:47:44 +02:00
Greg Kroah-Hartman
5c1311f758 Revert "ANDROID: soc/tegra: disable ARCH_TEGRA_210_SOC with LTO"
This reverts commit 79ff0889f8 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id685f8e997e7e941ea1b1a7e00a2188581c1c794
2020-06-24 08:47:43 +02:00
Greg Kroah-Hartman
d22ba28620 Revert "ANDROID: irqchip/gic-v3: rename gic_of_init to work around a ThinLTO+CFI bug"
This reverts commit 23141e2689 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4c8d4a523ad46af98162a6f453d39f81eb70be34
2020-06-24 08:47:42 +02:00
Greg Kroah-Hartman
f9703749df Revert "ANDROID: arm64: disable HAVE_ARCH_PREL32_RELOCATIONS with LTO_CLANG"
This reverts commit a516ca1ee7 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I753a5af94ce247d1929b79a01725ce392de1a547
2020-06-24 08:47:41 +02:00
Greg Kroah-Hartman
5b5ef1903c Revert "ANDROID: arm64: allow LTO_CLANG and THINLTO to be selected"
This reverts commit f08b8ec58c as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic9c6fd69bec1e4e7535019cbd38436a5bd6f6d69
2020-06-24 08:40:18 +02:00
Greg Kroah-Hartman
6c80b2e494 Revert "ANDROID: gki_defconfig: enable LTO, CFI, and SCS"
This reverts commit 59ec77600f as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I361630df79f3cd19de62908233e2d10204627910
2020-06-24 08:34:49 +02:00
Greg Kroah-Hartman
677093625d Revert "ANDROID: kbuild: fix modfinal with LTO"
This reverts commit 2d939f16c3 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I36ab73538f0ea727b82b52edb2a3c049d440aaed
2020-06-24 08:34:47 +02:00
Greg Kroah-Hartman
f3ab3cc850 Revert "ANDROID: kbuild: merge module sections with LTO"
This reverts commit b4205c196f as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I63a1a1e99642b0f4b4437e9c10cdc2ff99045b9e
2020-06-24 08:34:46 +02:00
Greg Kroah-Hartman
820fe5fe36 Revert "ANDROID: kbuild: limit LTO inlining"
This reverts commit 1bca3d0382 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia2f1ba9327547f297065f3c72b769f04ff3a7efc
2020-06-24 08:34:45 +02:00
Greg Kroah-Hartman
bb06582632 Revert "ANDROID: x86/vdso: disable LTO only for VDSO"
This reverts commit 92381c512b as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0cf09578c03cda54181a252eba3457e9fb5278cc
2020-06-24 08:08:30 +02:00
Greg Kroah-Hartman
11f0146a49 Revert "ANDROID: x86: disable HAVE_ARCH_PREL32_RELOCATIONS with LTO_CLANG"
This reverts commit c8ad0a80c3 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I369f8f4c0c36d87f29174077bfcc9fdb4ec55711
2020-06-24 08:08:29 +02:00
Greg Kroah-Hartman
4efebc9981 Revert "ANDROID: x86: disable STACK_VALIDATION with LTO_CLANG"
This reverts commit d5a3eb9d1e as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iee3a7be4b32a8c37d55962317421330ff03de24c
2020-06-24 08:08:28 +02:00
Greg Kroah-Hartman
513ee6ef8a Revert "ANDROID: x86: disable UNWINDER_ORC with LTO_CLANG"
This reverts commit 8e1a228356 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6d7faff1f85ed73e7f1b1829e65b1c84f80cbf86
2020-06-24 08:06:08 +02:00
Greg Kroah-Hartman
3a8961d3a1 Revert "ANDROID: x86, build: allow LTO_CLANG and THINLTO to be selected"
This reverts commit 9145ef459e as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I970783b2bc64c725d0478991c82bcdc089ee8a19
2020-06-24 07:38:06 +02:00
Greg Kroah-Hartman
49b2507414 Revert "ANDROID: x86: gki_defconfig: enable LTO and CFI"
This reverts commit 56d519e9e2 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id1a082986d0637d5906f517484cc7de3b7f10bd7
2020-06-24 07:36:37 +02:00
Greg Kroah-Hartman
c5a5355e10 Revert "ANDROID: kallsyms: strip hashes from static functions with ThinLTO and CFI"
This reverts commit dd447e0f04 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idb31c3db0d358b250b241d5c04e8bafd9cd3d2d5
2020-06-24 07:34:49 +02:00
Greg Kroah-Hartman
536adca27b Revert "ANDROID: kbuild: merge more sections with LTO"
This reverts commit 269e56aa35 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0f30445f7c4da610be9ac865c005d152b0d0b2c8
2020-06-24 07:33:39 +02:00
Greg Kroah-Hartman
b378328f2a Merge 818dbde78e ("Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi") into android-mainline
Steps on the way to 5.8-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3beac21380f95fa9eaa9eb4c708c47c9c6addf11
2020-06-24 07:11:16 +02:00
Greg Kroah-Hartman
dbea740a7e Merge 7ae77150d9 ("Merge tag 'powerpc-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux") into android-mainline
Small steps on the way to 5.8-rc1.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic41e7ca6e9ea1dd506ec44a4251f1ded701efbf6
2020-06-23 21:47:20 +02:00
Greg Kroah-Hartman
94d5fade60 Revert "Revert "module: Make module_enable_ro() static again""
This reverts commit 95a06095ff as it
should now be resolved.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I521215f77e69ac4d26d4977d2a16a40298d96509
2020-06-23 21:46:26 +02:00
Greg Kroah-Hartman
44699162a3 Merge 9ff7258575 ("Merge branch 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace") into android-mainline
Baby steps on the way to 5.8-rc1.

Change-Id: Ie10408266ea00e8b989c6f31c824231da1da90c2
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-06-23 09:37:17 +02:00
Greg Kroah-Hartman
428ec716d3 Revert "ANDROID: make sure proc mount options are applied"
This reverts commit 1d92317c73 as it
should not be needed anymore with the recent changes in fa10fed30f
("proc: allow to mount many instances of proc in one pid namespace")

Cc: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3ddd939c081e0485ce3b46e4f6544d00cffad3dc
2020-06-23 09:36:15 +02:00
Greg Kroah-Hartman
dfd0059142 Merge 051c3556e3 ("Merge tag 'for_v5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs") into android-mainline
Small steps on the way to 5.8-rc1

Change-Id: I664ad93f8264c07f34ac1fefb4046d879e6129ed
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-06-23 08:32:23 +02:00
Christian Brauner
6663a9e9de FROMLIST: nsproxy: restore EINVAL for non-namespace file descriptor
The LTP testsuite reported a regression where users would now see EBADF
returned instead of EINVAL when an fd was passed that referred to an open
file but the file was not a nsfd. Fix this by continuing to report EINVAL.

Bug: 159609060
Link: https://lore.kernel.org/lkml/20200615085836.GR12456@shao2-debian
Fixes: 303cc571d1 ("nsproxy: attach to namespaces via pidfds")
Cc: Jan Stancek <jstancek@redhat.com>
Cc: Cyril Hrubis <chrubis@suse.cz>
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/lkml/20200616225612.4068799-1-christian.brauner@ubuntu.com/
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I659d41efb883f641b8db06f2c3b1f0dae8bab064
2020-06-23 07:45:19 +02:00
John Stultz
96331e0dc4 ANDROID: bpf: Workaround for bpf permissions check regression
From an email thread on how to try to fix up the current Android boot
issues...

Change-Id: If4a4ef96acc09708727451fb79233b3cc1f18482
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-06-22 18:59:35 +02:00
Greg Kroah-Hartman
95a06095ff Revert "module: Make module_enable_ro() static again"
This reverts commit e6eff4376e.

It causes a build-breakage on the network test configuration so revert
it for now to hopefully add back after -rc2 is merged.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I866dcc31dc3d3eb68929708d28935c5e13a7fb3d
2020-06-22 18:11:11 +02:00
Greg Kroah-Hartman
b5e512c42c ANDROID: GKI: update gki defconfigs
Update the gki defconfig files based on upstream changes causing some
symbols to no longer be needed in the defconfig files.

This means the following symbols are removed for x86 and arm64 gki
defconfigs:
	CONFIG_MEMCG_SWAP=y
	CONFIG_MEDIA_CAMERA_SUPPORT=y

And the following only for arm64:
	CONFIG_MEDIA_CONTROLLER=y

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie1fac5c6c873bea04f199a2b7df33d56ee3f246f
2020-06-22 15:45:56 +02:00
Greg Kroah-Hartman
bf8bebd9d9 Merge d77d1dbba9 ("Merge tag 'zonefs-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs") into android-mainline
Steps on the way to 5.8-rc1.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8dbf41fda6489c8511dc7154d5a0609444ac5e8b
2020-06-22 15:25:40 +02:00
Greg Kroah-Hartman
1ec3464acb Merge ee01c4d72a ("Merge branch 'akpm' (patches from Andrew)") into android-mainline
Steps along the way to 5.8-rc1.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6cca4fa48322228c8182201d68dc05f9b72cfc50
2020-06-22 15:13:57 +02:00
Greg Kroah-Hartman
8a8d41512f Merge cb8e59cc87 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") into android-mainline
Steps along the way to 5.8-rc1.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I280c0a50b5e137596b1c327759c6a18675908179
2020-06-22 14:58:18 +02:00
Greg Kroah-Hartman
9052db6554 Merge 2e63f6ce7e ("Merge branch 'uaccess.comedi' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs") into android-mainline
Baby steps on the way to 5.8-rc1.

A clean merge state for once...

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I35a7b84b14b046c3cc850f3cd0b4e5aad83706f1
2020-06-22 14:41:28 +02:00
Matthias Maennich
82ce726a3f ANDROID: Use depmod from the hermetic toolchain
DEPMOD=depmod overwrites the default DEPMOD=/sbin/depmod and uses the
depmod version from PATH (coming from the hermetic toolchain).

Bug: 130657633
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I73eefaa5508298bc61e9e586f981c5ddabed7656
2020-06-22 08:19:19 +00:00
Greg Kroah-Hartman
035f08016d Merge 039aeb9deb ("Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm") into android-mainline
Baby steps on the way to 5.8-rc1.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5962e12546d3d215c73c3d74b00ad6263d96f64e
2020-06-20 09:49:29 +02:00
Eric Biggers
228804d48c ANDROID: dm-bow: avoid truncating the logical block size
Upstream commit ad6bf88a6c ("block: fix an integer overflow in logical
block size") changed queue_limits::logical_block_size from 'unsigned
short' to 'unsigned int', and this commit has been backported to the LTS
branches.  Update the computation in dm_bow_io_hints() to match.

This mirrors upstream commit 64611a15ca ("dm crypt: avoid truncating
the logical block size") which fixed the same bug in dm-crypt.

Fixes: 7df64f6216 ("ANDROID: dm-bow: Add block_size option")
Change-Id: I45eba7d21cf178e4b8e624ef5f819a1ffb015a8d
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-06-19 18:51:08 +00:00
Eric Biggers
759502a4b8 ANDROID: dm-default-key: avoid truncating the logical block size
Upstream commit ad6bf88a6c ("block: fix an integer overflow in logical
block size") changed queue_limits::logical_block_size from 'unsigned
short' to 'unsigned int', and this commit has been backported to the LTS
branches.  Update the computation in default_key_io_hints() to match.

This mirrors upstream commit 64611a15ca ("dm crypt: avoid truncating
the logical block size") which fixed the same bug in dm-crypt.

Fixes: cb39ec0c10 ("ANDROID: dm: add dm-default-key target for metadata encryption")
Change-Id: I98dd65afdb120073203af3b201d0831edd6e245c
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-06-19 18:51:00 +00:00
Greg Kroah-Hartman
ea66609501 ANDROID: GKI: enable some more USB configfs options
Enable CONFIG_USB_CONFIGFS_ACM and CONFIG_USB_CONFIGFS_F_HID as these
options were somehow not selected before.

Bug: 158724286
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I79c47a598601d2316fb3ff66d3eef8b6f0a6149e
2020-06-19 16:46:21 +02:00
Eric Biggers
665ca1bf8e Merge commit 750a02ab8d ("Merge tag 'for-5.8/block-2020-06-01' of git://git.kernel.dk/linux-block") into android-mainline
Conflicts:
	block/blk-core.c
	block/blk-crypto-fallback.c
	block/blk-crypto.c
	block/keyslot-manager.c
	drivers/md/dm.c
	include/linux/blk-crypto.h
	include/linux/blk_types.h
	include/linux/keyslot-manager.h

Change-Id: Ie757c41fa41e6a9aacdf123d82d4f681623a02a8
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-06-17 17:18:48 -07:00
Satya Tangirala
c2b86b727a FROMLIST: Update Inline Encryption from v6 to upstream version of patch series
The block layer patches for inline encryption are now in upstream, so
update Android to the upstream version of inline encryption. The
fscrypt/f2fs/ext4 patches are also updated to the latest version sent
upstream (since they can't be updated separately from the block layer
patches).

Changes v6 => v7:
 - Keyslot management is now done on a per-request basis rather than a
   per-bio basis.
 - Storage drivers can now specify the maximum number of bytes they
   can accept for the data unit number (DUN) for each crypto algorithm,
   and upper layers can specify the minimum number of bytes of DUN they
   want with the blk_crypto_key they send with the bio - a driver is
   only considered to support a blk_crypto_key if the driver supports at
   least as many DUN bytes as the upper layer wants. This is necessary
   because storage drivers may not support as many bytes as the
   algorithm specification dictates (for e.g. UFS only supports 8 byte
   DUNs for AES-256-XTS, even though the algorithm specification
   says DUNs are 16 bytes long).
 - Introduce SB_INLINECRYPT to keep track of whether inline encryption
   is enabled for a filesystem (instead of using an fscrypt_operation).
 - Expose keyslot manager declaration and embed it within ufs_hba to
   clean up code.
 - Make blk-crypto preclude blk-integrity.
 - Some bug fixes
 - Introduce UFSHCD_QUIRK_BROKEN_CRYPTO for UFS drivers that don't
   support inline encryption (yet)

Changes v7 => v8:
 - Pass a struct blk_ksm_keyslot * around instead of slot numbers which
   simplifies some functions and passes around arguments with better types
 - Make bios with no encryption context avoid making calls into blk-crypto
   by checking for the presence of bi_crypt_context before making the call
 - Make blk-integrity preclude inline encryption support at probe time
 - Many many cleanups

Changes v8 => v9:
 - Don't open code bio_has_crypt_ctx into callers of blk-crypto functions.
 - Lots of cleanups

Changes v9 => v10:
 - Incorporate Eric's fix for allowing en/decryption to happen as usual via
   fscrypt in the case that hardware doesn't support the desired crypto
   configuration, but blk-crypto-fallback is disabled. (Introduce
   struct blk_crypto_config and blk_crypto_config_supported for fscrypt
   to call, to check that either blk-crypto-fallback is enabled or the
   device supports the crypto configuration).
 - Update docs
 - Lots of cleanups

Changes v10 => v11:
 - We now allocate a new bio_crypt_ctx for each request instead of
   pulling and reusing the one in the bio inserted into the request. The
   bio_crypt_ctx of a bio is freed after the bio is ended.
 - Make each blk_ksm_keyslot store a pointer to the blk_crypto_key
   instead of a copy of the blk_crypto_key, so that each blk_crypto_key
   will have its own keyslot. We also won't need to compute the siphash
   for a blk_crypto_key anymore.
 - Minor cleanups

Changes v11 => v12:
 - Inlined some fscrypt functions
 - Minor cleanups and improved comments

Changes v12 => v13:
 - Updated docs
 - Minor cleanups
 - rebased onto linux-block/for-next

Changes v13 => fscrypt/f2fs/ext4 upstream patch series
 - rename struct fscrypt_info::ci_key to ci_enc_key
 - set dun bytes more precisely in fscrypt
 - cleanups

Bug: 137270441
Test: Test cuttlefish boots both with and without inlinecrypt mount
      option specified in fstab, while using both F2FS and EXT4 for
      userdata.img. Also verified ciphertext via
      "atest -v vts_kernel_encryption_test"
      Also tested by running gce-xfstests on both the
      auto and encrypt test groups on EXT4 and F2FS both with and
      without the inlinecrypt mount option. The UFS changes were
      tested on a Pixel 4 device.
Link: https://lore.kernel.org/linux-block/20200514003727.69001-1-satyat@google.com/
Link: https://lore.kernel.org/linux-fscrypt/20200617075732.213198-1-satyat@google.com/
Link: https://lore.kernel.org/linux-scsi/20200617081841.218985-1-satyat@google.com/
Change-Id: I57c10d370bf006c9dfcf173f21a720413017761e
Signed-off-by: Satya Tangirala <satyat@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-06-17 17:17:30 -07:00
Greg Kroah-Hartman
48ef1614d0 Merge faa392181a ("Merge tag 'drm-next-2020-06-02' of git://anongit.freedesktop.org/drm/drm") into android-mainline
Tiny merge resolutions along the way to 5.8-rc1.

Change-Id: I0036e22af4e398b0bb3b9855ff90d60b9c0227ee
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-06-12 15:13:27 +02:00
Greg Kroah-Hartman
a64320f5b8 Merge 94709049fb ("Merge branch 'akpm' (patches from Andrew)") into android-mainline
Tiny merge resolutions along the way to 5.8-rc1.

Change-Id: I24b3cca28ed36f32c92b6374dae5d7f006d3bced
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-06-12 14:39:46 +02:00
Greg Kroah-Hartman
6663438904 Merge f359287765 ("Merge branch 'from-miklos' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs") into android-mainline
Baby steps on the way to 5.8-rc1

Change-Id: I2b608853beaeaeecbc24bcd32386aca21666cc13
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-06-12 14:27:10 +02:00
Greg Kroah-Hartman
e93a57129f Merge 062ea674ae ("Merge branch 'uaccess.__copy_to_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs") into android-mainline
baby steps on the way to 5.8-rc1

Change-Id: I45a38d5752e33d1f9a27bce6055435811512ea87
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-06-12 13:55:55 +02:00
Todd Kjos
9228ed937b Revert "ANDROID: gki_defconfig: disable KPROBES"
This reverts commit 953d8eab92.

Turn KPROBES back on now that selinux protection is in place

Bug: 149659981
Change-Id: I22462081fca1af9758e57bcd75c88bdd29d23f8b
Signed-off-by: Todd Kjos <tkjos@google.com>
2020-06-11 23:46:32 +00:00
Sami Tolvanen
269e56aa35 ANDROID: kbuild: merge more sections with LTO
Merge __patchable_function_entries sections and the following
new data sections generated by current LLVM versions:

  .bss..L* .bss..compoundliteral*
  .data..L* .data..compoundliteral*
  .rodata..L* .rodata..compoundliteral*

Also drop the unnecessary rules to merge .rela sections.

Bug: 158605670
Change-Id: I098212bc74dfb6b54d4fd60d90957fea29122a6c
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2020-06-11 11:05:17 -07:00
Maciej Żenczykowski
50e1df7fc2 Revert "ANDROID: Remove default y on BRIDGE_IGMP_SNOOPING"
This reverts commit b4667bd57d.

Reason for revert: Incorrect reasoning for change.

Change-Id: Iafbc2f3a07ca78a2f1421c6693d2c81c0085f3a8
2020-06-10 15:34:00 +00:00
Orjan Eide
f2bcdb43a7 ANDROID: staging: ion: Skip sync if not mapped
Only sync the sg-list of an Ion dma-buf attachment when the attachment
is actually mapped on the device.

dma-bufs may be synced at any time. It can be reached from user space
via DMA_BUF_IOCTL_SYNC, so there are no guarantees from callers on when
syncs may be attempted, and dma_buf_end_cpu_access() and
dma_buf_begin_cpu_access() may not be paired.

Since the sg_list's dma_address isn't set up until the buffer is used
on the device, and dma_map_sg() is called on it, the dma_address will be
NULL if sync is attempted on the dma-buf before it's mapped on a device.

Before v5.0 (commit 55897af630 ("dma-direct: merge swiotlb_dma_ops
into the dma_direct code")) this was a problem as the dma-api (at least
the swiotlb_dma_ops on arm64) would use the potentially invalid
dma_address. How that failed depended on how the device handled physical
address 0. If 0 was a valid address to physical ram, that page would get
flushed a lot, while the actual pages in the buffer would not get synced
correctly. While if 0 is an invalid address it cause a fault trigger a
crash.

In v5.0 this was incidentally fixed by commit 55897af630 ("dma-direct:
merge swiotlb_dma_ops into the dma_direct code"), as this moved the
dma-api to use the page pointer in the sg_list, and (for Ion buffers at
least) this will always be valid if the sg_list exists at all.

But, this issue is re-introduced in v5.3 with
commit 449fa54d68 ("dma-direct: correct the physical addr in
dma_direct_sync_sg_for_cpu/device") moves the dma-api back to the old
behaviour and picks the dma_address that may be invalid.

dma-buf core doesn't ensure that the buffer is mapped on the device, and
thus have a valid sg_list, before calling the exporter's
begin_cpu_access.

Bug: 155685387

Change-Id: Ie4da5a875957c831ce5b1345b5794357b844c84c
Signed-off-by: Orjan Eide <orjan.eide@arm.com>
Signed-off-by: Anders Pedersen <anders.pedersen@arm.corp-partner.google.com>
(cherry picked from commit 644ae915cd5df31179144c5b949539520a14f39a)
2020-06-09 20:16:59 +00:00
Hridya Valsaraju
82389f5710 ANDROID: GKI: Enable CONFIG_DEBUG_FS for Android S
This will allow userdebug/eng builds to access debugfs without
needing to build a separate debug kernel.

Test: build
Bug: 153634660
Change-Id: I0617afea02ceab0a8f2ca4da3abf9bb270682de9
Signed-off-by: Hridya Valsaraju <hridya@google.com>
(cherry picked from commit 4123e4a204947b5dc3fbb3234cd1ba8ad52b33d5)
2020-06-09 18:58:33 +00:00
Will Deacon
48c3dc5979 Merge commit '533b220f7be4' ("Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux") into android-mainline
arm64 baby steps along the way to 5.8-rc1.

Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I245a58d34012df3a7c5702bc05f6f4803e53856e
2020-06-09 14:25:19 +00:00