Commit Graph

1085469 Commits

Author SHA1 Message Date
Tadeusz Struk
2980d2fa16 ANDROID: selftests: incfs: Add stacked_mount_test
Bug: 211066171

Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Change-Id: Ie09d6c1b04e0da7787d371c1cec5c04783b576a7
2022-04-06 20:11:12 +00:00
Tadeusz Struk
6c0d3d986c ANDROID: selftests: incfs: Add umount helper function
Bug: 211066171

Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Change-Id: I3c8eebbce3079292fc85dad8984efe6382f22cac
2022-04-06 20:11:07 +00:00
Tadeusz Struk
2190ec1394 ANDROID: selftests: incfs: skip large_file_test test is not enough free space
Make the large_file_test check if there is at least 3GB of free disk
space and skip the test if there is not. This is to make the tests pass
on a VM with limited disk size, now all functional tests are passing.

TAP version 13
1..26
ok 1 basic_file_ops_test
ok 2 cant_touch_index_test
ok 3 dynamic_files_and_data_test
ok 4 concurrent_reads_and_writes_test
ok 5 attribute_test
ok 6 work_after_remount_test
ok 7 child_procs_waiting_for_data_test
ok 8 multiple_providers_test
ok 9 hash_tree_test
ok 10 read_log_test
ok 11 get_blocks_test
ok 12 get_hash_blocks_test
ok 13 large_file_test
ok 14 mapped_file_test
ok 15 compatibility_test
ok 16 data_block_count_test
ok 17 hash_block_count_test
ok 18 per_uid_read_timeouts_test
ok 19 inotify_test
ok 20 verity_test
ok 21 enable_verity_test
ok 22 mmap_test
ok 23 truncate_test
ok 24 stat_test
ok 25 sysfs_test
Error mounting fs.: File exists
Error mounting fs.: File exists
ok 26 sysfs_rename_test

Bug: 211066171

Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Change-Id: I2260e2b314429251070d0163c70173f237f86476
2022-04-06 20:11:02 +00:00
Tadeusz Struk
46c0f72ed8 ANDROID: selftests: incfs: Add -fno-omit-frame-pointer
Without it incfs/incfs_perf runtime fails in format_signature:

malloc(): invalid size (unsorted)
Aborted

When compiled with gcc version 11.2.0.

Also add check for NULL after the malloc, and remove unneeded
space for uint32_t in signing_section.

Bug: 211066171

Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Change-Id: I62b775140e4b89f75335cbd65665cf6a3e0fe964
2022-04-06 20:10:56 +00:00
Tadeusz Struk
05e060a157 ANDROID: incremental-fs: limit mount stack depth
Syzbot recently found a number of issues related to incremental-fs
(see bug numbers below). All have to do with the fact that incr-fs
allows mounts of the same source and target multiple times.
This is a design decision and the user space component "Data Loader"
expects this to work for app re-install use case.
The mounting depth needs to be controlled, however, and only allowed
to be two levels deep. In case of more than two mount attempts the
driver needs to return an error.
In case of the issues listed below the common pattern is that the
reproducer calls:

mount("./file0", "./file0", "incremental-fs", 0, NULL)

many times and then invokes a file operation like chmod, setxattr,
or open on the ./file0. This causes a recursive call for all the
mounted instances, which eventually causes a stack overflow and
a kernel crash:

