05 Dec, 2019
4 commits
-
CONFIG_UNWINDER_ORC needs a libelf-dev which we unfortunately can't
afford to have in the CI yet.Switch to different stack unwinder for allmodconfig to work around the
problem temporarily.Bug: 140224784
Test: allmodconfig build for x86
Change-Id: Id35c222e76cca35aa5e520c1a3d5d88e5cc1da8a
Signed-off-by: Quentin Perret -
Leaf changes summary: 50 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 49 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable49 Added functions:
[A] 'function int __devm_iio_device_register(device*, iio_dev*, module*)'
[A] 'function int __iio_device_register(iio_dev*, module*)'
[A] 'function void arch_setup_dma_ops(device*, u64, u64, const iommu_ops*, bool)'
[A] 'function iio_channel* devm_iio_channel_get(device*, const char*)'
[A] 'function iio_channel* devm_iio_channel_get_all(device*)'
[A] 'function void devm_iio_channel_release(device*, iio_channel*)'
[A] 'function void devm_iio_channel_release_all(device*, iio_channel*)'
[A] 'function iio_dev* devm_iio_device_alloc(device*, int)'
[A] 'function void devm_iio_device_free(device*, iio_dev*)'
[A] 'function int devm_iio_device_match(device*, void*, void*)'
[A] 'function void devm_iio_device_unregister(device*, iio_dev*)'
[A] 'function iio_channel* iio_channel_get(device*, const char*)'
[A] 'function iio_channel* iio_channel_get_all(device*)'
[A] 'function void iio_channel_release(iio_channel*)'
[A] 'function void iio_channel_release_all(iio_channel*)'
[A] 'function int iio_convert_raw_to_processed(iio_channel*, int, int*, unsigned int)'
[A] 'function iio_dev* iio_device_alloc(int)'
[A] 'function int iio_device_claim_direct_mode(iio_dev*)'
[A] 'function void iio_device_free(iio_dev*)'
[A] 'function void iio_device_release_direct_mode(iio_dev*)'
[A] 'function void iio_device_unregister(iio_dev*)'
[A] 'function ssize_t iio_enum_available_read(iio_dev*, uintptr_t, const iio_chan_spec*, char*)'
[A] 'function ssize_t iio_enum_read(iio_dev*, uintptr_t, const iio_chan_spec*, char*)'
[A] 'function ssize_t iio_enum_write(iio_dev*, uintptr_t, const iio_chan_spec*, const char*, size_t)'
[A] 'function ssize_t iio_format_value(char*, unsigned int, int, int*)'
[A] 'function unsigned int iio_get_channel_ext_info_count(iio_channel*)'
[A] 'function int iio_get_channel_type(iio_channel*, iio_chan_type*)'
[A] 'function s64 iio_get_time_ns(const iio_dev*)'
[A] 'function unsigned int iio_get_time_res(const iio_dev*)'
[A] 'function int iio_map_array_register(iio_dev*, iio_map*)'
[A] 'function int iio_map_array_unregister(iio_dev*)'
[A] 'function int iio_push_event(iio_dev*, u64, s64)'
[A] 'function int iio_read_avail_channel_attribute(iio_channel*, const int**, int*, int*, iio_chan_info_enum)'
[A] 'function int iio_read_avail_channel_raw(iio_channel*, const int**, int*)'
[A] 'function int iio_read_channel_attribute(iio_channel*, int*, int*, iio_chan_info_enum)'
[A] 'function int iio_read_channel_average_raw(iio_channel*, int*)'
[A] 'function ssize_t iio_read_channel_ext_info(iio_channel*, const char*, char*)'
[A] 'function int iio_read_channel_offset(iio_channel*, int*, int*)'
[A] 'function int iio_read_channel_processed(iio_channel*, int*)'
[A] 'function int iio_read_channel_raw(iio_channel*, int*)'
[A] 'function int iio_read_channel_scale(iio_channel*, int*, int*)'
[A] 'function ssize_t iio_read_const_attr(device*, device_attribute*, char*)'
[A] 'function int iio_read_max_channel_raw(iio_channel*, int*)'
[A] 'function int iio_read_mount_matrix(device*, const char*, iio_mount_matrix*)'
[A] 'function ssize_t iio_show_mount_matrix(iio_dev*, uintptr_t, const iio_chan_spec*, char*)'
[A] 'function int iio_str_to_fixpoint(const char*, int, int*, int*)'
[A] 'function int iio_write_channel_attribute(iio_channel*, int, int, iio_chan_info_enum)'
[A] 'function ssize_t iio_write_channel_ext_info(iio_channel*, const char*, const char*, size_t)'
[A] 'function int iio_write_channel_raw(iio_channel*, int)'Fixes: c367d587ed33 ("ANDROID: gki_defconfig: IIO=y")
Change-Id: Ie46448f8baa25bfd4aa84dd819a5820cef7e0ea5
Signed-off-by: Matthias Maennich -
Set the default for CONFIG_IIO=y, a requirement for bandwidth,
latency and proper synchronization of the sensor hub with camera.Signed-off-by: Mark Salyzyn
Bug: 145377190
Change-Id: If4d6b09cc4fc4807404311d793713557ee88f66b -
Export 'arch_setup_dma_ops' to fix the dependency added
if CONFIG_SND_SOC=m:ERROR: "arch_setup_dma_ops" [sound/soc/snd-soc-core.ko] undefined!
This should be followed up with a refactor that removes the dependency
(tracked in the cited bug).Bug: 144369166
Fixes: 9cb7ec3e9be4 ("ANDROID: ASoC: core - add hostless DAI support")
Change-Id: Icf2daf1d92597e6dc9e723799ed7cea73e961227
Signed-off-by: Todd Kjos
04 Dec, 2019
3 commits
-
'struct regulator at internal.h:34:1' changed:
type size hasn't changed
1 data member insertion:
'unsigned int regulator::device_link', at offset 29 (in bits) at internal.h:39:1167 impacted interfaces
Fixes: 106dcff0ec94 ("UPSTREAM: regulator: core: Don't try to remove device links if add failed")
Change-Id: Id662fb57557b76c00de4da863c4a56fd2d3e576c
Signed-off-by: Matthias Maennich -
Leaf changes summary: 76 artifacts changed (1 filtered out)
Changed leaf types summary: 17 (1 filtered out) leaf types changed
Removed/Changed/Added functions summary: 3 Removed, 4 Changed, 44 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 3 Added variablesChange-Id: I353911240004c9f04c54c4e1955e17ac6d348d45
Signed-off-by: Matthias Maennich -
The instructions in the README should match what `git cherry-pick -x` is
producing to get a consistent format that we can later rely on.Fixes: f8978f4f6a5e ("ANDROID: add README.md")
Change-Id: I7c9f06af65654ae141ef85b52a081641c7320348
Cc: Saravana Kannan
Signed-off-by: Matthias Maennich
03 Dec, 2019
6 commits
-
Add support for creating device links out of more DT properties.
Cc: Thomas Gleixner
Cc: Vinod Koul
Signed-off-by: Saravana Kannan
Reviewed-by: Linus Walleij
Link: https://lore.kernel.org/r/20191120071302.227777-1-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman
(cherry-picked from 7f00be96f1252f1e97fd2300e19250b4dc521fb1)
Change-Id: I68f6f4ef4d0f6512036328e54ce3d53d836124ee -
The of_is_ancestor_of() function was renamed from of_link_is_valid()
based on review feedback. The rename meant the semantics of the function
had to be inverted, but this was missed in the earlier patch.So, fix the semantics of of_is_ancestor_of() and invert the conditional
expressions where it is used.Fixes: a3e1d1a7f5fc ("of: property: Add functional dependency link from DT bindings")
Signed-off-by: Saravana Kannan
Link: https://lore.kernel.org/r/20191120080230.16007-1-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman
(cherry-picked from 3883539140b8ce67ad000938c3cd3b3e59498520)
Change-Id: I6ba531820df33c6a555990e02c08d96820ed8a4f -
This allows the of_devlink feature to work across i2c devices too. This
avoid unnecessary probe deferrals of i2c devices, defers consumers of
i2c devices till the i2c devices probe, and allows i2c drivers to
implement sync_state() callbacks.Signed-off-by: Saravana Kannan
Acked-by: Wolfram Sang
Link: https://lore.kernel.org/r/20191115045049.261104-1-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman
(cherry-picked from 60774d2af07a465dc916321e7428a4c5b7867ed4)
Change-Id: I843f57f35be8dac96d9903c86350ef6186dce3b4 -
device_link_add() might not always succeed depending on the type of
device link and the rest of the dependencies in the system. If
device_link_add() didn't succeed, then we shouldn't try to remove the
link later on as it might remove a link someone else created.Signed-off-by: Saravana Kannan
Link: https://lore.kernel.org/r/20191115000438.45970-1-saravanak@google.com
Signed-off-by: Mark Brown
(cherry-picked from b59b654478093fa429ad4c7897ae29f201146a00)
Change-Id: I6cffa3ca884b74122307931e8f6615f31c33ef55 -
The wording was a bit ambiguous. So update it to make it clear.
Signed-off-by: Saravana Kannan
Reviewed-by: Rafael J. Wysocki
Link: https://lore.kernel.org/r/20191113023559.62295-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman
(cherry-picked from bee3bbe616a2c8de641a64d874f9206835bd4401)
Change-Id: I55b9fe1e97324a453bda33206fe57cfaf711aba8 -
Allow DAI's to be hostless so that no PCM data is sent between DAI
and CPU. This allows for power savings as there is no DMA or CPU
interaction required.BUG: 144369166
Change-Id: I8947f1ad2c4a7013e92e21078b35e3cad332cf6f
Signed-off-by: Liam Girdwood
Signed-off-by: Patrick Lai
Signed-off-by: Banajit Goswami
Signed-off-by: Meng Wang
Signed-off-by: Gopikrishnaiah Anandan
Signed-off-by: Neema Shetty
Signed-off-by: Vidyakumar Athota
Signed-off-by: Anish Kumar
Signed-off-by: Shiv Maliyappanahalli
Signed-off-by: Sudheer Papothi
28 Nov, 2019
3 commits
-
These errors are harmless, suppress the output.
Fixes: 310afefe71d4 ("ANDROID: kbuild: add support for Clang LTO")
Change-Id: Ia78f2edb6aa3a93ffbca37d193f065a51f748679
Signed-off-by: Sami Tolvanen -
Makefile.modpost was split to Makefile.modfinal in 5.4. This file
doesn't include include/config/auto.conf, which breaks checking
for kernel configuration. This change adds the missing include and
cleans up the LTO build rule.Bug: 145296861
Fixes: 310afefe71d4 ("ANDROID: kbuild: add support for Clang LTO")
Change-Id: I3e6f676e841eed730ce8cccdfbd312f63660c293
Signed-off-by: Sami Tolvanen -
Bug: 145297013
Change-Id: I220b9e8339f670f22922e5e5ecba8b47f782d0ca
Signed-off-by: Steve Muckle
27 Nov, 2019
24 commits
-
Bug: 145210207
Change-Id: I10a67f8607bfbd20b699a33cad3f441cd49aad26
Signed-off-by: Sami Tolvanen -
Instead of casting pointers to callback functions, add C wrappers
to avoid type mismatch failures with Control-Flow Integrity (CFI)
checking.Bug: 145210207
Change-Id: I78751148dc1d2cf5666dfdeeb8f6ffa602aefa5c
(am from https://lore.kernel.org/patchwork/patch/1156078/)
Signed-off-by: Sami Tolvanen -
Disable CFI for code that runs at EL2 because __cfi_check only
understands EL1 addresses.Bug: 145210207
Change-Id: I0053c4e42a0f40423ac94ab73077034e97e0ff31
Signed-off-by: Sami Tolvanen -
__apply_alternatives makes indirect calls to functions whose address is
taken in assembly code using the alternative_cb macro. With CFI enabled
using non-canonical jump tables, the compiler isn't able to replace the
function reference with the jump table reference, which trips CFI.Bug: 145210207
Change-Id: I6cdd164f9315c0aa16a1427ab1a67cfa8aad3ffd
Signed-off-by: Sami Tolvanen -
We use non-canonical CFI jump tables with CONFIG_CFI_CLANG, which
means the compiler replaces function address references with the
address of the function's CFI jump table entry. This results in
__pa_symbol(function) returning the physical address of the jump
table entry, which can lead to address space confusion since the
jump table points to a virtual address.This change adds a __pa_function macro, which uses inline assembly
to take the actual function address instead.Bug: 145210207
Change-Id: I674e5ed386b282a7ed32eeb1f070fb39b5c4b19c
Signed-off-by: Sami Tolvanen -
Disable CFI checking for functions that switch to linear mapping and
make an indirect call to a physical address, since the compiler only
understands virtual addresses.Bug: 145210207
Change-Id: Icce1a5b8ca521227b2fd6a3309189e738fe022b8
Signed-off-by: Sami Tolvanen -
Implement arch_bpf_jit_check_func to check that pointers to jited BPF
functions are correctly aligned and point to the BPF JIT region. This
narrows down the attack surface on the stored pointer.Bug: 145210207
Change-Id: I1c2c9365662437f9a4178b873859576028468ea6
Signed-off-by: Sami Tolvanen -
With CONFIG_BPF_JIT, the kernel makes indirect calls to dynamically
generated code, which the compile-time Control-Flow Integrity (CFI)
checking cannot validate. This change adds basic sanity checking to
ensure we are jumping to a valid location, which narrows down the
attack surface on the stored pointer.In addition, this change adds a weak arch_bpf_jit_check_func function,
which architectures that implement BPF JIT can override to perform
additional validation, such as verifying that the pointer points to
the correct memory region.Bug: 145210207
Change-Id: I1a90c70cdcef25673a870d3c4f2586a829c0d32e
Signed-off-by: Sami Tolvanen -
This change adds the CONFIG_CFI_CLANG option, CFI error handling,
and a faster look-up table for cross module CFI checks.Bug: 145210207
Change-Id: I118303de50114ca6f85d89a7d69c5cbc47e2f5c0
Signed-off-by: Sami Tolvanen -
Allow CONFIG_LTO_CLANG and CONFIG_THINLTO to be enabled.
Bug: 145210207
Change-Id: If0d2cf24eabd3720576489cc74410681ef722784
Signed-off-by: Sami Tolvanen -
LLVM's integrated assembler fails with the following error when
building KVM::12:6: error: expected absolute expression
.if kvm_update_va_mask == 0
^
:21:6: error: expected absolute expression
.if kvm_update_va_mask == 0
^
:24:2: error: unrecognized instruction mnemonic
NOT_AN_INSTRUCTION
^
LLVM ERROR: Error parsing inline asmThese errors come from ALTERNATIVE_CB and __ALTERNATIVE_CFG,
which test for the existence of the callback parameter in inline
assembly using the following expression:" .if " __stringify(cb) " == 0\n"
This works with GNU as, but isn't supported by LLVM. This change
splits __ALTERNATIVE_CFG and ALTINSTR_ENTRY into separate macros
to fix the LLVM build.Bug: 145210207
Change-Id: I3f80fca8aafdac4e185f79ce5a4eee9ba367bb33
(am from https://lore.kernel.org/patchwork/patch/1146950/)
Link: https://github.com/ClangBuiltLinux/linux/issues/472
Signed-off-by: Sami Tolvanen -
Unlike gcc, clang considers each inline assembly block to be independent
and therefore, when using the integrated assembler for inline assembly,
any preambles that enable features must be repeated in each block.This change defines __LSE_PREAMBLE and adds it to each inline assembly
block that has LSE instructions, which allows them to be compiled also
with clang's assembler.Bug: 145210207
Change-Id: Ifdcb160ddb074bea62a52239fffb0590f409df46
(am from https://lore.kernel.org/patchwork/patch/1146951/)
Link: https://github.com/ClangBuiltLinux/linux/issues/671
Signed-off-by: Sami Tolvanen -
Disable HAVE_ARCH_PREL32_RELOCATIONS to stop LLVM from reordering
initcalls.Bug: 145210207
Change-Id: Ia5ba389ff204fdc51cf6d6c554e9345bd89398d7
Signed-off-by: Sami Tolvanen -
Bug: 145210207
Change-Id: I51f87b1b975ba22e67555a6bb4f31a8f47364eba
Signed-off-by: Sami Tolvanen -
Bug: 145210207
Link: https://github.com/ClangBuiltLinux/linux/issues/537
Change-Id: Ibe51a1f531625fde4a44cf92f89b1f9ac41b4c68
Signed-off-by: Sami Tolvanen -
Disable CONFIG_ARCH_TEGRA_210_SOC with LTO to work around an issue
with ThinLTO.Bug: 145210207
Change-Id: Ic37929da7337317ff2720f1f939227b99f0cdadd
Link: https://github.com/ClangBuiltLinux/linux/issues/510
Signed-off-by: Sami Tolvanen -
With LTO, the compiler doesn't necessarily obey link order for
initcalls, and the initcall variables need to be globally unique
to avoid naming collisions.In order to preserve the intended order, this change moves each
initcall variable into its own section and generates a linker
script (in scripts/link-vmlinux.sh) to define the correct order
for these sections. We also add a __COUNTER__ prefix to the name,
so we can retain the order of initcalls within each compilation
unit, and __LINE__ to help ensure uniqueness.Bug: 145210207
Change-Id: I602038783853497790c5a2941343c546e380c525
Signed-off-by: Sami Tolvanen -
Disable LTO for rodata.o to allow objcopy to be used to
manipulate sections.Bug: 145210207
Change-Id: I387a37fd2dd13a877e9e66e9f99c9c4b10b0e963
Signed-off-by: Sami Tolvanen -
With CONFIG_LTO_CLANG, we produce LLVM IR instead of object files. Since LTO
is not really needed here and the Makefile assumes we produce an object file,
disable LTO for libstub.Bug: 145210207
Change-Id: I7f1f9af7430164ebbcb0e85f66abae5cb9feee6a
Acked-by: Ard Biesheuvel
Signed-off-by: Sami Tolvanen -
With CONFIG_LTO_CLANG, clang generates LLVM IR instead of ELF object
files. As empty.o is used for probing target properties, disable LTO
for it to produce an object file instead.Bug: 145210207
Change-Id: I618d8b86ed88ad048abdee3c541ced19d12982c0
Signed-off-by: Sami Tolvanen -
With CONFIG_LTO_CLANG enabled, LLVM IR won't be compiled into object
files until modpost_link. This change postpones calls to recordmcount
until after this step.In order to exclude ftrace_process_locs from inspection, we add a new
code section .text..ftrace, which we tell recordmcount to ignore, and
a __norecordmcount attribute for moving functions to this section.Bug: 145210207
Change-Id: Ib77f7c431fce54243c46d584b55761ed2342965c
Signed-off-by: Sami Tolvanen -
This change adds the configuration option CONFIG_LTO_CLANG, and
build system support for Clang's Link Time Optimization (LTO). In
preparation for LTO support with other compilers, potentially common
parts of the changes are gated behind CONFIG_LTO instead.With -flto, instead of object files, Clang produces LLVM bitcode,
which is compiled into a native object at link time, allowing the
final binary to be optimized globally. For more details, see:https://llvm.org/docs/LinkTimeOptimization.html
While the kernel normally uses GNU ld for linking, LLVM supports LTO
only with LLD or GNU gold linkers. This change assumes LLD is used.Bug: 145210207
Change-Id: If1164ff33d073358ee7d4bba84cbb06c349c4a88
Signed-off-by: Sami Tolvanen -
Similarly to the CC_IS_CLANG config, add LD_IS_LLD to simplify feature
selection based on the linker.Bug: 145210207
Change-Id: I097c52899dcf9829eb0e1ea89211b17972301c1a
Signed-off-by: Sami Tolvanen -
platform_find_device_by_driver calls bus_find_device and passes
platform_match as the callback function. Casting the function to a
mismatching type trips indirect call Control-Flow Integrity (CFI) checking.This change adds a callback function with the correct type and instead
of casting the function, explicitly casts the second parameter to struct
device_driver* as expected by platform_match.Bug: 145210207
Change-Id: Idef667974d3c54ebd79f0813531cf2523d651dfe
(cherry picked from commit 492c88720d36eb662f9f10c1633f7726fbb07fc4
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
driver-core-next)
Fixes: 36f3313d6bff9 ("platform: Add platform_find_device_by_driver() helper")
Signed-off-by: Sami Tolvanen
Reviewed-by: Kees Cook
Cc: stable
Link: https://lore.kernel.org/r/20191112214156.3430-1-samitolvanen@google.com
Signed-off-by: Greg Kroah-Hartman