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
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
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
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
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
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
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
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)
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 f67695c996https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
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
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
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
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>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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