Commit Graph

872039 Commits

Author SHA1 Message Date
lesl
39bb6b4242 ANDROID: virt_wifi: Add data ops for scan data simulation
Bug: 139421123
Signed-off-by: lesl <lesl@google.com>
Change-Id: Ib686dffe23cc234937af7e383182834721f01d78
Signed-off-by: Alistair Delva <adelva@google.com>
2019-10-26 01:16:30 +00:00
Jason Macnak
6e1eaaea3c ANDROID: Allow DRM_IOCTL_MODE_*_DUMB for render clients.
Minigbm uses dumb ioctls when the virtio gpu is in 2D mode. This
changes allows those calls to pass the permission checks in
drm_ioctl_permit().

Bug: b/123764798
Test: booted cuttlefish on drm stack w/o 3d
Change-Id: I872ba8f6d0a284127178dd60f8a2048e5e7397fb
Signed-off-by: Jason Macnak <natsu@google.com>
Signed-off-by: Alistair Delva <adelva@google.com>
2019-10-26 00:45:36 +00:00
Connor O'Brien
18b7a1479e ANDROID: cpufreq: create dummy cpufreq driver
/proc/uid_time_in_state has no data on cuttlefish because its cpu
frequency tables are empty. Because time in state & concurrent time
accounting are intertwined this causes the
/proc/uid_concurrent_{policy,active}_time files to also not contain
any data.

Add a minimal, fake cpufreq driver that creates a freq table with 2
frequencies per policy, to allow testing time in state functionality.

Test: all 3 proc files show reasonable data on cuttlefish
Test: log shows no errors from bad /proc/uid_time_in_state format
Bug: 139763108
Bug: 140796321
Bug: 141206930
Change-Id: I8c7fe1007a80c21a9bcba9455bf837947cf42963
Signed-off-by: Connor O'Brien <connoro@google.com>
2019-10-25 23:22:48 +00:00
Matthias Maennich
0a39c7fe72 Revert "ANDROID: x86: Remove a useless warning message"
This reverts commit 1f1098e0a3.

Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-25 19:53:41 +00:00
Todd Kjos
649238947d ANDROID: init: GKI: enable hidden configs for media
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>
2019-10-25 19:40:13 +00:00
Todd Kjos
6f2fe74a1b ANDROID: gki_defconfig: add FORTIFY_SOURCE, remove SPMI_MSM_PMIC_ARB
Force SPMI_MSM_PMIC_ARB off and enable FORTIFY_SOURCE for GKI

