In commit 7374fa33dc ("init/Kconfig: remove USELIB syscall by
default") CONFIG_USELIB is disabled, so remove the "is not set" setting
in the x86 gki_defconfig file to resolve the build issue.
Fixes: 7374fa33dc ("init/Kconfig: remove USELIB syscall by default")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If7565bffb90b2efd913f08a8aeccbb11cc77ac17
This reverts commit 090a1da697.
It brings it back now that we have merged around the problem area.
Bug: 200082547
Bug: 214445388
Cc: Ramji Jiyani <ramjiyani@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iaa69221f341bf2face454ec0452efff2cbba9042
This reverts commit 5ffc4c2275.
It conflicts in bad ways with the module code changes in 5.19-rc1 so
revert it for now. If it is still needed, it can be added back later.
Bug: 200082547
Bug: 214445388
Cc: Ramji Jiyani <ramjiyani@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibf0b85c355cfc3e1a45c213a131a12c9e3061349
This reverts commit befc75e758.
It conflicts in bad ways with the module code changes in 5.19-rc1 so
revert it for now. If it is still needed, it can be added back in
later.
Bug: 200082547
Bug: 214445388
Cc: Ramji Jiyani <ramjiyani@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ice884d241ae153a75facc1ca409ea5c59653cde3
This reverts commit 5ebe162306.
It causes lots of conflicts in the 5.19-rc1 merge due to the rewrite and
movement of the module core code. If this is still needed, it can be
added back later.
Bug: 181639260
Cc: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I742e7ef56c2dd7a9b6c9c296dc9f96bced84bc7c
Add new vendor hook when set affinity to detect task status
for performance tuning.
Bug: 236775946
Change-Id: I407637c85e2ea93585877312f090981fee848979
Signed-off-by: Jing-Ting Wu <Jing-Ting.Wu@mediatek.com>
When building android-mainline with a version of clang that supports
CONFIG_RANDSTRUCT, there are errors about casts from randomized
structures to non-randomized structures:
fs/incfs/data_mgmt.c:240:10: error: casting from randomized structure pointer type 'struct dentry *' to 'struct data_file *'
return (struct data_file *)index_file_dentry;
^
fs/incfs/data_mgmt.c:257:12: error: casting from randomized structure pointer type 'struct file *' to 'struct data_file *'
result = (struct data_file *)bf;
^
2 errors generated.
As suggested by Kees on aosp/1995750, these casts should actually be
using the ERR_CAST macro, which is a more proper way to pass error
pointers around.
Change-Id: Iab73ac7503235f1147154a01a22ab8608e3daf8b
Fixes: 3f4938108a ("ANDROID: Incremental fs: Create mapped file")
Link: https://github.com/ClangBuiltLinux/linux/issues/1652
Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Commit 8ff978b8b2 ("ipv4/raw: support binding to nonlocal addresses")
introduced a helper function to fold duplicated validity checks of bind
addresses into inet_addr_valid_or_nonlocal(). However, this caused an
unintended regression in ping_check_bind_addr(), which previously would
reject binding to multicast and broadcast addresses, but now these are
both incorrectly allowed as reported in [1].
This patch restores the original check. A simple reordering is done to
improve readability and make it evident that multicast and broadcast
addresses should not be allowed. Also, add an early exit for INADDR_ANY
which replaces lost behavior added by commit 0ce779a9f5 ("net: Avoid
unnecessary inet_addr_type() call when addr is INADDR_ANY").
Furthermore, this patch introduces regression selftests to catch these
specific cases.
[1] https://lore.kernel.org/netdev/CANP3RGdkAcDyAZoT1h8Gtuu0saq+eOrrTiWbxnOs+5zn+cpyKg@mail.gmail.com/
Fixes: 8ff978b8b2 ("ipv4/raw: support binding to nonlocal addresses")
Cc: Miaohe Lin <linmiaohe@huawei.com>
Reported-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Riccardo Paolo Bestetti <pbl@bestov.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b4a028c4d0)
Bug: 235430656
Test: atest vts_kernel_net_tests
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I8ac173422e2a1aec1f69d7bca8253b045c80371e
Fix the arm64 build error which was caused by commit ae07562909 ("mm:
change huge_ptep_clear_flush() to return the original pte") interacting
with commit fb396bb459 ("arm64/hugetlb: Drop TLB flush from
get_clear_flush()"):
arch/arm64/mm/hugetlbpage.c: In function ‘huge_ptep_clear_flush’:
arch/arm64/mm/hugetlbpage.c:515:9: error: implicit declaration of function ‘get_clear_flush’; did you mean ‘ptep_clear_flush’? [-Werror=implicit-function-declaration]
515 | return get_clear_flush(vma->vm_mm, addr, ptep, pgsize, ncontig);
| ^~~~~~~~~~~~~~~
| ptep_clear_flush
Due to the new get_clear_contig() has dropped TLB flush, we should add
an explicit TLB flush in huge_ptep_clear_flush() to keep original
semantics when changing to use new get_clear_contig().
Fixes: fb396bb459 ("arm64/hugetlb: Drop TLB flush from get_clear_flush()").
Fixes: ae07562909 ("mm: change huge_ptep_clear_flush() to return the original pte")
Reported-and-tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit e68b823ab0)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I31fbc8728fbd3b108343b71e29f281c6d408b7f9
Commit 006477f40d ("kconfig: move the "Executable file formats" menu
to fs/Kconfig.binfmt") moved the Kconfig order around a bit, which
messed with the checking of the gki_defconfig files by the build system.
Also the ZSMALLOC=m requirement went away with commit 6140ae41ef
("zram: fix Kconfig dependency warning") and it is still enabled.
Fix all of these up by reordering some of the config options.
Fixes: 006477f40d ("kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt")
Fixes: 6140ae41ef ("zram: fix Kconfig dependency warning")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibd807dae4cc50999838f4471f4f144e6cdb41db1
This reverts commit 4dc2a5a8f6.
A non-zero return value from pfkey_broadcast() does not necessarily mean
an error occurred as this function returns -ESRCH when no registered
listener received the message. In particular, a call with
BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
zero so that this commit in fact prevents processing any PF_KEY message.
One visible effect is that racoon daemon fails to find encryption
algorithms like aes and refuses to start.
Excluding -ESRCH return value would fix this but it's not obvious that
we really want to bail out here and most other callers of
pfkey_broadcast() also ignore the return value. Also, as pointed out by
Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
should use netlink instead so that we should only disturb the code for
really important fixes.
v2: add a comment explaining why is the return value ignored
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 9c90c9b3e5)
Bug: 235430656
Test: TreeHugger, fixes failures in Android net-test wrt. pf_key.
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I173e37a840be187cb471a97b450b9fa06842497d
Steps on the way to 5.19-rc1
Resolves merge conflict in:
fs/proc/base.c
mm/util.c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I55d6d0cadb4dbd0f978a1e7d14444068bd050a7c
5.19-rc1 has merge issues with CFI at the moment, so we need to disable
LTO and CFI to enable the merge to continue. This will be fixed up
later in the 5.19-rcX process.
Bug: 236688521
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibf79663f0e31b3d083c56d793522071f4c16480b
This adds <10 seconds for a LTO=thin build, while the original
build time is about ~250 seconds on a build machine with 48 2.60 GHz
processors and 64GB RAM.
Within the 10 seconds, ~3 seconds spent on building Image.gz,
~5 seconds for packing Image.gz as boot-gz.img and <1 second for
including the boot-gz.img into the boot-img.tar.gz.
Bug: 233352819
Test: LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
Signed-off-by: Bowgo Tsai <bowgotsai@google.com>
Change-Id: I283ef004d1233d2e175573b893379e0d68221353
This reverts commit 479488f5bf.
It was merged in a different way upstream in 5.19-rc1, so drop it now to
allow the merge to be clean.
Bug: 174214891
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I127ccf87a4cd8b0ace0dc83e69458ccc64eb66ac
Script doesn't honor the Kernel's quiet command
mechanism with KBuild; so need to remove info
only echo. Added set -x in case make V=1 for keeping
debugging handy for script in the future.
Bug: 234116152
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Iea881816b9bc8c47157a33da67d6cf5f8357a7be
(cherry picked from commit 08a1879c876258e1ad269ab3dc111ffc6750440a)
Running clang-tidy/clang-analyzer with MAKE_GOALS fails in a mixed
build environment because archive files pertaining to the vmlinux are
expected as input to make rule. This would cause a failure when
generating compile_commands.json file, so we need to indicate that we
are running a mixed build environment when running clang-tidy/
clang-analyzer.
Bug: 233781076
Change-Id: I67afee105eb52c245aab04172c5a397bd8593532
Signed-off-by: Shubhi Jain <quic_shubhij@quicinc.com>
This patch links report_zone in dm-default-key, Android-only feature, in
order to support zoned devices [1].
[1] https://zonedstorage.io/docs/linux/overview
Bug: 228969778
Bug: 160885805
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I05163d471c1a06e12ff58cf73276ad0adc6d4978
This patch enables zoned devices for Android.
Bug: 228969778
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I7cb14675b4991a80c61e799cade8666c78bb8031
This reverts the MODULE_SCMVERSION config addition as it causes lots of
merge problems with 5.19-rc1. It can be added back after 5.19-rc1 is
out if it is still needed.
Also, if it is still needed, perhaps it can be made a bit
less-intrusive to make it easier with future merges...
Bug: 180027765
Cc: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I42e4ccbc4d2291523fd8460d530528d0c19c3e70
When merging, the ufs_sysfs_add_nodes() function got merged incorrectly.
Pick the upstream version which fixes the build problems.
This moves the tracepoint out of the sysfs create function and puts it
where the call originated, as the hba structure is not known in the
sysfs create call.
Bug: 158050260
Cc: Jaegeuk Kim <jaegeuk@google.com>
Fixes: 0b0468f649 ("ANDROID: scsi: ufs: add a hook to add sysfs entries")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I875944bb95597f1df63f109684d053903b2282a0
In commit 1e0f66420b ("drm/display: Introduce a DRM display-helper
module") the generated module file names were changed. This patch
updates the BUILD.bazel db845c section to update it with the new
module names.
Additionally commit f5d0164492 ("drm/msm: select DRM_DP_AUX_BUS
for the AUX bus support") added a dependency on the drm_dp_aux_bus
module.
Fixes: 1a016dd7ce28 ("Merge 2518f226c6 ("Merge tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm") into android-mainline")
Reported-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5b0695c92e9627d3b5f3ac38b32ee7240a8a894b
During a reply, the target gets woken up and then the priority of the
replier is restored. The order is such to allow the target to process
the reply ASAP. Otherwise, we risk the sender getting scheduled out
before the wakeup happens. This strategy reduces transaction latency.
However, a subsequent transaction from the same target could be started
before the priority of the replier gets restored. At this point we save
the wrong priority and it gets reinstated at the end of the transaction.
This patch allows the incoming transaction to detect the race condition
and save the correct next priority. Additionally, the replier will abort
its pending priority restore which allows the new transaction to always
run at the desired priority.
Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I6fec41ae1a1342023f78212ab1f984e26f068221
Refactor binder priority functions to take in 'struct binder_thread *'
instead of just 'struct task_struct *'. This allows access to other
thread fields used in subsequent patches. In any case, the same task
reference is still available under thread->task.
There is no functional impact from this patch.
Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I67b599884580d957d776500e467827e5035c99f6
Avoid making unnecessary stack copies of struct binder_priority and pass
the argument by reference instead. Rename 'desired_prio' to 'desired' to
match the usage in other priority functions.
There is no functional impact from this patch.
Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I66ff5305296e7b9dba56ed265236f2af518f66e0
The setup of node_prio is always the same, so just fold this logic into
binder_transaction_priority() to avoid duplication. Let's pass the node
reference instead, which also gives access to node->inherit_rt.
There is no functional impact from this patch.
Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Ib390204556e69c4bc8492cd9cd873773f9cdce42
db845c is not a mixed build yet, so need to add GKI
modules to it's module_outs for kleaf builds to
resolve hard failures in kleaf build for module copy.
Bug: 230519159
Test: tools/bazel run //common:db845c_dist
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: If3ce64a2b5f6b2f019a393f4674de30ac7437069
(cherry picked from commit eb38c6d799525c89bc3b1817dc22c34fa2281e09)
Enable zram and zsmalloc (dependency for zram) as
unprotected modules for aarch64. These are already
being used as modules by the vendor currently; so
needs to be unprotected.
Bug: 230519159
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I7c617c1a24f6e083301cbed67d0d323388cbd622
(cherry picked from commit 0fe423433bb3fa0b5003409bbd59a972e6c235e2)
The default value of this option changed recently in
4f612ed3f7 ("kfence: default to dynamic branch instead of static keys
mode"). As there was no functional change here and no concern posed
about configurations relevant to Android, re-enable this option.
Bug: 234805737
Signed-off-by: Steve Muckle <smuckle@google.com>
Change-Id: I5b20a67225cd247fc54547083b3cbcde0135f1fb
This is a "weak" conversion which converts straight back to using pages
to keep the build working properly.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.
Fixes: 7e0a126519 ("mm,fs: Remove aops->readpage")
CC: Paul Lawrence <paullawrence@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id34db2c71743731d6a69b7b566a1f3a0a12dffe1