BUG: stack guard page was hit at ffffc90000c0fff8
kernel stack overflow (double-fault): 0000 [#1] PREEMPT SMP KASAN

This change also cleans up the mount error path to properly clean
allocated resources and call deactivate_locked_super(), which
causes the incfs_kill_sb() to be called, where the sb is freed.

Bug: 211066171
Bug: 213140206
Bug: 213215835
Bug: 211914587
Bug: 211213635
Bug: 213137376
Bug: 211161296

Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Change-Id: I08d9b545a2715423296bf4beb67bdbbed78d1be1
2022-04-06 20:10:49 +00:00
Greg Kroah-Hartman
ec013e8e3d Merge 169e77764a ("Merge tag 'net-next-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie66ee2ad1facc13146b747aeb08ca65dcb5a6636
2022-04-06 08:15:17 +02:00
Nick Desaulniers
2b8366b4a1 Partial Revert "ANDROID: Kconfig: break UAPI_HEADER_TEST dependency on CC_CAN_LINK"
This partially reverts commit e260bb27a6.

We're going to pull in the NDK for a sysroot instead. Keep the GKI
config changes.

Bug: 190019968
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ib8b02312ca9dcd3d51643643d0c3d75b19ddb5bc
2022-04-05 14:09:04 -07:00
Nick Desaulniers
766ce14553 ANDROID: build.config: set NDK_TRIPLE
In order to support CONFIG_UAPI_HEADER_TEST=y with a bionic sysroot
using prebuilt bionic from the NDK, we need to set a different target
triple for USERCFLAGS than what's used when cross compiling the kernel
(so that the correct headers and libc.{a|so} are found+used).

Bug: 190019968
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ib3e60c41b862cda9f79ff8d2c812aaa8bfb571af
2022-04-05 14:09:03 -07:00
Nick Desaulniers
7133ff2a3e ANDROID: disable SAMPLES and BPFILTER for allmodconfigs
These aren't portable yet when building with a Bionic based sysroot.

Disable building them for now so that we can land support for
UAPI_HEADER_TEST.

Bug: 190019968
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ice3d3c55bbf79dd08265f168e49e2058231c181d
2022-04-05 14:09:03 -07:00
Nick Desaulniers
8f6837791e FROMLIST: net, uapi: remove inclusion of arpa/inet.h
In include/uapi/linux/tipc_config.h, there's a comment that it includes
arpa/inet.h for ntohs; but ntohs is not defined in any UAPI header. For
now, reuse the definitions from include/linux/byteorder/generic.h, since
the various conversion functions do exist in UAPI headers:
include/uapi/linux/byteorder/big_endian.h
include/uapi/linux/byteorder/little_endian.h

We would like to get to the point where we can build UAPI header tests
with -nostdinc, meaning that kernel UAPI headers should not have a
circular dependency on libc headers.

Link: https://android-review.googlesource.com/c/platform/bionic/+/2048127
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/netdev/20220404175448.46200-1-ndesaulniers@google.com/
Bug: 190019968
Change-Id: I5c45248fb88f03024da809b503ff3b9cd4ed66a9
2022-04-05 14:09:03 -07:00
Masahiro Yamada
cb9bff867f FROMGIT: kbuild: add --target to correctly cross-compile UAPI headers with Clang
When you compile-test UAPI headers (CONFIG_UAPI_HEADER_TEST=y) with
Clang, they are currently compiled for the host target (likely x86_64)
regardless of the given ARCH=.

In fact, some exported headers include libc headers. For example,
include/uapi/linux/agpgart.h includes <stdlib.h> after being exported.
The header search paths should match to the target we are compiling
them for.

Pick up the --target triple from KBUILD_CFLAGS in the same ways as
commit 7f58b487e9 ("kbuild: make Clang build userprogs for target
architecture").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Bug: 190019968
Change-Id: I9f4867b4fc1d0c4cf1af2bb3d6f53c3a8a8f4437
(cherry picked from commit f442ec0815ed57fcc633fe763815ca3c27e4cd0e
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
2022-04-05 14:09:03 -07:00
Elliot Berman
35cc0b25b3 FROMGIT: kbuild: Add environment variables for userprogs flags
Allow additional arguments be passed to userprogs compilation.
Reproducible clang builds need to provide a sysroot and gcc path to
ensure the same toolchain is used across hosts. KCFLAGS is not currently
used for any user programs compilation, so add new USERCFLAGS and
USERLDFLAGS which serves similar purpose as HOSTCFLAGS/HOSTLDFLAGS.

Clang might detect GCC installation on hosts which have it installed
to a default location in /. With addition of these environment
variables, you can specify flags such as:

$ make USERCFLAGS=--sysroot=/path/to/sysroot

This can also be used to specify different sysroots such as musl or
bionic which may be installed on the host in paths that the compiler
may not search by default.

Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Fangrui Song <maskray@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Change-Id: If4220e236b1c45b486d5a9701258c9b4cd21574b
(cherry picked from commit f67695c996
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
2022-04-05 14:09:03 -07:00
Greg Kroah-Hartman
7301998164 Merge 7403e6d826 ("Merge tag 'vfio-v5.18-rc1' of https://github.com/awilliam/linux-vfio") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id5ac7bb1fef94fbaf66255017a564c64071f49a3
2022-04-05 14:27:38 +02:00
Nathan Chancellor
cedf52d103 UPSTREAM: KVM: x86: Fix clang -Wimplicit-fallthrough in do_host_cpuid()
Clang warns:

  arch/x86/kvm/cpuid.c:739:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
          default:
          ^
  arch/x86/kvm/cpuid.c:739:2: note: insert 'break;' to avoid fall-through
          default:
          ^
          break;
  1 error generated.

Clang is a little more pedantic than GCC, which does not warn when
falling through to a case that is just break or return. Clang's version
is more in line with the kernel's own stance in deprecated.rst, which
states that all switch/case blocks must end in either break,
fallthrough, continue, goto, or return. Add the missing break to silence
the warning.

Fixes: f144c49e8c ("KVM: x86: synthesize CPUID leaf 0x80000021h if useful")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Message-Id: <20220322152906.112164-1-nathan@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 07ea4ab1f9)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If7a53c8c958b6cd3390822d1bb3af85d0ccba8ee
2022-04-05 11:15:46 +02:00
Greg Kroah-Hartman
ccb91c5fb3 Merge 1ebdbeb03e ("Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie5f07fd9de81edbcd490c0d3544096b0be12a6e0
2022-04-05 11:15:22 +02:00
Greg Kroah-Hartman
635e0c0d37 Merge efee6c7929 ("Merge tag 'tomoyo-pr-20220322' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifd87c188fb6679513143ff7977e3ccc2d8e0f5e0
2022-04-05 11:14:37 +02:00
Greg Kroah-Hartman
faab30bdcc Merge ed4643521e ("Merge tag 'arm-dt-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I13d27b9fb4b19af2c713623e0bbcfd0b114647cd
2022-04-05 08:12:56 +02:00
Greg Kroah-Hartman
55d4df9d29 Merge e6aef3496a ("Merge tag 'm68knommu-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie86429baa4458303f9a41b8a543ccbca28f9c569
2022-04-05 08:07:00 +02:00
Greg Kroah-Hartman
d0dc96c6e9 ANDROID: gki defconfig movements
The media tree merge for 5.18-rc1 moved some Kconfig options around so
update the gki_defconfig files to fix up the build due to this
housekeeping change.

No config options are changed.

Fixes: 182966e1cd ("Merge tag 'media/v5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie7c1c4799507604e0352eabe7b3c300222ce4f41
2022-04-04 16:43:29 +02:00
Greg Kroah-Hartman
ee3ad33bfa Merge 182966e1cd ("Merge tag 'media/v5.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib9bfd0cfa66628f64dea9aaf1883dc9b5602ada7
2022-04-04 16:40:22 +02:00
Greg Kroah-Hartman
1c188c2c5e Merge 9c4b86ebf5 ("Merge tag 'for-5.18/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I791f482065934a181cfeaaa12c1e3795d3e35e2a
2022-04-04 16:39:33 +02:00
Greg Kroah-Hartman
0bbb71be27 Merge 5bebe2c9ae ("Merge tag 'mmc-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2875a49300a6e99c263a8cec36ac4a98c98af8aa
2022-04-04 16:38:22 +02:00
Greg Kroah-Hartman
2a9a204359 Revert "ANDROID: GKI: amlogic: add DTB overlays"
This causes merge issues with 5.18-rc1.  It can be added back after
5.18-rc1 is out, but it really should be submitted upstream, especially
for something as "trivial" as dts files.

Bug: 179406580
Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I55354a8dbdc95ebe38b9d7140f5b5721ba6fff75
2022-04-04 16:37:31 +02:00
Pradeep P V K
c6ca13e9aa FROMLIST: fuse: give wakeup hints to the scheduler
The synchronous wakeup interface is available only for the
interruptible wakeup. Add it for normal wakeup and use this
synchronous wakeup interface to wakeup the userspace daemon.
Scheduler can make use of this hint to find a better CPU for
the waker task.

With this change the performance numbers for compress, decompress
and copy use-cases on /sdcard path has improved by ~30%.

Use-case details:
1. copy 10000 files of each 4k size into /sdcard path
2. use any File explorer application that has compress/decompress
support
3. start compress/decompress and capture the time.

-------------------------------------------------
| Default   | wakeup support | Improvement/Diff |
-------------------------------------------------
| 13.8 sec  | 9.9 sec        | 3.9 sec (28.26%) |
-------------------------------------------------

Co-developed-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Signed-off-by: Pradeep P V K <quic_pragalla@quicinc.com>

Bug: 216261533
Link: https://lore.kernel.org/lkml/1638780405-38026-1-git-send-email-quic_pragalla@quicinc.com/
Change-Id: I9ac89064e34b1e0605064bf4d2d3a310679cb605
Signed-off-by: Pradeep P V K <quic_pragalla@quicinc.com>
Signed-off-by: Alessio Balsini <balsini@google.com>
2022-04-04 10:19:47 +00:00
Greg Kroah-Hartman
b2c024c2ba Merge c5c009e250 ("Merge tag 'slab-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I69954395df00a8ee8247c9edef82d9de5e9c8129
2022-04-03 12:28:57 +02:00
Greg Kroah-Hartman
1b523b5b76 Merge 6b1f86f8e9 ("Merge tag 'folio-5.18b' of git://git.infradead.org/users/willy/pagecache") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iadf17dfff68bf14174fcb9ede28e1f9b48804281
2022-04-03 12:27:40 +02:00
Greg Kroah-Hartman
6cca93f29c Merge 9030fb0bb9 ("Merge tag 'folio-5.18c' of git://git.infradead.org/users/willy/pagecache") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6bc8f04bf96772421bebc79fa4dd704102cc7575
2022-04-03 12:27:20 +02:00
Greg Kroah-Hartman
951c4cf25f Merge 3bf03b9a08 ("Merge branch 'akpm' (patches from Andrew)") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic4dffa9c9a9609189772310e3e26cce39778d41b
2022-04-03 12:26:33 +02:00
Greg Kroah-Hartman
12283eb030 Merge 3fe2f7446f ("Merge tag 'sched-core-2022-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline
Steps on the way to 5.18-rc1

Resolves merge conflicts in:
	kernel/sched/core.c
	kernel/sched/cputime.c
	kernel/sched/sched.h

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5a1cc7ebbaf5f2fda5adf50a0bc7df9783633160
2022-04-02 16:38:28 +02:00
Greg Kroah-Hartman
f4b102e1e4 Revert "ANDROID: sched: Add vendor hooks for override sugov behavior"
This reverts commit 06881e01b5.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 171598214
Cc: Wei Wang <wvw@google.com>
Cc: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2139c63ef76875dabccb295d0fce8d396ac61785
2022-04-02 10:47:16 +02:00
Greg Kroah-Hartman
592bea2ef0 Revert "ANDROID: sched: Add vendor hooks for skipping sugov update"
This reverts commit 846bf8e8cb.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 170511085
Cc: Wei Wang <wvw@google.com>
Cc: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9375ff49ce856d39e56e44e5e02819ced87341c8
2022-04-02 10:47:16 +02:00
Greg Kroah-Hartman
dafc604d0d Revert "Revert "Revert "ANDROID: Sched: Add restricted vendor hooks for scheduler"""
This reverts commit ca60d78542.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 200103201
Cc: Ashay Jaiswal <quic_ashayj@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I08e5d2f87ab47024344e229b28d08baaa8ffae09
2022-04-02 10:47:16 +02:00
Greg Kroah-Hartman
d541cfda48 ANDROID: kernel/sched/android.h: add uclamp_* stub functions
Add stubs for uclamp_boosted() and uclamp_latency_sensitive() to keep
out-of-tree scheduler trees building and working properly.

Fixes: a54c38f4d3 ("Revert "ANDROID: sched: Introduce uclamp latency and boost wrapper"")
Cc: Quentin Perret <qperret@google.com>
Cc: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If1cb6d7964e3a724f3b549bc972df7a2d57d9875
2022-04-02 10:47:16 +02:00
Greg Kroah-Hartman
a54c38f4d3 Revert "ANDROID: sched: Introduce uclamp latency and boost wrapper"
This reverts commit 0e00b6f9dd.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 120440300
Cc: Patrick Bellasi <patrick.bellasi@arm.com>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3d04e4aac5bfb1a7e96623af58ed26352640f433
2022-04-01 17:03:49 +02:00
Greg Kroah-Hartman
8c65a1a56b Revert "ANDROID: sched/fair: Bias EAS placement for latency"
This reverts commit 760b82c9b8.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 120440300
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6e1cbec842188fe19a5eb27bf12c779fae3a1e8f
2022-04-01 17:03:49 +02:00
Greg Kroah-Hartman
84915fd80a ANDROID: add kernel/sched/android.h
Create a place for the android-specific scheduler addons to live so that
merges can happen easier and we have a better view of the technical debt
that is being drug along with the kernel updates.

Start it off with replacing an empty copy of task_may_not_preempt() to
solve the build problem for some devices where they are relying on this
function to be present in the system.

Fixes: 65c99af98b ("Revert "ANDROID: sched: avoid placing RT threads on cores handling softirqs"")
Cc: Quentin Perret <qperret@google.com>
Cc: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4fd94fab3397b3a197b79b2ae27e9490b54cad59
2022-04-01 17:03:43 +02:00
Greg Kroah-Hartman
65c99af98b Revert "ANDROID: sched: avoid placing RT threads on cores handling softirqs"
This reverts commit 3adfd8e344.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 31501544
Bug: 168521633
Cc: John Dias <joaodias@google.com>
Cc: J. Avila <elavila@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I03d90db2c9169975740a1f0d3193e44f27006c31
2022-04-01 17:03:17 +02:00
Greg Kroah-Hartman
66330b896c Revert "ANDROID: vendor_hooks: add waiting information for blocked tasks"
This reverts commit 9ad8ff902e.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 162776704
Cc: Sangmoon Kim <sangmoon.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2b2a575b0d4e751bd4bbe969bdfc77c01bb8dac5
2022-04-01 14:26:26 +02:00
Greg Kroah-Hartman
69209b7f82 Revert "ANDROID: schedutil: add vendor hook for adjusting util to freq calculation"
This reverts commit a2d89d4f3a.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 177845439
Cc: Yun Hsiang <yun.hsiang@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icce02530eda2e31af9faa9346717b12ca45152ad
2022-04-01 07:29:52 +02:00
Greg Kroah-Hartman
7c4dc7a76e Revert "ANDROID: Add a vendor hook that allow a module to modify the wake flag"
This reverts commit 0d0f0c5020.  It causes
merge issues with 5.18-rc1 and has to be reverted for now.  If it is
still needed, it can be added back after 5.18-rc1.

Bug: 181743516
Cc: Namkyu Kim <namkyu78.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib8e29d5d723457e18609bcbe6894e761bc21908c
2022-04-01 07:29:52 +02:00
Saravana Kannan
317f0cc6bf ANDROID: vendor_hooks: Reduce pointless modversions CRC churn
When vendor hooks are added to a file that previously didn't have any
vendor hooks, we end up indirectly including linux/tracepoint.h.  This
causes some data types that used to be opaque (forward declared) to the
code to become visible to the code.

Modversions correctly catches this change in visibility, but we don't
really care about the data types made visible when linux/tracepoint.h is
included. So, hide this from modversions in the central vendor_hooks.h file
instead of having to fix this on a case by case basis.

This change itself will cause a one time CRC breakage/churn because it's
fixing the existing vendor hook headers, but should reduce unnecessary CRC
churns in the future.

To avoid future pointless CRC churn, vendor hook header files that include
vendor_hooks.h should not include linux/tracepoint.h directly.

Bug: 227513263
Bug: 226140073
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: Ia88e6af11dd94fe475c464eb30a6e5e1e24c938b
2022-03-31 19:07:59 +00:00
Greg Kroah-Hartman
f62f75ba16 Revert "ANDROID: sched: Add vendor hook to select ilb cpu"
This reverts commit 178eea2694.

It causes merge issues with 5.18-rc1 so revert it for now.  If it is
still needed, it can be forward ported after 5.18-rc1 is merged.

Bug: 190228983
Cc: Choonghoon Park <choong.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iaa5cff0ebc6db74f09f7d81d153fa66fe3ac7a63
2022-03-31 07:37:03 +02:00
Nathan Chancellor
151af0832a UPSTREAM: mm/page_alloc: mark pagesets as __maybe_unused
Commit 9983a9d577 ("locking/local_lock: Make the empty local_lock_*()
function a macro.") in the -tip tree converted the local_lock_*()
functions into macros, which causes a warning with clang with
CONFIG_PREEMPT_RT=n + CONFIG_DEBUG_LOCK_ALLOC=n:

  mm/page_alloc.c:131:40: error: variable 'pagesets' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
  static DEFINE_PER_CPU(struct pagesets, pagesets) = {
                                         ^
  1 error generated.

Prior to that change, clang was not able to tell that pagesets was
unused in this configuration because it does not perform cross function
analysis in the frontend.  After that change, it sees that the macros
just do a typecheck on the lock member of pagesets, which is evaluated
at compile time (so the variable is technically "used"), meaning the
variable is not needed in the final assembly, as the warning states.

Mark the variable as __maybe_unused to make it clear to clang that this
is expected in this configuration so there is no more warning.

Link: https://github.com/ClangBuiltLinux/linux/issues/1593
Link: https://lkml.kernel.org/r/20220215184322.440969-1-nathan@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit a4812d47de)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I23cb1a39a78a5ed58b5a74bf5d37a780d3c534c8
2022-03-31 07:30:41 +02:00
Greg Kroah-Hartman
ffb4b41965 Merge ebd326ce72 ("Merge tag 'locking-core-2022-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I226a6ed299a2c600b0652b2a9efc9ae2f4caf7d9
2022-03-30 14:19:38 +02:00
Greg Kroah-Hartman
bc3c078603 Merge 881b568756 ("Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt") into android-mainline
Steps on the way to 5.18-rc1

Resolves conflicts in:
	fs/crypto/inline_crypt.c
	fs/ext4/inode.c

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9e21246dffb9d7cc6a713fe9820ec93bdabe0f6b
2022-03-30 14:06:56 +02:00
Greg Kroah-Hartman
2c7316efff Merge b47d5a4f6b ("Merge tag 'audit-pr-20220321' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3e6d7b82bbb3878c847b4fa7a2b6a239e9f3a88b
2022-03-30 13:59:07 +02:00
Greg Kroah-Hartman
2ad8aa9b5d Merge c269497d24 ("Merge tag 'selinux-pr-20220321' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux") into android-mainline
Steps on the way to 5.18-rc1

Resolves conflicts in:
	security/selinux/include/security.h

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I066eec71a2ab40081f573a83dcce9bb2c53a39d3
2022-03-30 13:56:28 +02:00
Greg Kroah-Hartman
01c2c6acb7 Merge 7f313ff0ac ("Merge tag 'integrity-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I311e5ecde01f3fb59e88adcf3e1248f546c99818
2022-03-30 13:54:36 +02:00
Greg Kroah-Hartman
3cc26086f7 Merge 2142b7f0c6 ("Merge tag 'hardening-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7158013056470bd29874fb42fc448a98e353971c
2022-03-30 13:53:14 +02:00
Greg Kroah-Hartman
03de68c593 Merge ad9c6ee642 ("Merge tag 'spi-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi") into android-mainline
Steps on the way to 5.18-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If3f2c3127b0fd3182963c0ba2fe691270beeca4c
2022-03-30 08:11:46 +02:00