Bug: 142896904
Bug: 134087016
Test: Build/Boot on cuttlefish
Change-Id: Ib6e501f1efee2349d750010a53572dddcb5457c5
Signed-off-by: Todd Kjos <tkjos@google.com>
2019-10-25 19:38:56 +00:00
Nick Desaulniers
9d6c0b6fbb Revert "Revert "Revert "Revert "x86/mm: Identify the end of the kernel area to be reserved""""
This reverts commit e78f95acac.

This adds back the original
commit c603a309cc ("x86/mm: Identify the end of the kernel area to be reserved")

Bug: 138463564
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ia01a9b914beebf392a670f8b8238ebceeb361a1d
2019-10-25 18:56:14 +00:00
Nick Desaulniers
7a5e47a1a8 build.config.*: Link android-mainline kernels with LLD
We've been building mainline x86_64 with LLD for months now, and don't
plan to upgrade Android's binutils to work around issues upstream
related to:

commit c603a309cc ("x86/mm: Identify the end of the kernel area to be reserved")

Bug: 138463564
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ic52f7f374c494e5d39efb758a7739ebd33799f49
2019-10-25 18:56:06 +00:00
Banajit Goswami
3cf5c71422 ANDROID: ALSA: jack: Update supported jack switch types
Change adds support for jack switch types supported
by platform.

This change also squashes the below changes-

include: increase allowed SW INPUT device ID from 15 to 32

Increase the Input device SW ID from 15 to 32. This is needed
to accommodate more input devices.

Bug: 142489397
Change-Id: If77f8b37b4db72ada2b5d8a3095265eef90ab62b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2019-10-25 18:03:51 +00:00
Xiaojun Sang
51a518ad90 ANDROID: ASoC: compress: fix unsigned integer overflow check
Parameter fragments and fragment_size are type of u32. U32_MAX is
the correct check.

CRs-Fixed: 1014726
Bug: 142489397
Change-Id: Ia6d4755408646ac4a75724f3c6f2177651875da3
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2019-10-25 18:03:16 +00:00
Isaac J. Manjarres
82047fdd5d FROMLIST: iommu: Export core IOMMU functions to kernel modules
IOMMU drivers that can be compiled as modules need to use
some of the IOMMU core functions, so expose them.

Change-Id: I84004fdcd7eee3f56d08db76c3b0421990179810
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Bug: 140290589
Link: https://patchwork.kernel.org/patch/10948413/
2019-10-25 09:53:36 -07:00
Isaac J. Manjarres
c32fef399d FROMLIST: PCI: Export PCI ACS and DMA searching functions to modules
IOMMU drivers that can be compiled as modules may
want to use pci_for_each_dma_alias() and pci_request_acs(),
so export those functions.

Change-Id: I8fab4075d151cc3d07a6594685895a189565bb3d
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Bug: 140290589
Link: https://patchwork.kernel.org/patch/10948411/
2019-10-25 09:52:30 -07:00
Isaac J. Manjarres
ebc7824f47 FROMLIST: of: Export of_phandle_iterator_args() to modules
Kernel modules may want to use of_phandle_iterator_args(),
so export it.

Change-Id: Ic42b0917834669dd4dc6930081581d66381c7d5a
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Acked-by: Rob Herring <robh@kernel.org>
Bug: 140290589
Link: https://patchwork.kernel.org/patch/10948415/
2019-10-25 09:51:12 -07:00
Maulik Shah
7bb1346954 ANDROID: soc: qcom: Add required header to irq.h
Add required header file to fix compiler reported errors.

BUG: 141169320
TEST: Build and boot

Fixes: 736036d738 ("FROMLIST: drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs")
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Change-Id: Ie1503213bdc7432f36d065f8487e71e37cfe8532
2019-10-25 15:20:02 +05:30
Maheshwar Ajja
584739f5dd ANDROID: v4l2-compat-ioctl32.c: copy reserved fields
Copy reserved fields along with other fields in v4l2_plane
for userspace clients and drivers to use reserved fields
when required.

Bug: 143160749
Change-Id: I0c7e7485961ab50188cda6ae81998473500bb07b
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-10-25 00:29:12 +00:00
Saravana Kannan
f4d0973e4f ANDROID: of: property: Enable of_devlink by default
The of_devlink feature creates device links between devices based on
the common device tree bindings listed in their device node. This
allows improved probe ordering and also makes sure the sync_state()
calls to the device drivers come only after all the consumers of a
device have probed successfully.

Enable this by default on Android since this is required to ease
modularization efforts for GKI.

Bug: 143308885
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I57c44e74e35d829ae2ae3145dc241ccf348f2eea
2019-10-24 15:48:48 -07:00
Saravana Kannan
454aa2ae22 ANDROID: of: property: Make sure child dependencies don't block probing of parent
When creating device links to proxy the sync_state() needs of child
dependencies, create SYNC_STATE_ONLY device links so that children
dependencies don't block probing of the parent.

Also, differentiate between missing suppliers of parent device vs
missing suppliers of child devices so that driver core doesn't block
parent device probing when only child supplier dependencies are missing.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Bug: 142657042
Change-Id: Ifc63e36f6af6f48ec77215d0a2a609ff768e0fcb
2019-10-24 20:54:20 +00:00
Saravana Kannan
5415ddfa94 ANDROID: driver core: Allow fwnode_operations.add_links to differentiate errors
When add_links() still has suppliers that it needs to link to in the
future, this patch allows it to differentiate between suppliers that are
needed for probing vs suppliers are needed for sync_state() correctness.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Bug: 142657042
Change-Id: If8b2a11dc6d815287c9242aea0ee1c26ef316d96
2019-10-24 20:54:01 +00:00
Saravana Kannan
b713505f71 ANDROID: driver core: Allow a device to wait on optional suppliers
Before this change, if a device is waiting on suppliers, it's assumed
that all those suppliers are needed for the device to probe
successfully. This change allows marking a devices as waiting only on
optional suppliers. This allows a device to wait on suppliers (and link
to them as soon as they are available) without preventing the device
from being probed.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Bug: 142657042
Change-Id: I86a764b67804ed889f17c55632e25d46a72912a8
2019-10-24 20:53:40 +00:00
Saravana Kannan
603dbeabed ANDROID: driver core: Add device link support for SYNC_STATE_ONLY flag
Parent devices might need to create "proxy" device links from themselves
to supplier devices to make sure the supplier devices don't get a
sync_state() before the child consumer devices get a chance to add
device links to the supplier devices.

However, the parent device has no real dependency on the supplier device
and probing, suspend/resume or runtime PM don't need to be affected by
the supplier device.  To capture these cases, create a SYNC_STATE_ONLY
device link flag that only affects sync_state() behavior and doesn't
affect probing, suspend/resume or runtime PM.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Bug: 142657042
Change-Id: Ie709d3b6cd07ac9e09d1473fc0e0a21a8146a1dc
2019-10-24 20:53:27 +00:00
Saravana Kannan
2d4a45a838 FROMGIT: docs: driver-model: Add documentation for sync_state
The sync_state() driver callback was added recently, but the
documentation was missing.  Adding it now.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20191011191521.179614-4-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry-pick from commit a3caeb8ffe
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Bug: 142657042
Change-Id: I7ee9c61be93fb247759dbd6d90214c6994fe1bb0
2019-10-24 20:53:16 +00:00
Saravana Kannan
0e7ec28830 FROMGIT: driver: core: Improve documentation for fwnode_operations.add_links()
The add_links() ops shouldn't return on the first failed device link
add. It needs to continue trying to add device links to other suppliers
that are available. The documentation didn't explain WHY this behavior
is necessary. So, update the documentation with an example that explains
why this is necessary.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20191011191521.179614-3-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry-pick from commit 92df01e360
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Bug: 142657042
Change-Id: I58621ad08084fee1ab9725026e54abe7eb79b741
2019-10-24 20:53:03 +00:00
Saravana Kannan
e8f92ffd70 FROMGIT: of: property: Minor code formatting/style clean ups
Better variable and function names. Remove "," after the sentinel in an
array initialization list.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20191011191521.179614-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry-picked from commit af1b967af5
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Conflicts: drivers/of/property.c
[Fixed minor conflict due to 87337fb791]
Bug: 142657042
Change-Id: I86356be325b17676452b9ad93fe4a96235dbef0b
Signed-off-by: Saravana Kannan <saravanak@google.com>
2019-10-24 20:52:47 +00:00
Lina Iyer
a59c2b6675 FROMLIST: drivers: pinctrl: msm: setup GPIO chip in hierarchy
Some GPIOs are marked as wakeup capable and are routed to another
interrupt controller that is an always-domain and can detect interrupts
even most of the SoC is powered off. The wakeup interrupt controller
wakes up the GIC and replays the interrupt at the GIC.

Setup the TLMM irqchip in hierarchy with the wakeup interrupt controller
and ensure the wakeup GPIOs are handled correctly.

Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Ic37caf65e5d384234d8197d27b3d62cefa2bea7f
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145345
2019-10-24 15:31:30 +00:00
Maulik Shah
25a0afd115 FROMLIST: drivers: irqchip: pdc: Add irqchip set/get state calls
Add irqchip calls to set/get interrupt state from the parent interrupt
controller. When GPIOs are renabled as interrupt lines, it is desirable
to clear the interrupt state at the GIC. This avoids any unwanted
interrupt as a result of stale pending state recorded when the line was
used as a GPIO.

Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
[updated commit text]
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Ie0042161727f2c8b1ebe0dd2165cbc4f20612f30
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145349
2019-10-24 15:31:22 +00:00
Maulik Shah
2d4940748d FROMLIST: genirq: Introduce irq_chip_get/set_parent_state calls
On certain QTI chipsets some GPIOs are direct-connect interrupts to the
GIC to be used as regular interrupt lines. When the GPIOs are not used
for interrupt generation the interrupt line is disabled. But disabling
the interrupt at GIC does not prevent the interrupt to be reported as
pending at GIC_ISPEND. Later, when drivers call enable_irq() on the
interrupt, an unwanted interrupt occurs.

Introduce get and set methods for irqchip's parent to clear it's pending
irq state. This then can be invoked by the GPIO interrupt controller on
the parents in it hierarchy to clear the interrupt before enabling the
interrupt.

Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
[updated commit text and minor code fixes]
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I8c849f89bebca892fc8a5c94f1ca9492f2a9d49c
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145351
2019-10-24 15:31:14 +00:00
Lina Iyer
97b1fe8e66 FROMLIST: drivers: irqchip: pdc: additionally set type in SPI config registers
GPIOs that can be configured as wakeup are routed to the PDC wakeup
interrupt controller and from there to the GIC interrupt controller. On
some QCOM SoCs, the interface to the GIC for wakeup capable GPIOs have
additional hardware registers that need to be configured as well to
match the trigger type of the GPIO. This register interfaces the PDC to
the GIC and therefore updated from the PDC driver.

Typically, the firmware intializes the interface registers for the
wakeup capable GPIOs with commonly used GPIO trigger type, but it is
possible that a platform may want to use the GPIO differently. So, in
addition to configuring the PDC, configure the interface registers as
well.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I73250a04f67549dbf75c40b3672b6b1b78ff8adb
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145353
2019-10-24 15:31:06 +00:00
Lina Iyer
0c347bec82 FROMLIST: dt-bindings/interrupt-controller: pdc: add SPI config register
In addition to configuring the PDC, additional registers that interface
the GIC have to be configured to match the GPIO type. The registers on
some QCOM SoCs are access restricted, while on other SoCs are not. They
SoCs with access restriction to these SPI registers need to be written
from the firmware using the SCM interface. Add a flag to indicate if the
register is to be written using SCM interface.

Cc: devicetree@vger.kernel.org
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I0f6dfc11fc4df4b0744b7c9372eaf4c7be3a82d6
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145355
2019-10-24 15:30:57 +00:00
Lina Iyer
18af63b34e FROMLIST: of: irq: document properties for wakeup interrupt parent
Some interrupt controllers in a SoC, are always powered on and have a
select interrupts routed to them, so that they can wakeup the SoC from
suspend. Add wakeup-parent DT property to refer to these interrupt
controllers.

Cc: devicetree@vger.kernel.org
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Idf50e6db657e9d08e369878c261c0d781523ce35
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145359
2019-10-24 15:30:47 +00:00
Lina Iyer
736036d738 FROMLIST: drivers: irqchip: add PDC irqdomain for wakeup capable GPIOs
Introduce a new domain for wakeup capable GPIOs. The domain can be
requested using the bus token DOMAIN_BUS_WAKEUP. In the following
patches, we will specify PDC as the wakeup-parent for the TLMM GPIO
irqchip. Requesting a wakeup GPIO will setup the GPIO and the
corresponding PDC interrupt as its parent.

Co-developed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Iaec0f39c86776d3f8cebe869c4ccaaba541c7ad5
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145357
2019-10-24 15:30:31 +00:00
Lina Iyer
8c77c18adc FROMLIST: drivers: irqchip: pdc: Do not toggle IRQ_ENABLE during mask/unmask
When an interrupt is to be serviced, the convention is to mask the
interrupt at the chip and unmask after servicing the interrupt. Enabling
and disabling the interrupt at the PDC irqchip causes an interrupt storm
due to the way dual edge interrupts are handled in hardware.

Skip configuring the PDC when the IRQ is masked and unmasked, instead
use the irq_enable/irq_disable callbacks to toggle the IRQ_ENABLE
register at the PDC. The PDC's IRQ_ENABLE register is only used during
the monitoring mode when the system is asleep and is not needed for
active mode detection.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: Ia5827a509bfb47aaa18ed0ea8f61c74f643fa91f
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145361
2019-10-24 15:30:20 +00:00
Lina Iyer
68bb4012e2 FROMLIST: drivers: irqchip: qcom-pdc: update max PDC interrupts
Newer SoCs have increased the number of interrupts routed to the PDC
interrupt controller. Update the definition of max PDC interrupts.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I97f548fcd42a5fef63b8f8cbea9470e83f5e8e3e
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145363
2019-10-24 15:30:08 +00:00
Lina Iyer
808a504f39 FROMLIST: irqdomain: add bus token DOMAIN_BUS_WAKEUP
A single controller can handle normal interrupts and wake-up interrupts
independently, with a different numbering space. It is thus crucial to
allow the driver for such a controller discriminate between the two.

A simple way to do so is to tag the wake-up irqdomain with a "bus token"
that indicates the wake-up domain. This slightly abuses the notion of
bus, but also radically simplifies the design of such a driver. Between
two evils, we choose the least damaging.

Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>

BUG: 141169320
TEST: Build and boot

Change-Id: I0fd6ccc288d1aa840d88392e5f57197c1e8d1afb
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://patchwork.kernel.org/patch/11145365
2019-10-24 15:29:50 +00:00
Matthias Maennich
301b74470d ANDROID: drop patches/ symbolic link
This is only valid in repo checkouts and caused issues when rebasing on
top. Hence drop it for now until a better solution can be found.

Change-Id: If06560c131a57f2e6d82966f9adf3ca628b2468a
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-24 09:48:15 +01:00
Matthias Maennich
780450bc36 ANDROID: Revert "ANDROID: Removed check for asm-goto"
This reverts commit 7eb28048b0.

Change-Id: Ibb4775f9d11d5a5e413204855f8ccbcad6777b3d
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-23 21:55:48 +00:00
Eric Biggers
2b6ff0224c ANDROID: sdcardfs: evict dentries on fscrypt key removal
Use the fscrypt key removal notifier chain to make sdcardfs evict its
dentries when an fscrypt key is about to be removed.  This is needed for
the FS_IOC_REMOVE_ENCRYPTION_KEY ioctl to properly "lock" the encrypted
files underneath sdcardfs when an Android user is stopped.

Test: pm create-user 10
      am start-user 10
      find /data/media/10/    # filenames are in plaintext form
      am stop-user 10
      find /data/media/10/    # filenames are in ciphertext form

      (But currently the kernel and vold still warn about other files
      still being open, due to b/140762419)

Bug: 120446149
Bug: 142275883
Change-Id: I83b451a2bc40c72fcd01d24aa5c34ad8de427534
Signed-off-by: Eric Biggers <ebiggers@google.com>
2019-10-23 21:19:54 +00:00
Eric Biggers
98261f39e9 ANDROID: fscrypt: add key removal notifier chain
Add a notifier chain so that sdcardfs can evict its dentries when an
fscrypt key is about to be removed.  This is needed for the
FS_IOC_REMOVE_ENCRYPTION_KEY ioctl to properly "lock" the encrypted
files underneath sdcardfs when an Android user is stopped.

This is meant to be a temporary patch carried as part of the sdcardfs
patchset until either we stop using sdcardfs, we get sdcardfs upstream,
or we find a way to provide what sdcardfs needs while also benefitting a
user upstream.

Bug: 120446149
Bug: 142275883
Test: see I83b451a2bc40c72fcd01d24aa5c34ad8de427534
Change-Id: Iec79775a71057d05a371d77da4a6541cb8e09cb7
Signed-off-by: Eric Biggers <ebiggers@google.com>
2019-10-23 21:19:43 +00:00
DongJoo Kim
91e5e077d8 ANDROID: move up spin_unlock_bh() ahead of remove_proc_entry()
It causes BUG because remove_proc_entry may sleep while holding spinlock.

BUG: scheduling while atomic: ip6tables-resto/887/0x00000202
[<c0f03f00>] (wait_for_completion) from [<c031b8c8>] (proc_entry_rundown+0x74/0xd0)
[<c031b854>] (proc_entry_rundown) from [<c03225c4>] (remove_proc_entry+0xc0/0x18c)
[<c0322504>] (remove_proc_entry) from [<c0d656e0>] (quota_mt2_destroy+0x88/0xa8)
[<c0d65658>] (quota_mt2_destroy) from [<c0e405f0>] (cleanup_entry+0x6c/0xf0)
[<c0e40584>] (cleanup_entry) from [<c0e41400>] (do_replace.constprop.2+0x314/0x438)
[<c0e410ec>] (do_replace.constprop.2) from [<c0e41640>] (do_ip6t_set_ctl+0x11c/0x238)
[<c0e41524>] (do_ip6t_set_ctl) from [<c0d2e7ec>] (nf_setsockopt+0xd4/0xf0)
[<c0d2e718>] (nf_setsockopt) from [<c0e16bb8>] (ipv6_setsockopt+0x90/0xb8)
[<c0e16b28>] (ipv6_setsockopt) from [<c0e1e908>] (rawv6_setsockopt+0x54/0x22c)
[<c0e1e8b4>] (rawv6_setsockopt) from [<c0cb48dc>] (sock_common_setsockopt+0x28/0x30)
[<c0cb48b4>] (sock_common_setsockopt) from [<c0cb3ac8>] (SyS_setsockopt+0xb8/0x110)
[<c0cb3a10>] (SyS_setsockopt) from [<c01094e0>] (ret_fast_syscall+0x0/0x48)

This is a fix for an Android specific feature which was imported
from unofficial upstream (xtables-addons), which also has the same issue:
  https://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/extensions/xt_quota2.c#l235

After this change the proc entry may now be removed later, when we're already
adding another one, potentially with the same name, this will simply
fail during creation, see error path for this at:
  https://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/extensions/xt_quota2.c#l179

Bug: 143092160
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: DongJoo Kim <micomx@gmail.com>
Change-Id: I3ff3883738353785f5792c5f06bf6b72985c4c68
2019-10-23 21:17:30 +00:00
John Stultz
a025c3a713 ANDROID: Kconfig.gki: Add hidden MMC config support
Enable hidden MMC configs via CONFIG_GKI_HACKS_TO_FIX

Bug: 142268770
Change-Id: Ibaba180c46708f1213055f44523b9e7b45eefee6
Signed-off-by: John Stultz <john.stultz@linaro.org>
2019-10-23 21:14:26 +00:00
John Stultz
612b6ac9ff ANDROID: Kconfig.gki: Add Hidden QCOM configs
Enable hidden QCOM configs via CONFIG_GKI_HACKS_TO_FIX

Bug: 142268770
Change-Id: I99e9a05ac631843dafcf33e9b4ceb8e54e40c117
Signed-off-by: John Stultz <john.stultz@linaro.org>
2019-10-23 21:14:19 +00:00
John Stultz
26a9b13fee ANDROID: Kconfig.gki: Add SND_PCM_ELD to HIDDEN_DRM configs
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>
2019-10-23 21:14:12 +00:00
John Stultz
b4750d3d2c ANDROID: Kconfig.gki: Add extra audio selections
Add SND_PCM_IEC958 to GKI_HIDDEN_SND_SOC_CONFIGS

Bug: 142268770
Change-Id: I0927c00ef476cb232a8f6c87534cadea62d4a21a
Signed-off-by: John Stultz <john.stultz@linaro.org>
2019-10-23 21:13:59 +00:00
John Stultz
146dc14c33 ANDROID: Kconfig.gki: Add extra GKI_HIDDEN_REGMAP_CONFIGS selections
Add REGMAP_MMIO to GKI_HIDDEN_REGMAP_CONFIGS

Bug: 142268770
Change-Id: I7e67afbd67f31b853abc3a4f7ba596b82a5febef
Signed-off-by: John Stultz <john.stultz@linaro.org>
2019-10-23 21:13:50 +00:00
Ram Muthiah
5a7b085e71 ANDROID: Four part re-add of asm-goto usage [4/4]
Re-add "x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation"
This reverts commit 2c7164851e.

Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I74ea8dcb2f5c3661dc1657eb53872375aa9e6753
2019-10-23 20:53:53 +00:00
Ram Muthiah
265694b7ec ANDROID: Four part re-add of asm-goto usage [3/4]
Re-add "x86/uaccess: Don't leak the AC flag into __put_user() value evaluation"
This reverts commit a4bd9e975e.

Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: Iebfe5df8e2e09b6eeeaae343ec6deeda7f45c975
2019-10-23 20:53:31 +00:00
Ram Muthiah
a6e5c4faab ANDROID: Four part re-add of asm-goto usage [2/4]
Re-add "Use __put_user_goto in __put_user_size() and unsafe_put_user()"
This reverts commit 7a71617410.

Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: Ife28957c3e9f4e6a44d8e02bc43d683701953369
2019-10-23 20:53:17 +00:00
Ram Muthiah
692cc83d7c ANDROID: Four part re-add of asm-goto usage [1/4]
Re-add "x86 uaccess: Introduce __put_user_goto"
This reverts commit 60f8cf9e65.

Bug: 120440614
Bug: 132629930
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: I1c5ca6ac430694cb46bb8b408e60338e88cbffd6
2019-10-23 20:53:03 +00:00
Matthias Maennich
ce42ef68b9 ANDROID: Move out patches/ and replace by link to kernel/common-patches project
Change-Id: Ie9df0ea6933b34a1b97f5034bb8c6a913b079e08
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-23 20:19:34 +00:00
Raghavendra Rao Ananta
3fde1dfb00 ANDROID: Revert "Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux"
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>
2019-10-23 12:04:25 +00:00
Ram Muthiah
6ce0937faa ANDROID: Move from clang r353983c to r365631c
Bug: 139440459
Test: BUILD_CONFIG=common/build.config.gki.x86_64 build/build.sh
Test: BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
Change-Id: I7ee5d9a687843c09bbc5edb591d3337bd5bfbcbc
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
2019-10-22 17:59:02 +00:00