Commit Graph

1042083 Commits

Author SHA1 Message Date
Will Deacon
4d1eda771e FROMLIST: x86/uaccess: Fix 32-bit __get_user_asm_u64() when CC_HAS_ASM_GOTO_OUTPUT=y
Commit 865c50e1d2 ("x86/uaccess: utilize CONFIG_CC_HAS_ASM_GOTO_OUTPUT")
added an optimised version of __get_user_asm() for x86 using 'asm goto'.

Like the non-optimised code, the 32-bit implementation of 64-bit get_user()
expands to a pair of 32-bit accesses. Unlike the non-optimised code, the
_original_ pointer is incremented to copy the high word instead of loading
through a new pointer explicitly constructed to point at a 32-bit type.
Consequently, if the pointer points at a 64-bit type then we end up
loading the wrong data for the upper 32-bits.

This was observed as a mount() failure in Android targetting i686 after
b0cfcdd9b9 ("d_path: make 'prepend()' fill up the buffer exactly on
overflow") because the call to copy_from_kernel_nofault() from
prepend_copy() ends up in __get_kernel_nofault() and casts the source
pointer to a 'u64 __user *'. An attempt to mount at "/debug_ramdisk"
therefore ends up failing trying to mount "/debumdismdisk".

Use the existing '__gu_ptr' source pointer to unsigned int for 32-bit
__get_user_asm_u64() instead of the original pointer.

Fixes: 865c50e1d2 ("x86/uaccess: utilize CONFIG_CC_HAS_ASM_GOTO_OUTPUT")
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210913163547.5156-1-will@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I652ecff43caf258bd0aa31e52fdd58f9461b9e46
2021-09-13 18:50:39 +02:00
Greg Kroah-Hartman
6e6c6d4507 Merge eceae1e7ac ("Merge tag 'configfs-5.15' of git://git.infradead.org/users/hch/configfs") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I16f274bd00ea5b510bdcf8c7a5d694fe60bbdd4e
2021-09-13 10:54:52 +02:00
Greg Kroah-Hartman
2be075f945 Merge 111c1aa8ca ("Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by Greg Kroah-Hartman <gregkh@google.com>

Change-Id: I80c0ea5f3c83da0fcb6a0314791fe14b4862f538
2021-09-12 19:36:36 +02:00
Greg Kroah-Hartman
a874acdc18 Merge 815409a12c ("Merge tag 'ovl-update-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia61d00e6e4f49501323c3f4769793529c78d3713
2021-09-12 16:14:19 +02:00
Greg Kroah-Hartman
fc07a9608c Merge 89594c746b ("Merge tag 'fscache-next-20210829' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifba67ddfe0341a9bf658584856dca8d7509d9e8a
2021-09-12 14:27:26 +02:00
Ram Muthiah
18afae4adb Revert "Revert "ANDROID: GKI: temporarily disable LTO/CFI""
This reverts commit c30036e2ec.

Reason for revert: Causes boot failure on kernel_virt_aarch64

Bug: 199547335
Test: revert and boot of aarch64 GKI on arm64 cf
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I4fb34e19e85e661b28f40b2de53b063436838eab
2021-09-10 22:59:05 +00:00
Jone Chou
107e653168 ANDROID: kernel: fix module info for debug_kinfo
After commit f80fb3a3d5 ("arm64: add support for kernel ASLR")
The module range is determined by module_alloc_base and MODULES_VSIZE;

Fixes: f0c48487a5 ("ANDROID: kernel: add module info for debug_kinfo")
Bug: 191677481
Bug: 191767613
Bug: 199478594
Signed-off-by: Jone Chou <jonechou@google.com>
Change-Id: Id41d95cfba01e8e5502d058f98e30ecbaf52abe4
2021-09-11 01:46:56 +08:00
Todd Kjos
c30036e2ec Revert "ANDROID: GKI: temporarily disable LTO/CFI"
This reverts commit 0eecc2aa30.

Change-Id: I26cca7f19f9e904f47da48cddda4e7ef5aeb03f1
Signed-off-by: Todd Kjos <tkjos@google.com>
2021-09-09 18:14:12 +00:00
Suren Baghdasaryan
5b57fee1ac ANDROID: GKI: Enable CONFIG_MEMCG
Enable CONFIG_MEMCG config to provide a way to use memory cgroups with
GKI kernels. If not needed, memcgs can be disabled using
"group_disable=memory" kernel command-line option.

Bug: 191223209
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ife5cfe17576d92ac116dabd1a118bc0bb013b26f
2021-09-09 18:13:42 +00:00
Vijayanand Jitta
16ac3931c9 ANDROID: GKI: Enable CONFIG_HIST_TRIGGERS
Enable CONFIG_HIST_TRIGGERS which will be useful
in various perf evaluations.

Bug: 185890730
Change-Id: Ia4c140863ce248fea0dd235ca8a9cdee1176f8ed
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2021-09-09 18:13:23 +00:00
Mukesh Kumar Savaliya
48e9e09266 ANDROID: I3C: Enable I3C core framework
This change adds I3C core support, as we have need it for
I3C master driver development and support.

Bug: 187575084
Change-Id: Ida6ed02e3059a341f99d8e9bb3216ad3cc0c2b47
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2021-09-09 18:13:11 +00:00
Collin Fijalkovich
d3a8ce4023 ANDROID: GKI: add fields required to enable CONFIG_TRANSPARENT_HUGEPAGE
Devices with plenty of RAM may benefit from THP usage. Enable THP while
setting CONFIG_TRANSPARENT_HUGEPAGE_MADVISE require explicit opt-in for
the feature by default in sysfs.

Bug: 179484689
Bug: 179223738
Signed-off-by: Collin Fijalkovich <cfijalkovich@google.com>
Change-Id: If85765daba3817dac38e7bf29530acfaed1d50a3
2021-09-09 18:13:04 +00:00
Hemant Kumar
4372368d56 ANDROID: GKI: Enable CONFIG_PCIEAER for arm64 andx86_64
Allows PCIe device to enable Advanced Error Reporting.

Bug: 187530071
Change-Id: Id5a1bf6f8a2d791f686f44ef22c5d8ba5cde40c6
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2021-09-09 18:12:25 +00:00
Greg Kroah-Hartman
59437fa4ba Merge 90c90cda05 ("Merge tag 'xfs-5.15-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id0e9064c101f599601a6d864ce7ac2ed88083562
2021-09-09 14:02:28 +02:00
Greg Kroah-Hartman
3ca4e02658 Merge 4ac6d90867 ("Merge tag 'docs-5.15' of git://git.lwn.net/linux") into android-mainline
Steps on the way to 5.15-rc1

Fixes merge conflicts in:
	scripts/Makefile.lib

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I12b5165860a212fb39c98504a0729f1bab52ab54
2021-09-09 14:00:42 +02:00
Greg Kroah-Hartman
7606f2120e Merge 4cdc4cc2ad ("Merge tag 'asm-generic-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9b0191b564ca9f5249345d55a04a83961372abbe
2021-09-09 13:56:58 +02:00
Greg Kroah-Hartman
a3cf571865 Merge 57c78a234e ("Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux") into android-mainline
Steps on the way to 5.15-rc1.

Resolves merge conflicts in:
	arch/arm64/kernel/process.c

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3cfadd5edf7a45d45eca6a26fd62cb0f23697208
2021-09-09 13:56:28 +02:00
Greg Kroah-Hartman
3cb11a72db Merge bcfeebbff3 ("Merge branch 'exit-cleanups-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id09010ca0885fd124edbe9c12c885e0b62ce7e67
2021-09-09 13:54:45 +02:00
Greg Kroah-Hartman
685e7fee8d Merge 477f70cd2a ("Merge tag 'drm-next-2021-08-31-1' of git://anongit.freedesktop.org/drm/drm") into android-mainline
Steps on the way to 5.15-rc1

Resolves merge conflicts in:
	drivers/firmware/Makefile

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icdf4539d0985fd5a3430455c3a2b603b2b456a44
2021-09-09 13:53:33 +02:00
Greg Kroah-Hartman
ce9e960b12 Merge 835d31d319 ("Merge tag 'media/v5.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If6d4fd429292ea554534d7ae86147343207a2622
2021-09-09 13:47:07 +02:00
Greg Kroah-Hartman
0e87436ae9 Merge 07281a257a ("Merge tag 'usb-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb") into android-mainline
Steps on the way to 5.15-rc1

Resolves merge conflicts in:
	drivers/misc/Makefile

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I102636df13eb6320bb7ad739cbb4b82084fe078e
2021-09-09 13:45:17 +02:00
Greg Kroah-Hartman
ea2bf27237 Revert "ANDROID: printk: printk_deferred for modules"
This reverts commit 44043ee002.

printk_deferred() is about to become a #define, so having it be an
exported symbol will break the build.

Bug: 172264047
Fixes: 44043ee002 ("ANDROID: printk: printk_deferred for modules")
Cc: Sai Harshini Nimmala <snimmala@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I45d16f936646c4cecbfe541175e0d3929a736432
2021-09-09 09:45:49 +00:00
Eric Biggers
363f844cc2 ANDROID: dm-bow: handle STATUSTYPE_IMA
Fix the following compiler warning caused by STATUSTYPE_IMA being added
upstream:

    drivers/md/dm-bow.c: In function ‘dm_bow_status’:
    drivers/md/dm-bow.c:1239:2: warning: enumeration value ‘STATUSTYPE_IMA’ not handled in switch [-Wswitch]
     1239 |  switch (type) {
          |  ^~~~~~

Until IMA data is defined for this target (currently there is no need to
do so), the right thing to do is to just return an empty string.

This should be folded into ANDROID-dm-bow-Add-dm-bow-feature.patch.

Bug: 129280212
Fixes: bc2f6edebd ("Merge 9e9fb7655e ("Merge tag 'net-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") into android-mainline")
Change-Id: I8b0e7c9d67f20071cdad8e7cb6940a9e35623e31
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-09-09 09:44:59 +00:00
Eric Biggers
1b8a5df4b3 ANDROID: dm-default-key: handle STATUSTYPE_IMA
Fix the following compiler warning caused by STATUSTYPE_IMA being added
upstream:

    drivers/md/dm-default-key.c: In function ‘default_key_status’:
    drivers/md/dm-default-key.c:328:2: warning: enumeration value ‘STATUSTYPE_IMA’ not handled in switch [-Wswitch]
      328 |  switch (type) {
          |  ^~~~~~

Until IMA data is defined for this target (currently there is no need to
do so), the right thing to do is to just return an empty string.

This should be folded into
ANDROID-dm-add-dm-default-key-target-for-metadata-encryption.patch.

Bug: 160885805
Reported-by: John Stultz <john.stultz@linaro.org>
Fixes: bc2f6edebd ("Merge 9e9fb7655e ("Merge tag 'net-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") into android-mainline")
Change-Id: Ia38ee61a6864ff256bc22f98a4263292a6eca908
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-09-09 09:44:44 +00:00
Eric Biggers
8607779ccb ANDROID: block: initialize the bi_skip_dm_default_key field
Due to upstream commit da521626ac ("bio: optimize initialization of a
bio"), the bi_skip_dm_default_key field is no longer being initialized,
which breaks dm-default-key.  Make bio_init() initialize it.

This should be folded into
ANDROID-dm-add-dm-default-key-target-for-metadata-encryption.patch.

Bug: 160885805
Reported-by: John Stultz <john.stultz@linaro.org>
Fixes: dc39b05494 ("Merge 916d636e0a ("Merge tag 'vfs-5.15-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux") into android-mainline")
Change-Id: I79310f63e38497db7953c50b3e90013aa6679d31
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-09-09 09:44:21 +00:00
Lee Jones
e1fc7698ca ANDROID: docs: sysctl: vm: Fix merge error relating to extra_free_kbytes
This hunk should not have been retained.

This re-aligns with Mainline.

Fixes: 3cc02cd189 ("Revert "ANDROID: add extra free kbytes tunable"")
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I04ad519f03784fed1ad2f9ff3fa4fff2bc9ea5de
2021-09-08 09:52:45 +01:00
Lee Jones
ef5731f4ba ANDROID: sysctl: Remove left-over diff from recent 'kbytes tunable' revert
This re-aligns with Mainline.

Fixes: 3cc02cd189 ("Revert "ANDROID: add extra free kbytes tunable"")
Change-Id: Ia1a8e48415b42dae767ca7b1c59263863eb85cd3
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-09-08 09:52:19 +01:00
Lee Jones
90afe92128 ANDROID: gki_defconfig: Don't explicity enable CONFIG_SERIAL_SAMSUNG{_CONSOLE}
These are implicitly enabled via ARCH_EXYNOS, rendering them superfluous.

Bug: 142159113
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I9cda8c23e448e0dbe3770fadb14b12c3ce59e708
2021-09-08 05:53:22 +00:00
Lee Jones
65680ab92d ANDROID: tty: serial: samsung_tty: Re-apply the depends line back into SERIAL_SAMSUNG
Now that commit 2344019e04 ("ANDROID: arm64: gki_defconfig: Enable
ARCH_EXYNOS") has enabled the ARCH_EXYNOS symbol we can replace the
'depends on' line in SERIAL_SAMSUNG's Kconfig entry.

This brings the entry back inline with the upstream version.

Bug: 142159113
Change-Id: I7bbf9d94d77f6771d3594a46d3043c6f15a53685
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-09-08 05:52:30 +00:00
Nick Desaulniers
ca7dad50d4 ANDROID: disable BLK_DEV_NBD for allmodconfig
commit fad7cd3310 ("nbd: add the check to prevent overflow in __nbd_ioctl()")
exposed something that's long been broken for semi-hosted environments
like the kernel in Clang:

check_mul_overflow() is implemented in terms of
__builtin_mul_overflow(). For 64b operands on 32b hosts, LLVM was
emitting libcalls to __mulodi4() which assumes that compiler-rt is being
linked against. The kernel does not do so, so LLVM was emitting calls to
functions that have no definition, resulting in the linkage failure:

ERROR: modpost: "__mulodi4" [drivers/block/nbd.ko] undefined!

I have been fixing LLVM upstream, see the six fixes linked from:
https://bugs.llvm.org/show_bug.cgi?id=28629#c23.

I still need to detect older toolchains that we'd still like to support,
then find an appropriate workaround for the kernel.

Disable network block devices for now, so that we don't lose coverage of
32b ARM allmodconfig builds which are currently red in our CI.

Bug: 199191028
Link: https://github.com/ClangBuiltLinux/linux/issues/1438
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I79a597177f75370f60621b984cb8e21ca2a268d6
2021-09-08 05:51:18 +00:00
Steve Muckle
55415d7022 ANDROID: add TEST_MAPPING for net/, include/net
Run CtsNetTestCases in presubmit for changes in net/ and
include/net/.

Bug: 186664401
Change-Id: I3cf942bd0418ad55a6559d6933927b0da86da595
Signed-off-by: Steve Muckle <smuckle@google.com>
2021-09-07 21:09:03 +00:00
Greg Kroah-Hartman
b5c77f60c3 Merge c6c3c5704b ("Merge tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3fea319803399892ae75630f0ce9ddb643062d37
2021-09-07 16:40:59 +02:00
Greg Kroah-Hartman
2b044265a1 Merge ba1dc7f273 ("Merge tag 'char-misc-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic043c79dd57cd64ee963fcfb77dde2ff398052a5
2021-09-07 16:40:58 +02:00
Konrad Rzeszutek Wilk
6c78a36ce6 UPSTREAM: iscsi_ibft: Fix isa_bus_to_virt not working under ARM
The isa_bus_to_virt is only needed under X86 and in fact the code
that sets the ibft_phys_addr is only compiled under X86.

As such lets just ifdef the code.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Vijayendra Suman <vijayendra.suman@oracle.com>
CC: Maurizio Lombardi <mlombard@redhat.com>
CC: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Change-Id: I68b691cbd2f9f44fe8c876a303c5e4a2c38df82b
---
v2: Remove the ibft_phys_addr as it is defined in iscsi_ibft.h
(cherry picked from commit 799206c130)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2021-09-07 16:39:40 +02:00
Nathan Chancellor
472bc2ccab UPSTREAM: x86/setup: Explicitly include acpi.h
After commit 342f43af70 ("iscsi_ibft: fix crash due to KASLR physical
memory remapping") x86_64_defconfig shows the following errors:

  arch/x86/kernel/setup.c: In function ‘setup_arch’:
  arch/x86/kernel/setup.c:916:13: error: implicit declaration of function ‘acpi_mps_check’ [-Werror=implicit-function-declaration]
    916 |         if (acpi_mps_check()) {
        |             ^~~~~~~~~~~~~~
  arch/x86/kernel/setup.c:1110:9: error: implicit declaration of function ‘acpi_table_upgrade’ [-Werror=implicit-function-declaration]
   1110 |         acpi_table_upgrade();
        |         ^~~~~~~~~~~~~~~~~~
  [... more acpi noise ...]

acpi.h was being implicitly included from iscsi_ibft.h in this
configuration so the removal of that header means these functions have
no definition or declaration.

In most other configurations, <linux/acpi.h> continued to be included
through at least <linux/tboot.h> if CONFIG_INTEL_TXT was enabled, and
there were probably other implicit include paths too.

Add acpi.h explicitly so there is no more error, and so that we don't
continue to depend on these unreliable implicit include paths.

Tested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Cc: Maurizio Lombardi <mlombard@redhat.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit ea7b4244b3)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia142a20a3ffebc4e9579a0551b67b8d2f3457a92
2021-09-07 15:04:56 +02:00
Greg Kroah-Hartman
bc2f6edebd Merge 9e9fb7655e ("Merge tag 'net-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I49577d606b2710975407eae3fee60bc331397810
2021-09-07 14:40:30 +02:00
Lee Jones
2344019e04 ANDROID: arm64: gki_defconfig: Enable ARCH_EXYNOS
Just like the presently enabled ARCH_QCOM, ARCH_SUNXI and ARCH_HISI
symbols, ARCH_EXYNOS based platforms require drivers which currently
depend on the symbol being enabled.

A recent attempt to remove one of these dependencies was firmly NACKed
by a bunch of upstream Maintainers [0], with one of them stating that
ARCH_EXYNOS should be enabled by any generic kernel which planned on
supporting the associated platforms.

Once this has been applied, we can revert the associated hacks we're
currently carrying in android-mainline.

[0] https://lore.kernel.org/lkml/20200220102628.3371996-1-gregkh@linuxfoundation.org/

Bug: 142159113
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I1277f173c1a39c1cdd23bca27ee5f0deb784e3fb
2021-09-07 11:43:32 +01:00
Greg Kroah-Hartman
2cd4951e46 Merge 0ee7c3e25d ("Merge tag 'iomap-5.15-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux") into android-mainline
Steps on the way to 5.15-rc1

Resolves conflicts in:
	fs/iomap/direct-io.c

Cc: Eric Biggers <ebiggers@google.com>
Cc: Satya Tangirala <satyat@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4e366229a4dc6a150c840fc488feb0bc7cfe9716
2021-09-06 13:55:31 +02:00
Greg Kroah-Hartman
dc39b05494 Merge 916d636e0a ("Merge tag 'vfs-5.15-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux") into android-mainline
Steps on the way to 5.15-rc1.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I44aeb7207e79c266f8ffb79ae2d69c40463be0a8
2021-09-06 13:52:26 +02:00
Greg Kroah-Hartman
e446554f63 ANDROID: Incremental fs: fix up the build for 5.15-rc1
In commit edb0872f44 ("block: move the bdi from the request_queue to
the gendisk"), the backing device info moved .h files which breaks the
building of incfs.  Fix this up like was done for fat, just include the
correct .h file.

Fixes: edb0872f44 ("block: move the bdi from the request_queue to the gendisk")
CC: Paul Lawrence <paullawrence@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iccc990b1b01af4580192921410b915b91dc6a155
2021-09-06 13:50:51 +02:00
Greg Kroah-Hartman
d8cb93f7eb Merge c547d89a9a ("Merge tag 'for-5.15/io_uring-2021-08-30' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib9e751c8781657d1d96fe1ac8098b38023b50eeb
2021-09-06 13:36:06 +02:00
Greg Kroah-Hartman
bddc58eb1a Merge 7d6e3fa87e ("Merge tag 'irq-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ied673de2a14ba5a2feede8ebb741c3a3657e1db5
2021-09-06 13:34:16 +02:00
Greg Kroah-Hartman
883f370b3b Merge e5e726f7bb ("Merge tag 'locking-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I15ca29e0126c6b134a26bad932dbb3e6d779f860
2021-09-03 15:24:31 +02:00
Greg Kroah-Hartman
31c9ccb138 Revert "ANDROID: vendor_hooks: add waiting information for blocked tasks"
This reverts portions of commit 9ad8ff902e

The mutex code is rewritten in 5.15-rc1, so hooks like this are no
longer in the correct location, if even needed at all.  So remove them
for now, if vendors still need them, they can add them back in.

Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib85c108e5bb306faea4fef5e0ca3b617a7f8f5c6
2021-09-03 15:23:46 +02:00
Greg Kroah-Hartman
bf2290a48a Revert "ANDROID: vendor_hooks: set debugging data when rt_mutex is working"
This reverts commit e289faa9f1.

The mutex code is rewritten in 5.15-rc1, so hooks like this are no
longer in the correct location, if even needed at all.  So remove them
for now, if vendors still need them, they can add them back in.

Cc: JINHO LIM <jordan.lim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idceef90a86c8794008e2f013d6ff958142661572
2021-09-03 11:53:16 +02:00
Greg Kroah-Hartman
92c11ff14b Merge 4a2b88eb02 ("Merge tag 'perf-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline
Steps on the way to 5.15-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I027a9d89023892950e736e9c9f7c0c27c4cdc697
2021-09-03 11:46:45 +02:00
Linus Torvalds
eceae1e7ac Merge tag 'configfs-5.15' of git://git.infradead.org/users/hch/configfs
Pull configfs updates from Christoph Hellwig:

 - fix a race in configfs_lookup (Sishuai Gong)

 - minor cleanups (me)

* tag 'configfs-5.15' of git://git.infradead.org/users/hch/configfs:
  configfs: fix a race in configfs_lookup()
  configfs: fold configfs_attach_attr into configfs_lookup
  configfs: simplify the configfs_dirent_is_ready
  configfs: return -ENAMETOOLONG earlier in configfs_lookup
2021-09-02 10:27:17 -07:00
Linus Torvalds
265113f70f Merge tag 'dlm-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
Pull dlm updates from David Teigland:
 "This set includes a number of minor fixes and cleanups related to the
  networking changes in the last release.

  A patch to delay ack messages reduces network traffic significantly"

* tag 'dlm-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
  fs: dlm: avoid comms shutdown delay in release_lockspace
  fs: dlm: fix return -EINTR on recovery stopped
  fs: dlm: implement delayed ack handling
  fs: dlm: move receive loop into receive handler
  fs: dlm: fix multiple empty writequeue alloc
  fs: dlm: generic connect func
  fs: dlm: auto load sctp module
  fs: dlm: introduce generic listen
  fs: dlm: move to static proto ops
  fs: dlm: introduce con_next_wq helper
  fs: dlm: cleanup and remove _send_rcom
  fs: dlm: clear CF_APP_LIMITED on close
  fs: dlm: fix typo in tlv prefix
  fs: dlm: use READ_ONCE for config var
  fs: dlm: use sk->sk_socket instead of con->sock
2021-09-02 10:19:45 -07:00
Linus Torvalds
b0cfcdd9b9 d_path: make 'prepend()' fill up the buffer exactly on overflow
Instead of just marking the buffer as having overflowed, fill it up as
much as we can.  That will allow the overflow case to then return
whatever truncated result if it wants to.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-09-02 10:07:29 -07:00
Linus Torvalds
7661809d49 mm: don't allow oversized kvmalloc() calls
'kvmalloc()' is a convenience function for people who want to do a
kmalloc() but fall back on vmalloc() if there aren't enough physically
contiguous pages, or if the allocation is larger than what kmalloc()
supports.

However, let's make sure it doesn't get _too_ easy to do crazy things
with it.  In particular, don't allow big allocations that could be due
to integer overflow or underflow.  So make sure the allocation size fits
in an 'int', to protect against trivial integer conversion issues.

Acked-by: Willy Tarreau <w@1wt.eu>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-09-02 09:47:01 -07:00