This reverts commit 62e32cf8f3 as it
causes merge issues with the readahead rework that happened in 5.18-rc1
and would be incorrect.
If it is still needed, it can be added back at a later time.
Bug: 158645321
Cc: Chris Goldsworthy <cgoldswo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I886f8a528cfed1d4c9a93468a9d2a4384fdecfe0
Steps on the way to 5.18-rc1
Resolves conflicts in:
drivers/clk/clk.c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If598f86de1255b718285149b3128cefc693606e1
It was not used, and was removed in commit f8669f1d6a ("nvdimm/blk:
Delete the block-aperture window driver") so remove it from the
gki_defconfig files so the build works properly.
Fixes: f8669f1d6a ("nvdimm/blk: Delete the block-aperture window driver")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifedc35a228240bd042000cf1808b084fdb0a6c4b
Steps on the way to 5.18-rc1
Resolves merge conflicts with:
drivers/tty/serial/Kconfig
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I91e137138d20c5807c0b4ec50a5f29070aeda5c1
In preparation to limit the scope of a list iterator to the list
traversal loop, use a dedicated pointer to point to the found element
[1].
Before, the code implicitly used the head when no element was found
when using &pos->list. Since the new variable is only set if an
element was found, the head needs to be used explicitly if the
variable is NULL.
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifaf19dd876a513a1952fac448079d664aebdf604
This reverts commit 721412ed3d.
Android just isn't ready yet to give it up :(
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie0a443d55e6e72df97c3d3eabb7358ae3a12548a
drivers/staging/android is going away, and systems seem to be relying on
this driver now, so move it into drivers/android/ to make everything
self-contained and prevent merge issues later on.
Bug: 170851792
Bug: 169101608
Cc: Jone Chou <jonechou@google.com>
Cc: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib969a7544ea74881da61d7cba1f529a269921049
Steps on the way to 5.18-rc1
Resolves conflicts in:
drivers/misc/Makefile
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0655b24154747e5a25b245e1fbc79ab7924ac956
Steps on the way to 5.18-rc1
Resolves merge conflicts with:
drivers/power/supply/power_supply_sysfs.c
include/linux/power_supply.h
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I14c826ab364818e5b7368c054ce4433a791ad7da
Commit 1d38fe6ee6 ("PCI/VGA: Move vgaarb to drivers/pci")caused the
CONFIG_VGA_ARB configuration option to move places, which broke the
build. Move it to the correct location so that TreeHugger tests knows
that all is still good.
Fixes: 1d38fe6ee6 ("PCI/VGA: Move vgaarb to drivers/pci")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I91be80867c80b67f5b428ab8c843e9618a54fbfb
Steps on the way to 5.18-rc1
Resolves conflicts in:
Makefile
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ife7abfd4c100789add6803a80b29eb66663c1e0b
As of commit 73bd66d9c8 ("scsi: block: Remove REQ_OP_WRITE_SAME
support"), REQ_OP_WRITE_SAME is no longer present, so remove it from the
dm-user driver to fix the build as it is no longer needed.
Fixes: 73bd66d9c8 ("scsi: block: Remove REQ_OP_WRITE_SAME support")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6cdcea507c55d23ef090f8b96e0e90c5c1f0e09f
Steps on the way to 5.18-rc1
Resolves merge conflicts in:
include/linux/dma-buf.h
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iac98a19746b56875a98835afe2c46c6646763399
As of commit f9b3cd2457 ("Kconfig.debug: make DEBUG_INFO selectable
from a choice"), CONFIG_DEBUG_INFO is selected if any of the other
DEBUG_INFO options is selected, so there is no need to have it
explicitly called out in the gki_defconfig files (as savedefconfig will
not contain it.)
So remove it from the files, which fixes the build issues due to this
change.
Fixes: f9b3cd2457 ("Kconfig.debug: make DEBUG_INFO selectable from a choice")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I663080c06c00c340f8b2ca544208f612b6aaad67
This reverts commit 3877717bd7.
Nathan points out this was resolved upstream by:
commit 25d2e41cf5 ("pinctrl: thunderbay: rework loops looking for groups names")
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Change-Id: I1df1c8c25fc831cd5e67668d724ad7a7054100dc
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
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