The device tree compiler specified by $(DTC) is actually used as a
prerequisite for the following .dtb makefile rule:
$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
Ensure that it's set to an absolute path so that make can actually find
it. Otherwise, make will not instantiate that rule, because it can't
find dtc.
Bug: 198176779
Fixes: 023411cbe9 ("ANDROID: Use DTC from the hermetic toolchain")
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Change-Id: I4e190192b39c4cf18c6412cc85895ed1ce2ec6dd
Found an Apple Ethernet USB dongle which only works on older
Pixels, but not on newer ones.
Test: TreeHugger
Bug: 200269356
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id366434cc0a41f5e7e8f336dbdb854c7c117b35d
The page used to contain the fuse_dentry_canonical_path to be handled in
fuse_dev_do_write is allocated using __get_free_pages(GFP_KERNEL).
The returned page may contain undefined data, that by chance may be
considered as a valid path name that is not in the cache. In that case,
if the FUSE daemon mistakenly doesn't fill the canonical path buffer,
the FUSE driver may fall into two blocking
request_wait_answer(fuse_dev_write->kern_path->fuse_lookup_name)
causing a deadlock condition.
The stack is as follows:
find S 0 20511 20117 0x00000000
Call trace:
[<ffffff8008085e78>] __switch_to+0xb8/0xd4
[<ffffff8008a0cac4>] __schedule+0x458/0x714
[<ffffff8008a0ce0c>] schedule+0x8c/0xa8
[<ffffff800833865c>] request_wait_answer+0x74/0x220
[<ffffff8008339f70>] __fuse_request_send+0x8c/0xa0
[<ffffff8008339fe4>] fuse_request_send+0x60/0x6c
[<ffffff800833c1a8>] fuse_dentry_canonical_path+0xb8/0x104
[<ffffff800820b14c>] do_sys_open+0x1b4/0x260
[<ffffff800820b27c>] SyS_openat+0x3c/0x4c
[<ffffff8008083540>] el0_svc_naked+0x34/0x38
mount.ntfs-3g S 0 5845 1 0x00000000
Call trace:
[<ffffff8008085e78>] __switch_to+0xb8/0xd4
[<ffffff8008a0cac4>] __schedule+0x458/0x714
[<ffffff8008a0ce0c>] schedule+0x8c/0xa8
[<ffffff800833865c>] request_wait_answer+0x74/0x220
[<ffffff8008339f70>] __fuse_request_send+0x8c/0xa0
[<ffffff8008339fe4>] fuse_request_send+0x60/0x6c
[<ffffff800833bdb0>] fuse_simple_request+0x128/0x16c
[<ffffff800833dddc>] fuse_lookup_name+0x104/0x1b0
[<ffffff800833dee4>] fuse_lookup+0x5c/0x11c
[<ffffff800821861c>] lookup_slow+0xfc/0x174
[<ffffff800821b474>] walk_component+0xf0/0x290
[<ffffff800821bbac>] path_lookupat+0xa0/0x128
[<ffffff800821c7f4>] filename_lookup+0x84/0x124
[<ffffff800821c8d8>] kern_path+0x44/0x54
[<ffffff800833b0c8>] fuse_dev_do_write+0x828/0xa0c
[<ffffff800833b610>] fuse_dev_write+0x90/0xb4
[<ffffff800820b770>] do_iter_readv_writev+0xf4/0x13c
[<ffffff800820cc88>] do_readv_writev+0xec/0x220
[<ffffff800820d05c>] vfs_writev+0x60/0x74
[<ffffff800820d0ec>] do_writev+0x7c/0x100
[<ffffff800820e348>] SyS_writev+0x38/0x48
[<ffffff8008083540>] el0_svc_naked+0x34/0x38
Fix by ensuring that the page allocated for the canonical path is zeroed.
Bug: 194856119
Bug: 196051870
Fixes: 24ab59f6bb42 ("ANDROID: fuse: Add support for d_canonical_path")
Signed-off-by: Biao Li <libiao@allwinnertech.com>
Signed-off-by: Shuosheng Huang <huangshuosheng@allwinnertech.com>
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I400815dc1049d90c308f5cf87ce60de97ff82131
The configuration for CtsNetTestCases has an exclude-annotation in the
platform TEST_MAPPING.
Bug: 199933857
Change-Id: I7219518b21c8678c9f70b6f0b0eb8dd3a5468f00
Signed-off-by: Steve Muckle <smuckle@google.com>
Steps on the way to 5.15-rc1
Resolves merge conflict in:
fs/proc/base.c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic554ca8447961e52fbc6f27d91470a816b59a771
This reverts commit 1fb8e678a5.
It causes build errors in 5.15-rc1 and there are no in-kernel users of
this api so remove it. If it is needed, someone can easily add a
working version of it back.
Bug: 177377077
Cc: Vijayanand Jitta <vjitta@codeaurora.org>
Cc: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I74fe57124b74e9695636d139b1f548b69fbc9039
Steps on the way to 5.15-rc1
Resolves merge conflicts in:
init/Kconfig
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie57720dd32785337c938b5815719a71750710240
In commit 2cb5bf9e38 ("Revert "genirq: Restrict export of
irq_to_desc()"") the ability for the symbol to be exported was restored,
but the _GPL marking was removed for some reason. As Android exports
always need to be _GPL, restore the _GPL marking of irq_to_desc() to
follow that rule, and to be synced with what is done upstream at the
same time.
Bug: 199823932
Fixes: 2cb5bf9e38 ("Revert "genirq: Restrict export of irq_to_desc()"")
Cc: Huang Yiwei <hyiwei@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib4e8d060805c8f59f9737abb77fc98e221e17a43
This reverts commit 64a1b95bb9 and
commit 11cc92eb74.
Commit 64a1b95bb9 ("genirq: Restrict export of irq_to_desc()") removed
the export of irq_to_desc() and commit 11cc92eb74 ("genirq: Fix export
of irq_to_desc() for powerpc KVM") added it back with the powerpc KVM
limitation. But there's still some usage in GKI kernel modules, so
revert both two commits.
Bug: 199823932
Signed-off-by: Huang Yiwei <hyiwei@codeaurora.org>
Change-Id: I3f871ecb5bc002c8643b4ddd3137a6899ac77b4f
Steps on the way to 5.15-rc1
Fixes merge conflicts in:
fs/fuse/fuse_i.h
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I93de6ed588fbcb01ab0d81089839f47459ec1b82
This reverts commit 3fe617ccaf.
Right now the android build system can not work properly for some of the
builds forcing this option on for them as they still have warnings.
So revert it for now, we will remove this later on, hopefully before
5.15-final is out, after all of the build warnings are cleaned up.
Bug: 199872592
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7e6a0ebb76ab2876cb180214911c1c25b0904a23
Steps on the way to 5.15-rc1
Fixed up merge conflicts in:
scripts/Makefile.modfinal
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3a916b7267fc2e4ed2f2bd308b9cff8ca9430660
Steps on the way to 5.15-rc1
Resolved merge issues in:
drivers/scsi/ufs/ufshcd.c
and build issues in:
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd-crypto.h
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4d4887e9d391f63308d856d8c1c6e40bc61f1bca
Thanks to commit dcb7c0b946 ("hardening: Clarify Kconfig text for
auto-var-init"), CONFIG_INIT_STACK_ALL_ZERO is now automatically
selected depending on the compiler's support for it, so it is not longer
needed to explicitly enable it in the config file.
Fixes: dcb7c0b946 ("hardening: Clarify Kconfig text for auto-var-init")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9df386f22d3a24ae0f9ab4da2e0ab35277a48f17
CONFIG_CFI_CLANG breaks cross-module function address equality, which
breaks virtio_dma_buf as it compares a locally taken function address to
a one passed from a different module. Remove these sanity checks for now
to allow Cuttlefish to boot with CFI.
Bug: 178495907
Bug: 199547335
Change-Id: I508e2fa9e3ddd888dc2fdb743cec20a400eaf1f5
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Alistair Delva <adelva@google.com>
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
Pull more perf tools updates from Arnaldo Carvalho de Melo:
- Add missing fields and remove some duplicate fields when printing a
perf_event_attr.
- Fix hybrid config terms list corruption.
- Update kernel header copies, some resulted in new kernel features
being automagically added to 'perf trace' syscall/tracepoint argument
id->string translators.
- Add a file generated during the documentation build to .gitignore.
- Add an option to build without libbfd, as some distros, like Debian
consider its ABI unstable.
- Add support to print a textual representation of IBS raw sample data
in 'perf report'.
- Fix bpf 'perf test' sample mismatch reporting
- Fix passing arguments to stackcollapse report in a 'perf script'
python script.
- Allow build-id with trailing zeros.
- Look for ImageBase in PE file to compute .text offset.
* tag 'perf-tools-for-v5.15-2021-09-11' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (25 commits)
tools headers UAPI: Update tools's copy of drm.h headers
tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
tools headers UAPI: Sync linux/fs.h with the kernel sources
tools headers UAPI: Sync linux/in.h copy with the kernel sources
perf tools: Add an option to build without libbfd
perf tools: Allow build-id with trailing zeros
perf tools: Fix hybrid config terms list corruption
perf tools: Factor out copy_config_terms() and free_config_terms()
perf tools: Fix perf_event_attr__fprintf() missing/dupl. fields
perf tools: Ignore Documentation dependency file
perf bpf: Provide a weak btf__load_from_kernel_by_id() for older libbpf versions
tools include UAPI: Update linux/mount.h copy
perf beauty: Cover more flags in the move_mount syscall argument beautifier
tools headers UAPI: Sync linux/prctl.h with the kernel sources
tools include UAPI: Sync sound/asound.h copy with the kernel sources
tools headers UAPI: Sync linux/kvm.h with the kernel sources
tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources
perf report: Add support to print a textual representation of IBS raw sample data
perf report: Add tools/arch/x86/include/asm/amd-ibs.h
perf env: Add perf_env__cpuid, perf_env__{nr_}pmu_mappings
...
Pull compiler attributes updates from Miguel Ojeda:
- Fix __has_attribute(__no_sanitize_coverage__) for GCC 4 (Marco Elver)
- Add Nick as Reviewer for compiler_attributes.h (Nick Desaulniers)
- Move __compiletime_{error|warning} (Nick Desaulniers)
* tag 'compiler-attributes-for-linus-v5.15-rc1-v2' of git://github.com/ojeda/linux:
compiler_attributes.h: move __compiletime_{error|warning}
MAINTAINERS: add Nick as Reviewer for compiler_attributes.h
Compiler Attributes: fix __has_attribute(__no_sanitize_coverage__) for GCC 4
Pull auxdisplay updates from Miguel Ojeda:
"An assortment of improvements for auxdisplay:
- Replace symbolic permissions with octal permissions (Jinchao Wang)
- ks0108: Switch to use module_parport_driver() (Andy Shevchenko)
- charlcd: Drop unneeded initializers and switch to C99 style (Andy
Shevchenko)
- hd44780: Fix oops on module unloading (Lars Poeschel)
- Add I2C gpio expander example (Ralf Schlatterbeck)"
* tag 'auxdisplay-for-linus-v5.15-rc1' of git://github.com/ojeda/linux:
auxdisplay: Replace symbolic permissions with octal permissions
auxdisplay: ks0108: Switch to use module_parport_driver()
auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style
auxdisplay: hd44780: Fix oops on module unloading
auxdisplay: Add I2C gpio expander example