The configuration is only selected by other drivers, so add it in
the list of hidden gki configurations. USB_PHY also autoselects
CONFIG_EXTCON, so EXTCON now disappears from gki_defconfig
Bug: 151969174
Test: Builds
Signed-off-by: Sandeep Patil <sspatil@google.com>
Change-Id: I0cc55d2f06fcb5a46daf0578629e1f0a653ac48b
Changes in 5.4.24
io_uring: grab ->fs as part of async offload
EDAC: skx_common: downgrade message importance on missing PCI device
net: dsa: b53: Ensure the default VID is untagged
net: fib_rules: Correctly set table field when table number exceeds 8 bits
net: macb: ensure interface is not suspended on at91rm9200
net: mscc: fix in frame extraction
net: phy: restore mdio regs in the iproc mdio driver
net: sched: correct flower port blocking
net/tls: Fix to avoid gettig invalid tls record
nfc: pn544: Fix occasional HW initialization failure
qede: Fix race between rdma destroy workqueue and link change event
Revert "net: dev: introduce support for sch BYPASS for lockless qdisc"
udp: rehash on disconnect
sctp: move the format error check out of __sctp_sf_do_9_1_abort
bnxt_en: Improve device shutdown method.
bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs.
bonding: add missing netdev_update_lockdep_key()
net: export netdev_next_lower_dev_rcu()
bonding: fix lockdep warning in bond_get_stats()
ipv6: Fix route replacement with dev-only route
ipv6: Fix nlmsg_flags when splitting a multipath route
ipmi:ssif: Handle a possible NULL pointer reference
drm/msm: Set dma maximum segment size for mdss
sched/core: Don't skip remote tick for idle CPUs
timers/nohz: Update NOHZ load in remote tick
sched/fair: Prevent unlimited runtime on throttled group
dax: pass NOWAIT flag to iomap_apply
mac80211: consider more elements in parsing CRC
cfg80211: check wiphy driver existence for drvinfo report
s390/zcrypt: fix card and queue total counter wrap
qmi_wwan: re-add DW5821e pre-production variant
qmi_wwan: unconditionally reject 2 ep interfaces
NFSv4: Fix races between open and dentry revalidation
perf/smmuv3: Use platform_get_irq_optional() for wired interrupt
perf/x86/intel: Add Elkhart Lake support
perf/x86/cstate: Add Tremont support
perf/x86/msr: Add Tremont support
ceph: do not execute direct write in parallel if O_APPEND is specified
ARM: dts: sti: fixup sound frame-inversion for stihxxx-b2120.dtsi
drm/amd/display: Do not set optimized_require to false after plane disable
RDMA/siw: Remove unwanted WARN_ON in siw_cm_llp_data_ready()
drm/amd/display: Check engine is not NULL before acquiring
drm/amd/display: Limit minimum DPPCLK to 100MHz.
drm/amd/display: Add initialitions for PLL2 clock source
amdgpu: Prevent build errors regarding soft/hard-float FP ABI tags
soc/tegra: fuse: Fix build with Tegra194 configuration
i40e: Fix the conditional for i40e_vc_validate_vqs_bitmaps
net: ena: fix potential crash when rxfh key is NULL
net: ena: fix uses of round_jiffies()
net: ena: add missing ethtool TX timestamping indication
net: ena: fix incorrect default RSS key
net: ena: rss: do not allocate key when not supported
net: ena: rss: fix failure to get indirection table
net: ena: rss: store hash function as values and not bits
net: ena: fix incorrectly saving queue numbers when setting RSS indirection table
net: ena: fix corruption of dev_idx_to_host_tbl
net: ena: ethtool: use correct value for crc32 hash
net: ena: ena-com.c: prevent NULL pointer dereference
ice: update Unit Load Status bitmask to check after reset
cifs: Fix mode output in debugging statements
cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE
mac80211: fix wrong 160/80+80 MHz setting
net: hns3: add management table after IMP reset
net: hns3: fix a copying IPv6 address error in hclge_fd_get_flow_tuples()
nvme/tcp: fix bug on double requeue when send fails
nvme: prevent warning triggered by nvme_stop_keep_alive
nvme/pci: move cqe check after device shutdown
ext4: potential crash on allocation error in ext4_alloc_flex_bg_array()
audit: fix error handling in audit_data_to_entry()
audit: always check the netlink payload length in audit_receive_msg()
ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro
ACPI: watchdog: Fix gas->access_width usage
KVM: VMX: check descriptor table exits on instruction emulation
HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock
HID: core: fix off-by-one memset in hid_report_raw_event()
HID: core: increase HID report buffer size to 8KiB
drm/amdgpu: Drop DRIVER_USE_AGP
drm/radeon: Inline drm_get_pci_dev
macintosh: therm_windtunnel: fix regression when instantiating devices
tracing: Disable trace_printk() on post poned tests
Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"
amdgpu/gmc_v9: save/restore sdpif regs during S3
cpufreq: Fix policy initialization for internal governor drivers
io_uring: fix 32-bit compatability with sendmsg/recvmsg
netfilter: ipset: Fix "INFO: rcu detected stall in hash_xxx" reports
net/smc: transfer fasync_list in case of fallback
vhost: Check docket sk_family instead of call getname
netfilter: ipset: Fix forceadd evaluation path
netfilter: xt_hashlimit: reduce hashlimit_mutex scope for htable_put()
HID: alps: Fix an error handling path in 'alps_input_configured()'
HID: hiddev: Fix race in in hiddev_disconnect()
MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()'
i2c: altera: Fix potential integer overflow
i2c: jz4780: silence log flood on txabrt
drm/i915/gvt: Fix orphan vgpu dmabuf_objs' lifetime
drm/i915/gvt: Separate display reset from ALL_ENGINES reset
nl80211: fix potential leak in AP start
mac80211: Remove a redundant mutex unlock
kbuild: fix DT binding schema rule to detect command line changes
hv_netvsc: Fix unwanted wakeup in netvsc_attach()
usb: charger: assign specific number for enum value
nvme-pci: Hold cq_poll_lock while completing CQEs
s390/qeth: vnicc Fix EOPNOTSUPP precedence
net: netlink: cap max groups which will be considered in netlink_bind()
net: atlantic: fix use after free kasan warn
net: atlantic: fix potential error handling
net: atlantic: fix out of range usage of active_vlans array
net/smc: no peer ID in CLC decline for SMCD
net: ena: make ena rxfh support ETH_RSS_HASH_NO_CHANGE
selftests: Install settings files to fix TIMEOUT failures
kbuild: remove header compile test
kbuild: move headers_check rule to usr/include/Makefile
kbuild: remove unneeded variable, single-all
kbuild: make single target builds even faster
namei: only return -ECHILD from follow_dotdot_rcu()
mwifiex: drop most magic numbers from mwifiex_process_tdls_action_frame()
mwifiex: delete unused mwifiex_get_intf_num()
KVM: SVM: Override default MMIO mask if memory encryption is enabled
KVM: Check for a bad hva before dropping into the ghc slow path
sched/fair: Optimize select_idle_cpu
f2fs: fix to add swap extent correctly
RDMA/hns: Simplify the calculation and usage of wqe idx for post verbs
RDMA/hns: Bugfix for posting a wqe with sge
drivers: net: xgene: Fix the order of the arguments of 'alloc_etherdev_mqs()'
ima: ima/lsm policy rule loading logic bug fixes
kprobes: Set unoptimized flag after unoptimizing code
lib/vdso: Make __arch_update_vdso_data() logic understandable
lib/vdso: Update coarse timekeeper unconditionally
pwm: omap-dmtimer: put_device() after of_find_device_by_node()
perf hists browser: Restore ESC as "Zoom out" of DSO/thread/etc
perf ui gtk: Add missing zalloc object
x86/resctrl: Check monitoring static key in the MBM overflow handler
KVM: x86: Remove spurious kvm_mmu_unload() from vcpu destruction path
KVM: x86: Remove spurious clearing of async #PF MSR
rcu: Allow only one expedited GP to run concurrently with wakeups
ubifs: Fix ino_t format warnings in orphan_delete()
thermal: db8500: Depromote debug print
thermal: brcmstb_thermal: Do not use DT coefficients
netfilter: nft_tunnel: no need to call htons() when dumping ports
netfilter: nf_flowtable: fix documentation
bus: tegra-aconnect: Remove PM_CLK dependency
xfs: clear kernel only flags in XFS_IOC_ATTRMULTI_BY_HANDLE
locking/lockdep: Fix lockdep_stats indentation problem
mm/debug.c: always print flags in dump_page()
mm/gup: allow FOLL_FORCE for get_user_pages_fast()
mm/huge_memory.c: use head to check huge zero page
mm, thp: fix defrag setting if newline is not used
kvm: nVMX: VMWRITE checks VMCS-link pointer before VMCS field
kvm: nVMX: VMWRITE checks unsupported field before read-only field
blktrace: Protect q->blk_trace with RCU
Linux 5.4.24
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0b31557e16c72bd30d1e6938ed199918ff326d88
commit fcbb8461fd upstream.
There are both positive and negative options about this feature.
At first, I thought it was a good idea, but actually Linus stated a
negative opinion (https://lkml.org/lkml/2019/9/29/227). I admit it
is ugly and annoying.
The baseline I'd like to keep is the compile-test of uapi headers.
(Otherwise, kernel developers have no way to ensure the correctness
of the exported headers.)
I will maintain a small build rule in usr/include/Makefile.
Remove the other header test functionality.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ added to 5.4.y due to start of build warnings from backported patches
because of this feature - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cuttlefish and Goldfish both rely on the virtio console and
HVC_DRIVER is a binary config which is a dep for that driver.
Bug: 150620456
Test: Treehugger
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I54e7d95da4fcddd534d0f0f48b5c546cd2f2718d
CONFIG_TRIM_UNUSED_KSYMS currently removes all unused exported symbols
from ksymtab. This works really well when using in-tree drivers, but
cannot be used in its current form if some of them are out-of-tree.
Indeed, even if the list of symbols required by out-of-tree drivers is
known at compile time, the only solution today to guarantee these don't
get trimmed is to set CONFIG_TRIM_UNUSED_KSYMS=n. This not only wastes
space, but also makes it difficult to control the ABI usable by vendor
modules in distribution kernels such as Android. Being able to control
the kernel ABI surface is particularly useful to ship a unique Generic
Kernel Image (GKI) for all vendors, which is a first step in the
direction of getting all vendors to contribute their code upstream.
As such, attempt to improve the situation by enabling users to specify a
symbol 'whitelist' at compile time. Any symbol specified in this
whitelist will be kept exported when CONFIG_TRIM_UNUSED_KSYMS is set,
even if it has no in-tree user. The whitelist is defined as a simple
text file, listing symbols, one per line.
Bug: 148277666
Acked-by: Jessica Yu <jeyu@kernel.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Tested-by: Matthias Maennich <maennich@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/lkml/20200218094139.78835-2-qperret@google.com
Change-Id: Ie9a4bbb8eebb20202623f084859fb89e55a32698
There was a desire to see COMMON_CLK_QCOM set as a module
instead of building it in. So this patch removes it and
a few dependent modules from the built in list, and adds
them to the db845c_gki.fragment file as modules.
Bug: 149414941
Change-Id: I6fecab5f529c5db1d7788e330ce8815dc22c4d1f
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Changes in 5.4.17
Bluetooth: btusb: fix non-atomic allocation in completion handler
orinoco_usb: fix interface sanity check
rsi_91x_usb: fix interface sanity check
usb: dwc3: pci: add ID for the Intel Comet Lake -V variant
usb: host: xhci-tegra: set MODULE_FIRMWARE for tegra186
USB: serial: ir-usb: add missing endpoint sanity check
USB: serial: ir-usb: fix link-speed handling
USB: serial: ir-usb: fix IrLAP framing
usb: dwc3: turn off VBUS when leaving host mode
usb: typec: wcove: fix "op-sink-microwatt" default that was in mW
usb: typec: fusb302: fix "op-sink-microwatt" default that was in mW
staging: most: net: fix buffer overflow
staging: wlan-ng: ensure error return is actually returned
staging: vt6656: correct packet types for CTS protect, mode.
staging: vt6656: use NULLFUCTION stack on mac80211
staging: vt6656: Fix false Tx excessive retries reporting.
serial: 8250_bcm2835aux: Fix line mismatch on driver unbind
serial: imx: fix a race condition in receive path
debugfs: Return -EPERM when locked down
component: do not dereference opaque pointer in debugfs
binder: fix log spam for existing debugfs file creation.
mei: hdcp: bind only with i915 on the same PCH
mei: me: add comet point (lake) H device ids
iio: adc: stm32-dfsdm: fix single conversion
iio: st_gyro: Correct data for LSM9DS0 gyro
driver core: Fix test_async_driver_probe if NUMA is disabled
crypto: chelsio - fix writing tfm flags to wrong place
CIFS: Fix task struct use-after-free on reconnect
cifs: set correct max-buffer-size for smb2_ioctl_init()
cifs: Fix memory allocation in __smb2_handle_cancelled_cmd()
ath9k: fix storage endpoint lookup
brcmfmac: fix interface sanity check
rtl8xxxu: fix interface sanity check
zd1211rw: fix storage endpoint lookup
net_sched: ematch: reject invalid TCF_EM_SIMPLE
net_sched: fix ops->bind_class() implementations
net_sched: walk through all child classes in tc_bind_tclass()
net: socionext: fix possible user-after-free in netsec_process_rx
net: socionext: fix xdp_result initialization in netsec_process_rx
udp: segment looped gso packets correctly
mlxsw: minimal: Fix an error handling path in 'mlxsw_m_port_create()'
net: include struct nhmsg size in nh nlmsg size
rxrpc: Fix use-after-free in rxrpc_receive_data()
HID: multitouch: Add LG MELF0410 I2C touchscreen support
arc: eznps: fix allmodconfig kconfig warning
HID: Add quirk for Xin-Mo Dual Controller
HID: ite: Add USB id match for Acer SW5-012 keyboard dock
HID: asus: Ignore Asus vendor-page usage-code 0xff events
HID: Add quirk for incorrect input length on Lenovo Y720
HID: intel-ish-hid: ipc: add CMP device id
HID: wacom: Recognize new MobileStudio Pro PID
ASoC: SOF: fix fault at driver unload after failed probe
ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free
drivers/hid/hid-multitouch.c: fix a possible null pointer access.
phy: qcom-qmp: Increase PHY ready timeout
ASoC: fsl_audmix: add missed pm_runtime_disable
ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime()
phy: cpcap-usb: Prevent USB line glitches from waking up modem
HID: intel-ish-hid: ipc: Add Tiger Lake PCI device ID
watchdog: max77620_wdt: fix potential build errors
watchdog: rn5t618_wdt: fix module aliases
watchdog: orion: fix platform_get_irq() complaints
usb: musb: jz4740: Silence error if code is -EPROBE_DEFER
can: tcan4x5x: tcan4x5x_parse_config(): reset device before register access
spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls
net: Google gve: Remove dma_wmb() before ringing doorbell
drivers/net/b44: Change to non-atomic bit operations on pwol_mask
net: wan: sdla: Fix cast from pointer to integer of different size
gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP
iommu/dma: fix variable 'cookie' set but not used
drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded
stmmac: debugfs entry name is not be changed when udev rename device name.
atm: eni: fix uninitialized variable warning
HID: steam: Fix input device disappearing
extcon-intel-cht-wc: Don't reset USB data connection at probe
ASoC: Intel: cht_bsw_rt5645: Add quirk for boards using pmc_plt_clk_0
drm/amdgpu/SRIOV: add navi12 pci id for SRIOV (v2)
libbpf: Fix BTF-defined map's __type macro handling of arrays
staging: mt7621-pci: add quirks for 'E2' revision using 'soc_device_attribute'
platform/x86: dell-laptop: disable kbd backlight on Inspiron 10xx
PCI: Add DMA alias quirk for Intel VCA NTB
media: dvbsky: add support for eyeTV Geniatech T2 lite
bus: ti-sysc: Handle mstandby quirk and use it for musb
bus: ti-sysc: Use swsup quirks also for am335x musb
spi: pxa2xx: Add support for Intel Comet Lake-H
iommu/amd: Support multiple PCI DMA aliases in device table
iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping
perf/imx_ddr: Add enhanced AXI ID filter support
mfd: intel-lpss: Add Intel Comet Lake PCH-H PCI IDs
ARM: config: aspeed-g5: Enable 8250_DW quirks
ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition
mmc: sdhci-pci: Quirk for AMD SDHC Device 0x7906
mmc: sdhci-pci: Add support for Intel JSL
bus: ti-sysc: Add module enable quirk for audio AESS
usb-storage: Disable UAS on JMicron SATA enclosure
ALSA: hda/realtek - Move some alc236 pintbls to fallback table
Bluetooth: Allow combination of BDADDR_PROPERTY and INVALID_BDADDR quirks
Bluetooth: btbcm: Use the BDADDR_PROPERTY quirk
bus: ti-sysc: Fix missing force mstandby quirk handling
rsi: fix use-after-free on failed probe and unbind
rsi: fix use-after-free on probe errors
rsi: fix memory leak on failed URB submission
rsi: fix non-atomic allocation in completion handler
crypto: af_alg - Use bh_lock_sock in sk_destruct
crypto: vmx - reject xts inputs that are too short
crypto: caam - do not reset pointer size from MCFGR register
crypto: pcrypt - Fix user-after-free on module unload
KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE
Revert "um: Enable CONFIG_CONSTRUCTORS"
power/supply: ingenic-battery: Don't change scale if there's only one
Linux 5.4.17
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I03dc4a2a426ff7700c26560c294bcbfc66f26e38
commit 87c9366e17 upstream.
This reverts commit 786b2384bf ("um: Enable CONFIG_CONSTRUCTORS").
There are two issues with this commit, uncovered by Anton in tests
on some (Debian) systems:
1) I completely forgot to call any constructors if CONFIG_CONSTRUCTORS
isn't set. Don't recall now if it just wasn't needed on my system, or
if I never tested this case.
2) With that fixed, it works - with CONFIG_CONSTRUCTORS *unset*. If I
set CONFIG_CONSTRUCTORS, it fails again, which isn't totally
unexpected since whatever wanted to run is likely to have to run
before the kernel init etc. that calls the constructors in this case.
Basically, some constructors that gcc emits (libc has?) need to run
very early during init; the failure mode otherwise was that the ptrace
fork test already failed:
----------------------
$ ./linux mem=512M
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...check_ptrace : child exited with exitcode 6, while expecting 0; status 0x67f
Aborted
----------------------
Thinking more about this, it's clear that we simply cannot support
CONFIG_CONSTRUCTORS in UML. All the cases we need now (gcov, kasan)
involve not use of the __attribute__((constructor)), but instead
some constructor code/entry generated by gcc. Therefore, we cannot
distinguish between kernel constructors and system constructors.
Thus, revert this commit.
Cc: stable@vger.kernel.org [5.4+]
Fixes: 786b2384bf ("um: Enable CONFIG_CONSTRUCTORS")
Reported-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
SND_VMASTER must be builtin to the GKI for leaf configs of this
config such as SND_8X0 and AC_97 to be loaded as modules.
CRYPTO_ENGINE is now used by Android userspace.
Enable as part of GKI.
Bug: 130424539
Bug: 139431025
Test: Treehugger
Change-Id: I2cd422a88a3ec0bc6bbf59d9faa3616e42cc2038
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
commit 8e57f8acbb upstream.
Commit 96a2b03f28 ("mm, debug_pagelloc: use static keys to enable
debugging") has introduced a static key to reduce overhead when
debug_pagealloc is compiled in but not enabled. It relied on the
assumption that jump_label_init() is called before parse_early_param()
as in start_kernel(), so when the "debug_pagealloc=on" option is parsed,
it is safe to enable the static key.
However, it turns out multiple architectures call parse_early_param()
earlier from their setup_arch(). x86 also calls jump_label_init() even
earlier, so no issue was found while testing the commit, but same is not
true for e.g. ppc64 and s390 where the kernel would not boot with
debug_pagealloc=on as found by our QA.
To fix this without tricky changes to init code of multiple
architectures, this patch partially reverts the static key conversion
from 96a2b03f28. Init-time and non-fastpath calls (such as in arch
code) of debug_pagealloc_enabled() will again test a simple bool
variable. Fastpath mm code is converted to a new
debug_pagealloc_enabled_static() variant that relies on the static key,
which is enabled in a well-defined point in mm_init() where it's
guaranteed that jump_label_init() has been called, regardless of
architecture.
[sfr@canb.auug.org.au: export _debug_pagealloc_enabled_early]
Link: http://lkml.kernel.org/r/20200106164944.063ac07b@canb.auug.org.au
Link: http://lkml.kernel.org/r/20191219130612.23171-1-vbabka@suse.cz
Fixes: 96a2b03f28 ("mm, debug_pagelloc: use static keys to enable debugging")
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Qian Cai <cai@lca.pw>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
QCOM_SCM is needed to be able to boot on db845c and is normally
selected by modules such as QCOM_RMTFS_MEM.
This dependency got accidentally dropped before the holidays
when I moved the QCOM_RMTFS_MEM to a module instead of a gki
built in.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Bug: 146449535
Change-Id: Icf9b6fec1d45247ee67e50d6c13c6e410e3d8c12
Add a Kconfig.gki option to enable qcom clk drivers.
This is needed as the qcom clk drivers are also used as power
domain sources. Unfortunately the powerdomain logic stops
returning EPROBE_DEFER when initcall_done is true (after
initcalls, but before modules load). This results in the drivers
(in our case, the smmu which is built in) that depend on the clk
provided power-domain to fail to load.
This issue seems to be due to the following commit, which when
reverted resolve the problem and allows dependent drivers to
still load once the clk modules are loaded:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e01afc32502555beb2057ddd74401be38475d851
I'm working with the patch author and Bjorn to try to find
a good upstream solution, but in the meantime, set the qcom
clks to =y for now.
Bug: 146449535
Change-Id: Iaf6655a22243335083c0f7b3a673e795cea68021
Signed-off-by: John Stultz <john.stultz@linaro.org>
This allows pinctrl drivers to work as a module on qcom hardware
Change-Id: I6df13dd45985751afcdaa7c27c3674f06bbbc083
Bug: 146449535
Signed-off-by: John Stultz <john.stultz@linaro.org>
In order to work with the modularized DRM_MSM driver, we
need to enable CONFIG_WANT_DEV_COREDUMP
Change-Id: Ieeab292a0aad851edd49d368156fc18fe78fccb7
Bug: 146449535
Signed-off-by: John Stultz <john.stultz@linaro.org>
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 <samitolvanen@google.com>
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 <samitolvanen@google.com>
This change adds generic support for Clang's Shadow Call Stack,
which uses a shadow stack to protect return addresses from being
overwritten by an attacker. Details are available here:
https://clang.llvm.org/docs/ShadowCallStack.html
Note that security guarantees in the kernel differ from the
ones documented for user space. The kernel must store addresses
of shadow stacks used by other tasks and interrupt handlers in
memory, which means an attacker capable reading and writing
arbitrary memory may be able to locate them and hijack control
flow by modifying shadow stacks that are not currently in use.
Bug: 145210207
Change-Id: I2a8ba6a3decac50c169731c3121c9dcab96621d2
(am from https://lore.kernel.org/patchwork/patch/1149054/)
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This reverts commit 3fde1dfb00.
Revert to the upstream version by reinstating the original
modules-for-v5.4 merge.
Bug: 142892219
Bug: 144336692
Change-Id: I3871c67dd3cba0a5b9b2e1a87be8653a14cb9de5
Signed-off-by: Matthias Maennich <maennich@google.com>
Fix missing dependency for CONFIG_VIDEOBUF2_CORE for
'allmodconfig' builds. Since CONFIG_MEDIA_SUPPORT is
always selected, drop it from gki_defconfig
Fixes: 649238947d ("ANDROID: init: GKI: enable hidden configs
for media")
Test: successful 'allmodconfig' build
Change-Id: I1dd5ff154c1aeb90457c23dc233cb32595bd9bed
Signed-off-by: Todd Kjos <tkjos@google.com>
Add hidden configs to GKI_HACKS_to_fIX so they are
enabled for loadable media modules build out-of-tree
Bug: 142892658
Test: Built for arm64/x86_64. Boot on cuttlefish
Change-Id: I137a89f69822332324a1f4a3a1150be9cd66709d
Signed-off-by: Todd Kjos <tkjos@google.com>
SND_PCM_ELD is used by DRM drivers for HDMI audio,
so add it to the HIDDEN_DRM configs.
Bug: 142268770
Change-Id: I914beef34b2cf5174da76a5d1a4d443117f1b687
Signed-off-by: John Stultz <john.stultz@linaro.org>
This reverts commit e070355664, reversing
changes made to 8808cf8cbc.
Introducing symbol-namespaces into the kernel has caused issues with
respect to the ABI checker. Hence, revert the changes until a valid
fix is available. The revert was done based off of 5.4-rc1.
Change-Id: I529ced269661f457ce667a76eb383843002f0a7d
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
To make the 5.4-rc1 merge easier, merge at a prerelease point in time
before the final release happens.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If613d657fd0abf9910c5bf3435a745f01b89765e
Pull kernel lockdown mode from James Morris:
"This is the latest iteration of the kernel lockdown patchset, from
Matthew Garrett, David Howells and others.
From the original description:
This patchset introduces an optional kernel lockdown feature,
intended to strengthen the boundary between UID 0 and the kernel.
When enabled, various pieces of kernel functionality are restricted.
Applications that rely on low-level access to either hardware or the
kernel may cease working as a result - therefore this should not be
enabled without appropriate evaluation beforehand.
The majority of mainstream distributions have been carrying variants
of this patchset for many years now, so there's value in providing a
doesn't meet every distribution requirement, but gets us much closer
to not requiring external patches.
There are two major changes since this was last proposed for mainline:
- Separating lockdown from EFI secure boot. Background discussion is
covered here: https://lwn.net/Articles/751061/
- Implementation as an LSM, with a default stackable lockdown LSM
module. This allows the lockdown feature to be policy-driven,
rather than encoding an implicit policy within the mechanism.
The new locked_down LSM hook is provided to allow LSMs to make a
policy decision around whether kernel functionality that would allow
tampering with or examining the runtime state of the kernel should be
permitted.
The included lockdown LSM provides an implementation with a simple
policy intended for general purpose use. This policy provides a coarse
level of granularity, controllable via the kernel command line:
lockdown={integrity|confidentiality}
Enable the kernel lockdown feature. If set to integrity, kernel features
that allow userland to modify the running kernel are disabled. If set to
confidentiality, kernel features that allow userland to extract
confidential information from the kernel are also disabled.
This may also be controlled via /sys/kernel/security/lockdown and
overriden by kernel configuration.
New or existing LSMs may implement finer-grained controls of the
lockdown features. Refer to the lockdown_reason documentation in
include/linux/security.h for details.
The lockdown feature has had signficant design feedback and review
across many subsystems. This code has been in linux-next for some
weeks, with a few fixes applied along the way.
Stephen Rothwell noted that commit 9d1f8be5cf ("bpf: Restrict bpf
when kernel lockdown is in confidentiality mode") is missing a
Signed-off-by from its author. Matthew responded that he is providing
this under category (c) of the DCO"
* 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (31 commits)
kexec: Fix file verification on S390
security: constify some arrays in lockdown LSM
lockdown: Print current->comm in restriction messages
efi: Restrict efivar_ssdt_load when the kernel is locked down
tracefs: Restrict tracefs when the kernel is locked down
debugfs: Restrict debugfs when the kernel is locked down
kexec: Allow kexec_file() with appropriate IMA policy when locked down
lockdown: Lock down perf when in confidentiality mode
bpf: Restrict bpf when kernel lockdown is in confidentiality mode
lockdown: Lock down tracing and perf kprobes when in confidentiality mode
lockdown: Lock down /proc/kcore
x86/mmiotrace: Lock down the testmmiotrace module
lockdown: Lock down module params that specify hardware parameters (eg. ioport)
lockdown: Lock down TIOCSSERIAL
lockdown: Prohibit PCMCIA CIS storage when the kernel is locked down
acpi: Disable ACPI table override if the kernel is locked down
acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down
ACPI: Limit access to custom_method when the kernel is locked down
x86/msr: Restrict MSR access when the kernel is locked down
x86: Lock down IO port access when the kernel is locked down
...
Pull integrity updates from Mimi Zohar:
"The major feature in this time is IMA support for measuring and
appraising appended file signatures. In addition are a couple of bug
fixes and code cleanup to use struct_size().
In addition to the PE/COFF and IMA xattr signatures, the kexec kernel
image may be signed with an appended signature, using the same
scripts/sign-file tool that is used to sign kernel modules.
Similarly, the initramfs may contain an appended signature.
This contained a lot of refactoring of the existing appended signature
verification code, so that IMA could retain the existing framework of
calculating the file hash once, storing it in the IMA measurement list
and extending the TPM, verifying the file's integrity based on a file
hash or signature (eg. xattrs), and adding an audit record containing
the file hash, all based on policy. (The IMA support for appended
signatures patch set was posted and reviewed 11 times.)
The support for appended signature paves the way for adding other
signature verification methods, such as fs-verity, based on a single
system-wide policy. The file hash used for verifying the signature and
the signature, itself, can be included in the IMA measurement list"
* 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
ima: ima_api: Use struct_size() in kzalloc()
ima: use struct_size() in kzalloc()
sefltest/ima: support appended signatures (modsig)
ima: Fix use after free in ima_read_modsig()
MODSIGN: make new include file self contained
ima: fix freeing ongoing ahash_request
ima: always return negative code for error
ima: Store the measurement again when appraising a modsig
ima: Define ima-modsig template
ima: Collect modsig
ima: Implement support for module-style appended signatures
ima: Factor xattr_verify() out of ima_appraise_measurement()
ima: Add modsig appraise_type option for module-style appended signatures
integrity: Select CONFIG_KEYS instead of depending on it
PKCS#7: Introduce pkcs7_get_digest()
PKCS#7: Refactor verify_pkcs7_signature()
MODSIGN: Export module signature definitions
ima: initialize the "template" field with the default template
Both pgtable_cache_init() and pgd_cache_init() are used to initialize kmem
cache for page table allocations on several architectures that do not use
PAGE_SIZE tables for one or more levels of the page table hierarchy.
Most architectures do not implement these functions and use __weak default
NOP implementation of pgd_cache_init(). Since there is no such default
for pgtable_cache_init(), its empty stub is duplicated among most
architectures.
Rename the definitions of pgd_cache_init() to pgtable_cache_init() and
drop empty stubs of pgtable_cache_init().
Link: http://lkml.kernel.org/r/1566457046-22637-1-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Will Deacon <will@kernel.org> [arm64]
Acked-by: Thomas Gleixner <tglx@linutronix.de> [x86]
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Currently kmemleak uses a static early_log buffer to trace all memory
allocation/freeing before the slab allocator is initialised. Such early
log is replayed during kmemleak_init() to properly initialise the kmemleak
metadata for objects allocated up that point. With a memory pool that
does not rely on the slab allocator, it is possible to skip this early log
entirely.
In order to remove the early logging, consider kmemleak_enabled == 1 by
default while the kmem_cache availability is checked directly on the
object_cache and scan_area_cache variables. The RCU callback is only
invoked after object_cache has been initialised as we wouldn't have any
concurrent list traversal before this.
In order to reduce the number of callbacks before kmemleak is fully
initialised, move the kmemleak_init() call to mm_init().
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: remove WARN_ON(), per Catalin]
Link: http://lkml.kernel.org/r/20190812160642.52134-4-catalin.marinas@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Qian Cai <cai@lca.pw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
To make the 5.4-rc1 merge easier, merge at a prerelease point in time
before the final release happens.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I29b683c837ed1a3324644dbf9bf863f30740cd0b
Pull modules updates from Jessica Yu:
"The main bulk of this pull request introduces a new exported symbol
namespaces feature. The number of exported symbols is increasingly
growing with each release (we're at about 31k exports as of 5.3-rc7)
and we currently have no way of visualizing how these symbols are
"clustered" or making sense of this huge export surface.
Namespacing exported symbols allows kernel developers to more
explicitly partition and categorize exported symbols, as well as more
easily limiting the availability of namespaced symbols to other parts
of the kernel. For starters, we have introduced the USB_STORAGE
namespace to demonstrate the API's usage. I have briefly summarized
the feature and its main motivations in the tag below.
Summary:
- Introduce exported symbol namespaces.
This new feature allows subsystem maintainers to partition and
categorize their exported symbols into explicit namespaces. Module
authors are now required to import the namespaces they need.
Some of the main motivations of this feature include: allowing
kernel developers to better manage the export surface, allow
subsystem maintainers to explicitly state that usage of some
exported symbols should only be limited to certain users (think:
inter-module or inter-driver symbols, debugging symbols, etc), as
well as more easily limiting the availability of namespaced symbols
to other parts of the kernel.
With the module import requirement, it is also easier to spot the
misuse of exported symbols during patch review.
Two new macros are introduced: EXPORT_SYMBOL_NS() and
EXPORT_SYMBOL_NS_GPL(). The API is thoroughly documented in
Documentation/kbuild/namespaces.rst.
- Some small code and kbuild cleanups here and there"
* tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
module: Remove leftover '#undef' from export header
module: remove unneeded casts in cmp_name()
module: move CONFIG_UNUSED_SYMBOLS to the sub-menu of MODULES
module: remove redundant 'depends on MODULES'
module: Fix link failure due to invalid relocation on namespace offset
usb-storage: export symbols in USB_STORAGE namespace
usb-storage: remove single-use define for debugging
docs: Add documentation for Symbol Namespaces
scripts: Coccinelle script for namespace dependencies.
modpost: add support for generating namespace dependencies
export: allow definition default namespaces in Makefiles or sources
module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
modpost: add support for symbol namespaces
module: add support for symbol namespaces.
export: explicitly align struct kernel_symbol
module: support reading multiple values per modinfo tag
Pull UML updates from Richard Weinberger:
- virtio support
- fixes for our new time travel mode
- various improvements to make lockdep and kasan work better
- SPDX header updates
* tag 'for-linus-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (25 commits)
um: irq: Fix LAST_IRQ usage in init_IRQ()
um: Add SPDX headers for files in arch/um/include
um: Add SPDX headers for files in arch/um/os-Linux
um: Add SPDX headers to files in arch/um/kernel/
um: Add SPDX headers for files in arch/um/drivers
um: virtio: Implement VHOST_USER_PROTOCOL_F_REPLY_ACK
um: virtio: Implement VHOST_USER_PROTOCOL_F_SLAVE_REQ
um: drivers: Add virtio vhost-user driver
um: Use real DMA barriers
um: Don't use generic barrier.h
um: time-travel: Restrict time update in IRQ handler
um: time-travel: Fix periodic timers
um: Enable CONFIG_CONSTRUCTORS
um: Place (soft)irq text with macros
um: Fix VDSO compiler warning
um: Implement TRACE_IRQFLAGS_SUPPORT
um: Remove misleading #define ARCh_IRQ_ENABLED
um: Avoid using uninitialized regs
um: Remove sig_info[SIGALRM]
um: Error handling fixes in vector drivers
...
Pull asm inline support from Miguel Ojeda:
"Make use of gcc 9's "asm inline()" (Rasmus Villemoes):
gcc 9+ (and gcc 8.3, 7.5) provides a way to override the otherwise
crude heuristic that gcc uses to estimate the size of the code
represented by an asm() statement. From the gcc docs
If you use 'asm inline' instead of just 'asm', then for inlining
purposes the size of the asm is taken as the minimum size, ignoring
how many instructions GCC thinks it is.
For compatibility with older compilers, we obviously want a
#if [understands asm inline]
#define asm_inline asm inline
#else
#define asm_inline asm
#endif
But since we #define the identifier inline to attach some attributes,
we have to use an alternate spelling of that keyword. gcc provides
both __inline__ and __inline, and we currently #define both to inline,
so they all have the same semantics.
We have to free up one of __inline__ and __inline, and the latter is
by far the easiest.
The two x86 changes cause smaller code gen differences than I'd
expect, but I think we do want the asm_inline thing available sooner
or later, so this is just to get the ball rolling"
* tag 'compiler-attributes-for-linus-v5.4' of git://github.com/ojeda/linux:
x86: bug.h: use asm_inline in _BUG_FLAGS definitions
x86: alternative.h: use asm_inline for all alternative variants
compiler-types.h: add asm_inline definition
compiler_types.h: don't #define __inline
lib/zstd/mem.h: replace __inline by inline
staging: rtl8723bs: replace __inline by inline
This merges Linus's tree as of commit b41dae061b ("Merge tag
'xfs-5.4-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux")
into android-mainline.
This "early" merge makes it easier to test and handle merge conflicts
instead of having to wait until the "end" of the merge window and handle
all 10000+ commits at once.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6bebf55e5e2353f814e3c87f5033607b1ae5d812
In embedded environments the requirements are to be able to pick and
chose which features one requires built into the kernel. If an
embedded environment wants to supports loading modules that have been
kbuilt out of tree, there is a need to enable hidden configurations
for legacy wireless core features to provide the API surface for
them to load.
Introduce CONFIG_GKI_LEGACY_WEXT_ALLCONFIG to select all legacy wireless
extension core features by activating in turn all the associated
hidden configuration options, without having to specifically select
any wireless module(s).
(rejected upstream commit url https://lkml.org/lkml/2019/9/6/878)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 140250271
Change-Id: Ie40e656d87ce21ae82f04ffe8dae2f0efab88a2e
Pull Kbuild updates from Masahiro Yamada:
- add modpost warn exported symbols marked as 'static' because 'static'
and EXPORT_SYMBOL is an odd combination
- break the build early if gold linker is used
- optimize the Bison rule to produce .c and .h files by a single
pattern rule
- handle PREEMPT_RT in the module vermagic and UTS_VERSION
- warn CONFIG options leaked to the user-space except existing ones
- make single targets work properly
- rebuild modules when module linker scripts are updated
- split the module final link stage into scripts/Makefile.modfinal
- fix the missed error code in merge_config.sh
- improve the error message displayed on the attempt of the O= build in
unclean source tree
- remove 'clean-dirs' syntax
- disable -Wimplicit-fallthrough warning for Clang
- add CONFIG_CC_OPTIMIZE_FOR_SIZE_O3 for ARC
- remove ARCH_{CPP,A,C}FLAGS variables
- add $(BASH) to run bash scripts
- change *CFLAGS_<basetarget>.o to take the relative path to $(obj)
instead of the basename
- stop suppressing Clang's -Wunused-function warnings when W=1
- fix linux/export.h to avoid genksyms calculating CRC of trimmed
exported symbols
- misc cleanups
* tag 'kbuild-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (63 commits)
genksyms: convert to SPDX License Identifier for lex.l and parse.y
modpost: use __section in the output to *.mod.c
modpost: use MODULE_INFO() for __module_depends
export.h, genksyms: do not make genksyms calculate CRC of trimmed symbols
export.h: remove defined(__KERNEL__), which is no longer needed
kbuild: allow Clang to find unused static inline functions for W=1 build
kbuild: rename KBUILD_ENABLE_EXTRA_GCC_CHECKS to KBUILD_EXTRA_WARN
kbuild: refactor scripts/Makefile.extrawarn
merge_config.sh: ignore unwanted grep errors
kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)
modpost: add NOFAIL to strndup
modpost: add guid_t type definition
kbuild: add $(BASH) to run scripts with bash-extension
kbuild: remove ARCH_{CPP,A,C}FLAGS
kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC
kbuild: Do not enable -Wimplicit-fallthrough for clang for now
kbuild: clean up subdir-ymn calculation in Makefile.clean
kbuild: remove unneeded '+' marker from cmd_clean
kbuild: remove clean-dirs syntax
kbuild: check clean srctree even earlier
...
Add hidden configs to GKI_HACKS_TO_FIX so they are
enabled for loadable GPIO modules built out-of-tree
Bug: 141266428
Change-Id: Ie6e79921df67e86783f04cb869604c988656a034
Signed-off-by: Todd Kjos <tkjos@google.com>
Add hidden configs to GKI_HACKS_TO_FIX so they are
enabled for loadable SND_SOC modules built out-of-tree
Bug: 141266428
Change-Id: I4782b5bb401a76c647bac41258c1371762dace1c
Signed-off-by: Todd Kjos <tkjos@google.com>