Commit Graph

988528 Commits

Author SHA1 Message Date
James Morse
cb515c669c UPSTREAM: KVM: arm64: Stop handle_exit() from handling HVC twice when an SError occurs
Prior to commit defe21f49b ("KVM: arm64: Move PC rollback on SError to
HYP"), when an SError is synchronised due to another exception, KVM
handles the SError first. If the guest survives, the instruction that
triggered the original exception is re-exectued to handle the first
exception. HVC is treated as a special case as the instruction wouldn't
normally be re-exectued, as its not a trap.

Commit defe21f49b didn't preserve the behaviour of the 'return 1'
that skips the rest of handle_exit().

Since commit defe21f49b, KVM will try to handle the SError and the
original exception at the same time. When the exception was an HVC,
fixup_guest_exit() has already rolled back ELR_EL2, meaning if the
guest has virtual SError masked, it will execute and handle the HVC
twice.

Restore the original behaviour.

Bug: 254441685
Fixes: defe21f49b ("KVM: arm64: Move PC rollback on SError to HYP")
Cc: stable@vger.kernel.org
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220127122052.1584324-4-james.morse@arm.com
(cherry picked from commit 1229630af8)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I04ff663f94b2eb68bb36fbc1e962bd1b9e0f0bfb
2022-11-23 11:15:51 +00:00
James Morse
316b7560ab UPSTREAM: KVM: arm64: Avoid consuming a stale esr value when SError occur
When any exception other than an IRQ occurs, the CPU updates the ESR_EL2
register with the exception syndrome. An SError may also become pending,
and will be synchronised by KVM. KVM notes the exception type, and whether
an SError was synchronised in exit_code.

When an exception other than an IRQ occurs, fixup_guest_exit() updates
vcpu->arch.fault.esr_el2 from the hardware register. When an SError was
synchronised, the vcpu esr value is used to determine if the exception
was due to an HVC. If so, ELR_EL2 is moved back one instruction. This
is so that KVM can process the SError first, and re-execute the HVC if
the guest survives the SError.

But if an IRQ synchronises an SError, the vcpu's esr value is stale.
If the previous non-IRQ exception was an HVC, KVM will corrupt ELR_EL2,
causing an unrelated guest instruction to be executed twice.

Check ARM_EXCEPTION_CODE() before messing with ELR_EL2, IRQs don't
update this register so don't need to check.

Bug: 254441685
Fixes: defe21f49b ("KVM: arm64: Move PC rollback on SError to HYP")
Cc: stable@vger.kernel.org
Reported-by: Steven Price <steven.price@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220127122052.1584324-3-james.morse@arm.com
(cherry picked from commit 1c71dbc8a1)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Icd1c7922988bc79d0c04f1b78f41ac89357ec79a
2022-11-23 11:15:51 +00:00
Badhri Jagan Sridharan
e3e5b3b856 UPSTREAM: usb: typec: tcpm: Do not disconnect when receiving VSAFE0V
With some chargers, vbus might momentarily raise above VSAFE5V and fall
back to 0V causing VSAFE0V to be triggered. This will
will report a VBUS off event causing TCPM to transition to
SNK_UNATTACHED state where it should be waiting in either SNK_ATTACH_WAIT
or SNK_DEBOUNCED state. This patch makes TCPM avoid VSAFE0V events
while in SNK_ATTACH_WAIT or SNK_DEBOUNCED state.

Stub from the spec:
    "4.5.2.2.4.2 Exiting from AttachWait.SNK State
    A Sink shall transition to Unattached.SNK when the state of both
    the CC1 and CC2 pins is SNK.Open for at least tPDDebounce.
    A DRP shall transition to Unattached.SRC when the state of both
    the CC1 and CC2 pins is SNK.Open for at least tPDDebounce."

[23.194131] CC1: 0 -> 0, CC2: 0 -> 5 [state SNK_UNATTACHED, polarity 0, connected]
[23.201777] state change SNK_UNATTACHED -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[23.209949] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
[23.300579] VBUS off
[23.300668] state change SNK_ATTACH_WAIT -> SNK_UNATTACHED [rev3 NONE_AMS]
[23.301014] VBUS VSAFE0V
[23.301111] Start toggling

Bug: 254441685
Fixes: 28b43d3d74 ("usb: typec: tcpm: Introduce vsafe0v for vbus")
Cc: stable@vger.kernel.org
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20220122015520.332507-2-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 746f96e7d6)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Idb8a2ff631e9fdca87aca6b923e5a67923fcd3c3
2022-11-23 11:15:51 +00:00
Xu Yang
2317bc5306 UPSTREAM: usb: typec: tcpci: don't touch CC line if it's Vconn source
With the AMS and Collision Avoidance, tcpm often needs to change the CC's
termination. When one CC line is sourcing Vconn, if we still change its
termination, the voltage of the another CC line is likely to be fluctuant
and unstable.

Therefore, we should verify whether a CC line is sourcing Vconn before
changing its termination and only change the termination that is not
a Vconn line. This can be done by reading the Vconn Present bit of
POWER_ STATUS register. To determine the polarity, we can read the
Plug Orientation bit of TCPC_CONTROL register. Since Vconn can only be
sourced if Plug Orientation is set.

Bug: 254441685
Fixes: 0908c5aca3 ("usb: typec: tcpm: AMS and Collision Avoidance")
cc: <stable@vger.kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20220113092943.752372-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5638b0dfb6)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I99269bf66fea9735b1227386f8beafce4187b9f4
2022-11-23 11:15:51 +00:00
Yong Wu
8f2ac1deb1 UPSTREAM: dt-bindings: memory: mtk-smi: Correct minItems to 2 for the gals clocks
Mute the warning from "make dtbs_check":

larb@14017000: clock-names: ['apb', 'smi'] is too short
	arch/arm64/boot/dts/mediatek/mt8183-evb.dt.yaml
	arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dt.yaml
	...

larb@16010000: clock-names: ['apb', 'smi'] is too short
	arch/arm64/boot/dts/mediatek/mt8183-evb.dt.yaml
	arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dt.yaml

larb@17010000: clock-names: ['apb', 'smi'] is too short
	arch/arm64/boot/dts/mediatek/mt8183-evb.dt.yaml
	arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dt.yaml

If a platform's larb supports gals, there will be some larbs have one
more "gals" clock while the others still only need "apb"/"smi" clocks,
then the minItems for clocks and clock-names are 2.

Bug: 254441685
Fixes: 27bb0e4285 ("dt-bindings: memory: mediatek: Convert SMI to DT schema")
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220113111057.29918-4-yong.wu@mediatek.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
(cherry picked from commit 996ebc0e33)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I04c75dbb321cabb23176afff57ae46df235141f9
2022-11-23 11:15:51 +00:00
Yong Wu
72decd9765 BACKPORT: dt-bindings: memory: mtk-smi: No need mediatek,larb-id for mt8167
Mute the warning from "make dtbs_check":

larb@14016000: 'mediatek,larb-id' is a required property
	arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml
larb@15001000: 'mediatek,larb-id' is a required property
	arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml
larb@16010000: 'mediatek,larb-id' is a required property
	arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml

As the description of mediatek,larb-id, the property is only
required when the larbid is not consecutive from its IOMMU point of view.

Also, from the description of mediatek,larbs in
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml, all the larbs
must sort by the larb index.

In mt8167, there is only one IOMMU HW and three larbs. The drivers already
know its larb index from the mediatek,larbs property of IOMMU, thus no
need this property.

Bug: 254441685
Fixes: 27bb0e4285 ("dt-bindings: memory: mediatek: Convert SMI to DT schema")
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220113111057.29918-3-yong.wu@mediatek.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
(cherry picked from commit ddc3a32488)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I31ba0772a094d73c3368505e291abb9b36f3129b
2022-11-23 11:15:51 +00:00
Yong Wu
33e4819112 BACKPORT: dt-bindings: memory: mtk-smi: Rename clock to clocks
The property "clock" should be rename to "clocks", and delete the "items",
the minItems/maxItems should not be put under "items".

Bug: 254441685
Fixes: 27bb0e4285 ("dt-bindings: memory: mediatek: Convert SMI to DT schema")
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220113111057.29918-2-yong.wu@mediatek.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
(cherry picked from commit 5bf7fa4837)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I610038abd7ca76fa3950268a5ae870db5ea1025a
2022-11-23 11:15:51 +00:00
Weizhao Ouyang
851451819e UPSTREAM: dma-buf: cma_heap: Fix mutex locking section
Fix cma_heap_buffer mutex locking critical section to protect vmap_cnt
and vaddr.

Bug: 254441685
Fixes: a5d2d29e24 ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation")
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220104073545.124244-1-o451686892@gmail.com
(cherry picked from commit 54329e6f7b)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I6344308cf95647849e97766e4405d428934ea6e8
2022-11-23 11:15:51 +00:00
Bart Van Assche
c8f988d00d UPSTREAM: scsi: core: Declare 'scsi_scan_type' static
'scsi_scan_type' is only used in one source file. Hence declare it static.

Bug: 254441685
Link: https://lore.kernel.org/r/20211129194609.3466071-3-bvanassche@acm.org
Fixes: a19a93e4c6 ("scsi: core: pm: Rely on the device driver core for async power management")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 7cc5aad6c9)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I47d9acce25bb23d252a8a9c47f45bb5c0a8aeff9
2022-11-23 11:15:51 +00:00
Bart Van Assche
f3fe2dacb0 UPSTREAM: scsi: core: Suppress a kernel-doc warning
Suppress the following kernel-doc warning:

drivers/scsi/scsi_scan.c:129: warning: Function parameter or member 'dev' not described in 'scsi_enable_async_suspend'

Bug: 254441685
Link: https://lore.kernel.org/r/20211129194609.3466071-2-bvanassche@acm.org
Fixes: a19a93e4c6 ("scsi: core: pm: Rely on the device driver core for async power management")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 776141dda7)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Idd5329fd23f2ebb778c8177457de9eb7903bb731
2022-11-23 11:15:51 +00:00
Geert Uytterhoeven
17b50edfad UPSTREAM: dma-buf: DMABUF_SYSFS_STATS should depend on DMA_SHARED_BUFFER
DMA-BUF sysfs statistics are an option of DMA-BUF.  It does not make
much sense to bother the user with a question about DMA-BUF sysfs
statistics if DMA-BUF itself is not enabled.  Worse, enabling the
statistics enables the feature.

Bug: 254441685
Fixes: bdb8d06dfe ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210902124913.2698760-4-geert@linux-m68k.org
(cherry picked from commit 87fd9ef475)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I8b266f7315e73652b380af2c959794b46c82388a
2022-11-23 11:15:51 +00:00
Stephen Boyd
4ececb4ebd UPSTREAM: clk: versatile: Depend on HAS_IOMEM
kbuild robot reports that s390 fails to build this driver with
COMPILE_TEST. Let's depend on HAS_IOMEM so that s390 doesn't try to
build it.

Bug: 254441685
Cc: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 419b3ab698 ("clk: versatile: remove dependency on ARCH_*")
Link: https://lore.kernel.org/r/20210604192321.2594519-1-sboyd@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit 51c8b49762)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Id145c82b310a876b5a42f48c39c18fef36c2ad31
2022-11-23 11:15:51 +00:00
Jerome Brunet
9b70ff660f BACKPORT: arm64: meson: select COMMON_CLK
This fix the recent removal of clock drivers selection.
While it is not necessary to select the clock drivers themselves, we need
to select a proper implementation of the clock API, which for the meson, is
CCF

Bug: 254441685
Fixes: ba66a25536 ("arm64: meson: ship only the necessary clock controllers")
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20210429083823.59546-1-jbrunet@baylibre.com
(cherry picked from commit 4cce442ffe)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I8de74575043f4e1d170310357f850c9ae8855d72
2022-11-23 11:15:51 +00:00
Masahiro Yamada
05fbbf0d13 UPSTREAM: tools: do not include scripts/Kbuild.include
Since commit 57fd251c78 ("kbuild: split cc-option and friends to
scripts/Makefile.compiler"), some kselftests fail to build.

The tools/ directory opted out Kbuild, and went in a different
direction. People copied scripts and Makefiles to the tools/ directory
to create their own build system.

tools/build/Build.include mimics scripts/Kbuild.include, but some
tool Makefiles include the Kbuild one to import a feature that is
missing in tools/build/Build.include:

 - Commit ec04aa3ae8 ("tools/thermal: tmon: use "-fstack-protector"
   only if supported") included scripts/Kbuild.include from
   tools/thermal/tmon/Makefile to import the cc-option macro.

 - Commit c2390f16fc ("selftests: kvm: fix for compilers that do
   not support -no-pie") included scripts/Kbuild.include from
   tools/testing/selftests/kvm/Makefile to import the try-run macro.

 - Commit 9cae4ace80 ("selftests/bpf: do not ignore clang
   failures") included scripts/Kbuild.include from
   tools/testing/selftests/bpf/Makefile to import the .DELETE_ON_ERROR
   target.

 - Commit 0695f8bca9 ("selftests/powerpc: Handle Makefile for
   unrecognized option") included scripts/Kbuild.include from
   tools/testing/selftests/powerpc/pmu/ebb/Makefile to import the
   try-run macro.

Copy what they need into tools/build/Build.include, and make them
include it instead of scripts/Kbuild.include.

Bug: 254441685
Link: https://lore.kernel.org/lkml/86dadf33-70f7-a5ac-cb8c-64966d2f45a1@linux.ibm.com/
Fixes: 57fd251c78 ("kbuild: split cc-option and friends to scripts/Makefile.compiler")
Reported-by: Janosch Frank <frankja@linux.ibm.com>
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Yonghong Song <yhs@fb.com>
(cherry picked from commit b61442df74)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ie17d3ba0bb20a7457a31d10a7c09163aa10e0ea4
2022-11-23 11:15:51 +00:00
Masahiro Yamada
924872e549 UPSTREAM: kbuild: dummy-tools: adjust to scripts/cc-version.sh
Commit aec6c60a01 ("kbuild: check the minimum compiler version in
Kconfig") changed how the script detects the compiler version.

Get 'make CROSS_COMPILE=scripts/dummy-tools/' back working again.

Bug: 254441685
Fixes: aec6c60a01 ("kbuild: check the minimum compiler version in Kconfig")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
(cherry picked from commit f9bc754be4)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I0ce942de1dbc16dd8b974296bc2fd3cc703e49e5
2022-11-23 11:15:51 +00:00
Masahiro Yamada
252e42f395 UPSTREAM: kbuild: do not include include/config/auto.conf from adjust_autoksyms.sh
Commit cd195bc477 ("kbuild: split adjust_autoksyms.sh in two parts")
split out the code that needs include/config/auto.conf.

This script no longer needs to include include/config/auto.conf.

Bug: 254441685
Fixes: cd195bc477 ("kbuild: split adjust_autoksyms.sh in two parts")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
(cherry picked from commit 12e9dea6c9)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I1c2cb44a3266e935f1c23cf8c4edd90ca1a05a0f
2022-11-23 11:15:51 +00:00
Adrian Hunter
b9a8323fde UPSTREAM: scsi: docs: ABI: sysfs-driver-ufs: Add DeepSleep power mode
Update sysfs documentation for addition of DeepSleep power mode.

Bug: 254441685
Link: https://lore.kernel.org/r/20210104155026.16417-1-adrian.hunter@intel.com
Fixes: fe1d4c2ebc ("scsi: ufs: Add DeepSleep feature")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 0b2894cd0f)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I5ea96058d00237dc6133184ec621c675f9d9aa8f
2022-11-23 11:15:51 +00:00
Dan Vacura
26369cdee4 ANDROID: gki_defconfig: enable CONFIG_USB_CONFIGFS_F_UVC
Enable the UVC function driver to allow USB gadgets
to connect as a standard video device to a host.

Bug: 200712777
Bug: 242344221
Signed-off-by: Dan Vacura <w36195@motorola.com>
Change-Id: Ia037f8560664f9e98f28f3fede609764d5d5699d
(cherry picked from commit 8d5dd0a5a4)
(cherry picked from commit 885f16fab68e456b9dc9856641b706ce17551456)
2022-11-23 07:33:52 +00:00
Suren Baghdasaryan
0481654d9f ANDROID: mm: disable speculative page faults for CONFIG_NUMA
NUMA support with speculative page faults might be broken if
vma_replace_policy() replaces the mempolicy object used in
do_anonymous_page()
 alloc_zeroed_user_highpage_movable()
  alloc_page_vma()
    alloc_pages_vma()
      get_vma_policy()
__get_vma_policy() in speculative path does not always refcounts the
mempolicy object, therefore can't be relied on stabilizing it.
Rather than fixing this, just disable speculation for CONFIG_NUMA
for now and fix it if it's ever needed in Android.

Bug: 257443051
Change-Id: Ib5750b9809979a69a42ebfa6c130e123f416f1aa
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-22 11:37:46 -08:00
Suren Baghdasaryan
f6ddc1c41e ANDROID: mm: fix invalid backport in speculative page fault path
Invalid condition was introduced when porting the original SPF patch
which would affect NUMA mode.

Fixes: 736ae8bde8 ("FROMLIST: mm: adding speculative page fault failure trace events")
Bug: 257443051
Change-Id: Ib20c625615b279dc467588933a1f598dc179861b
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-22 10:51:25 -08:00
Suren Baghdasaryan
c3f0fd7976 ANDROID: disable page table moves when speculative page faults are enabled
move_page_tables() can move entire pmd or pud without locking individual
ptes. This is problematic for speculative page faults which do not take
mmap_lock because they rely on ptl lock when writing new pte value. To
avoid possible race, disable move_page_tables() optimization when
CONFIG_SPECULATIVE_PAGE_FAULT is enabled.

Bug: 257443051
Change-Id: Ib48dda08ecad1abc60d08fc089a6566a63393c13
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-21 12:54:47 -08:00
Suren Baghdasaryan
3d3b77c9c0 ANDROID: mm: assert that mmap_lock is taken exclusively in vm_write_begin
vm_write_{begin|end} has to be called when mmap_lock is taken
exlusively. Add an assert statement in vm_write_begin to enforce
that. free_pgtables can free page tables without exclusive mmap_lock
if the vma was isolated, therefore avoid assertions in such cases.

Bug: 257443051
Change-Id: Ie81aefe025c743cda6f66717d2f08f4d78a55608
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-21 12:54:45 -08:00
Suren Baghdasaryan
df62da3909 ANDROID: mm: remove sequence counting when mmap_lock is not exclusively owned
In a number of cases vm_write_{begin|end} is called while mmap_lock is
not owned exclusively. This is unnecessary and can affect correctness of
the sequence counting protecting speculative page fault handlers. Remove
extra calls.

Bug: 257443051
Change-Id: I1278638a0794448e22fbdab5601212b3b2eaebdc
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-21 12:54:43 -08:00
Suren Baghdasaryan
66544e79f4 ANDROID: mm/khugepaged: add missing vm_write_{begin|end}
Speculative page fault handler needs to detect concurrent pmd changes
and relies on vma seqcount for that. pmdp_collapse_flush(), set_huge_pmd() and collapse_and_free_pmd() can modify a pmd.
vm_write_{begin|end} are needed in the paths which can call these
functions for page fault handler to detect pmd changes.

Bug: 257443051
Change-Id: Ieb784b5f44901b66a594f61b9e7c91190ff97f80
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-21 12:54:15 -08:00
Michel Lespinasse
2a3979df04 BACKPORT: FROMLIST: mm: implement speculative handling in filemap_fault()
Extend filemap_fault() to handle speculative faults.

In the speculative case, we will only be fishing existing pages out of
the page cache. The logic we use mirrors what is done in the
non-speculative case, assuming that pages are found in the page cache,
are up to date and not already locked, and that readahead is not
necessary at this time. In all other cases, the fault is aborted to be
handled non-speculatively.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://lore.kernel.org/all/20210407014502.24091-26-michel@lespinasse.org/

Conflicts:
    mm/filemap.c

1. Added back file_ra_state variable used by SPF path.
2. Updated comment for filemap_fault to reflect SPF locking rules.

Bug: 161210518
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I82eba7fcfc81876245c2e65bc5ae3d33ddfcc368
2022-11-21 10:55:56 -08:00
Suren Baghdasaryan
ec35e912e7 ANDROID: mm: prevent reads of unstable pmd during speculation
Checks of pmd during speculative page fault handling are racy because
pmd is unprotected and might be modified or cleared. This might cause
use-after-free reads from speculative path, therefore prevent such
checks. At the beginning of speculation pmd is checked to be valid and
if it's changed before page fault is handled, the change will be detected
and page fault will be retried under mmap_lock protection.

Bug: 257443051
Change-Id: I0cbd3b0b44e8296cf0d6cb298fae48c696580068
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-21 10:55:56 -08:00
Suren Baghdasaryan
ce7fa7020a ANDROID: mm: prevent speculative page fault handling for in do_swap_page()
do_swap_page() uses migration_entry_wait() which operates on page tables
without protection. Disable speculative page fault handling.

Bug: 257443051
Change-Id: I677eb1ee85707dce533d5d811dcde5f5dabcfdf3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-21 10:55:56 -08:00
Suren Baghdasaryan
4812532ece ANDROID: mm: prevent speculative page fault handling for userfaults
handle_userfault() should be protected against a concurrent
userfaultfd_release(), therefore handling a userfaults speculatively
without mmap_lock protection should be disallowed.

Bug: 257443051
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ic6ae39329c73e8849048ea15b5351a49346404d3
2022-11-21 10:55:56 -08:00
Suren Baghdasaryan
43247cf563 ANDROID: mm: skip pte_alloc during speculative page fault
Speculative page fault checks pmd to be valid before starting to handle
the page fault and pte_alloc() should do nothing if pmd stays valid.
If pmd gets changed during speculative page fault, we will detect the
change later and retry with mmap_lock. Therefore pte_alloc() can be
safely skipped and this prevents the racy pmd_lock() call which can
access pmd->ptl after pmd was cleared.

Bug: 257443051
Change-Id: Iec57df5530dba6e0e0bdf9f7500f910851c3d3fd
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-21 10:55:55 -08:00
Kever Yang
2f2dc42fbf ANDROID: GKI: rockchip: Add symbols for cpufreq
10 symbol(s) added
  'void cpufreq_dbs_governor_exit(struct cpufreq_policy *)'
  'int cpufreq_dbs_governor_init(struct cpufreq_policy *)'
  'void cpufreq_dbs_governor_limits(struct cpufreq_policy *)'
  'int cpufreq_dbs_governor_start(struct cpufreq_policy *)'
  'void cpufreq_dbs_governor_stop(struct cpufreq_policy *)'
  'void cpufreq_unregister_governor(struct cpufreq_governor *)'
  'unsigned int dbs_update(struct cpufreq_policy *)'
  'void dev_pm_opp_put_prop_name(struct opp_table *)'
  'void gov_update_cpu_data(struct dbs_data *)'
  'ssize_t store_sampling_rate(struct gov_attr_set *, const char *, size_t)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I63597fe92f0279199173f0190ef6d3da4f0164f4
2022-11-21 16:56:07 +00:00
Khalid Shaik
c8f45c4915 ANDROID: Update the ABI representation
1 function symbol(s) added
  'int __traceiter_android_rvh_do_sched_yield(void *, struct rq *)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_rvh_do_sched_yield'

Bug: 254608320

Change-Id: I4b2ed24711889914c901f55bce70fdef8da8ae0b
Signed-off-by: Khalid Shaik <khalid.s@samsung.com>
2022-11-18 22:03:51 +00:00
Tengfei Fan
0fabf2342f ANDROID: sched: add hook point in do_sched_yield()
When a task yields, it relinquishes the cpu and
scheduler is tasked to find another task.
However our vendor scheduler logic implementation
could return the same task leading to a loop where
the yielded task gets to run back, so add hook point
in do_sched_yield() for vendor can do some work
before task is scheduled.

Bug: 205804537
Change-Id: I6528c3f4b0ee360559ef9c97cb1eb2b2d1357870
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
Signed-off-by: Khalid Shaik <khalid.s@samsung.com>
2022-11-18 22:03:51 +00:00
David Brazdil
2aed2a7cb0 ANDROID: KVM: arm64: s2mpu: Fix SYNC latency regression
SysMMU_SYNCs provide an invalidation-complete signal to the S2MPU
driver but the latency can be quite high. Improve this by waiting for
all the SYNCs in parallel - separate the initiation of invalidation
barrier from waiting for completion. This way we initiate invalidation
on all SYNCs first, then wait for all of them to complete.

The previously introduced exponential-backoff only kicks in if the
SYNC_COMP_COMPLETE bit is not set after the parallel invalidation.

Bug: 249161451
Signed-off-by: David Brazdil <dbrazdil@google.com>
Change-Id: I9d544bc65f8633d376c7ccd65ea23195ca432964
2022-11-18 15:35:18 +00:00
David Brazdil
e1ea4666e1 ANDROID: KVM: arm64: iommu: Add host_stage2_idmap_complete
Add a new callback to pkvm_iommu_ops called after
host_stage2_idmap_apply on all IOMMU devices. This allows the drivers to
complete operations like invalidation in two stages.

Bug: 249161451
Signed-off-by: David Brazdil <dbrazdil@google.com>
Change-Id: I9c077fd2b18ce54ad67eb34ef16bc94428797419
2022-11-18 15:35:18 +00:00
Quentin Perret
15e65b4a22 ANDROID: KVM: arm64: Issue CMOs when tearing down shadow pages
On the guest teardown path, pKVM will zero the pages used to back the
guest shadow data structures before returning them to the host as they
may contain secrets (e.g. in the vCPU registers). However, the zeroing
is done using a cacheable alias, and CMOs are missing, hence giving the
host a potential opportunity to read the original content of the shadow
structs from memory.

Fix this by issuing CMOs after zeroing the pages.

Bug: 259551298
Change-Id: Id696d47d16e4c3fd870cb70b792eeb7f2282fc78
Signed-off-by: Quentin Perret <qperret@google.com>
2022-11-17 17:22:34 +00:00
Mark Fasheh
80fcf382d1 ANDROID: Add ashmem ioctl to return a unique file identifier
This will allow a client program to avoid redundant actions on ashmem
buffers which it has already seen.

Bug: 244233389
Change-Id: Ica57a8842ff163eae5f9eca8141b439091ec0940
Signed-off-by: Mark Fasheh <mfasheh@google.com>
2022-11-17 17:01:16 +00:00
Khalid Shaik
056ee87d05 ANDROID: Update the ABI representation
28 function symbol(s) added
  'int __platform_register_drivers(struct platform_driver * const *, unsigned int, struct module *)'
  'int dapm_pinctrl_event(struct snd_soc_dapm_widget *, struct snd_kcontrol *, int)'
  'struct dentry * debugfs_create_symlink(const char *, struct dentry *, const char *)'
  'ssize_t device_show_bool(struct device *, struct device_attribute *, char *)'
  'ssize_t device_show_int(struct device *, struct device_attribute *, char *)'
  'ssize_t device_store_bool(struct device *, struct device_attribute *, const char *, size_t)'
  'ssize_t device_store_int(struct device *, struct device_attribute *, const char *, size_t)'
  'void * devm_krealloc(struct device *, void *, size_t, gfp_t)'
  'struct pinctrl * pinctrl_get(struct device *)'
  'int pm_runtime_barrier(struct device *)'
  'void pm_runtime_no_callbacks(struct device *)'
  'struct proc_dir_entry * proc_symlink(const char *, struct proc_dir_entry *, const char *)'
  'int snd_hwdep_new(struct snd_card *, char *, int, struct snd_hwdep * *)'
  'void snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *)'
  'unsigned int snd_pcm_rate_range_to_bits(unsigned int, unsigned int)'
  'int snd_soc_bytes_info_ext(struct snd_kcontrol *, struct snd_ctl_elem_info *)'
  'void snd_soc_component_async_complete(struct snd_soc_component *)'
  'int snd_soc_component_update_bits_async(struct snd_soc_component *, unsigned int, unsigned int, unsigned int)'
  'int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *, const char *)'
  'int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *, const struct snd_soc_dapm_route *, int)'
  'struct snd_soc_dai * snd_soc_find_dai(const struct snd_soc_dai_link_component *)'
  'int snd_soc_get_xr_sx(struct snd_kcontrol *, struct snd_ctl_elem_value *)'
  'int snd_soc_info_xr_sx(struct snd_kcontrol *, struct snd_ctl_elem_info *)'
  'int snd_soc_put_xr_sx(struct snd_kcontrol *, struct snd_ctl_elem_value *)'
  'int snd_soc_tplg_component_load(struct snd_soc_component *, struct snd_soc_tplg_ops *, const struct firmware *, u32)'
  'int snd_soc_tplg_component_remove(struct snd_soc_component *, u32)'
  'int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *, const struct snd_soc_tplg_widget_events *, int, u16)'
  'void sysfs_remove_bin_file(struct kobject *, const struct bin_attribute *)'

Bug: 254608320

Change-Id: I8fbde2c3b7f2e68f58edc940315e28d9ffcc1e64
Signed-off-by: Khalid Shaik <khalid.s@samsung.com>
2022-11-17 16:14:21 +00:00
Will Deacon
b6cfd9d69f ANDROID: KVM: arm64: Fix repainting of PSCI SYSTEM_RESET2 calls
If the host issues a PSCI SYSTEM_RESET2 call requesting a warm reset
while guest pages are live in the system, then pKVM attempts to convert
this to a cold PSCI SYSTEM_RESET request to ensure the EL3 will clear
memory on the next boot. However, this logic is quite badly broken and
will instead attempt to take the 'mem_protect_lock' spinlock twice which
results in a deadlock.

Fix the repainting so that the 'host_ctxt' is updated inline and we
forward the updated request directly to EL3.

Signed-off-by: Will Deacon <will@kernel.org>
Bug: 259523340
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I44719466b7f5abddf73730a3b74db13f935f92ec
2022-11-17 12:31:49 +00:00
Khalid Shaik
03b60942fe ANDROID: Update the ABI representation
15 function symbol(s) added
  'bool cfg80211_chandef_valid(const struct cfg80211_chan_def *)'
  'unsigned int cfg80211_classify8021d(struct sk_buff *, struct cfg80211_qos_map *)'
  'void cfg80211_conn_failed(struct net_device *, const u8 *, enum nl80211_connect_failed_reason, gfp_t)'
  'void cfg80211_ref_bss(struct wiphy *, struct cfg80211_bss *)'
  'int class_create_file_ns(struct class *, const struct class_attribute *, void *)'
  'int dev_vprintk_emit(int, const struct device *, const char *, va_list)'
  'void dma_heap_buffer_free(struct dma_buf *)'
  'int genlmsg_multicast_allns(const struct genl_family *, struct sk_buff *, u32, unsigned int, gfp_t)'
  'struct iio_channel * iio_channel_get_all(struct device *)'
  'void iio_channel_release(struct iio_channel *)'
  'int iio_read_channel_raw(struct iio_channel *, int *)'
  'int irq_get_irqchip_state(unsigned int, enum irqchip_irq_state, bool *)'
  'void kfree_skb_list(struct sk_buff *)'
  'int sg_nents_for_len(struct scatterlist *, u64)'
  'void v4l2_m2m_try_schedule(struct v4l2_m2m_ctx *)'

1 variable symbol(s) added
  'const struct kernel_param_ops param_ops_ullong'

Bug: 254608320

Change-Id: I043e6d162e0502bc007645bbead98c8eba2ca15b
Signed-off-by: Khalid Shaik <khalid.s@samsung.com>
2022-11-16 16:26:07 +00:00
Khalid Shaik
d08c3d3ba2 ANDROID: Update the ABI representation
22 function symbol(s) added
  'int __traceiter_android_vh_show_mem(void *, unsigned int, nodemask_t *)'
  'void __wake_up_locked_key(struct wait_queue_head *, unsigned int, void *)'
  'struct file * anon_inode_getfile(const char *, const struct file_operations *, void *, int)'
  'int dma_buf_get_flags(struct dma_buf *, unsigned long int *)'
  'int do_wait_intr(wait_queue_head_t *, wait_queue_entry_t *)'
  'struct file * get_task_exe_file(struct task_struct *)'
  's32 i2c_smbus_write_word_data(const struct i2c_client *, u8, u16)'
  'struct iio_dev * iio_device_alloc(struct device *, int)'
  'void iio_device_free(struct iio_dev *)'
  'int is_dma_buf_file(struct file *)'
  'int iterate_fd(struct files_struct *, unsigned int, int(*)(void *, struct file *, unsigned int), void *)'
  'bool printk_timed_ratelimit(unsigned long int *, unsigned int)'
  'void release_pages(struct page * *, int)'
  'int rtc_set_time(struct rtc_device *, struct rtc_time *)'
  'void * typec_get_drvdata(struct typec_port *)'
  'struct typec_partner * typec_register_partner(struct typec_port *, struct typec_partner_desc *)'
  'struct typec_port * typec_register_port(struct device *, const struct typec_capability *)'
  'void typec_set_data_role(struct typec_port *, enum typec_data_role)'
  'void typec_set_pwr_opmode(struct typec_port *, enum typec_pwr_opmode)'
  'void typec_set_pwr_role(struct typec_port *, enum typec_role)'
  'void typec_unregister_partner(struct typec_partner *)'
  'void typec_unregister_port(struct typec_port *)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_show_mem'

Bug: 254608320

Change-Id: I9aa8df7bf0a1545264fd99637d76e24e56bafc32
Signed-off-by: Khalid Shaik <khalid.s@samsung.com>
2022-11-16 16:25:35 +00:00
Khalid Shaik
01645da2f5 ANDROID: Update the ABI representation
20 function symbol(s) added
  'struct vm_struct * __get_vm_area_caller(unsigned long int, unsigned long int, unsigned long int, unsigned long int, void *)'
  'void console_lock()'
  'void console_stop(struct console *)'
  'int dapm_regulator_event(struct snd_soc_dapm_widget *, struct snd_kcontrol *, int)'
  'int devm_hwrng_register(struct device *, struct hwrng *)'
  'int map_kernel_range(unsigned long int, unsigned long int, pgprot_t, struct page * *)'
  'struct proc_dir_entry * proc_create_seq_private(const char *, umode_t, struct proc_dir_entry *, const struct seq_operations *, unsigned int, void *)'
  'int regulator_force_disable(struct regulator *)'
  'int regulator_set_mode(struct regulator *, unsigned int)'
  'struct snd_soc_dapm_widget * snd_soc_dapm_new_control(struct snd_soc_dapm_context *, const struct snd_soc_dapm_widget *)'
  'struct snd_soc_pcm_runtime * snd_soc_get_pcm_runtime(struct snd_soc_card *, struct snd_soc_dai_link *)'
  'void snd_soc_of_put_dai_link_codecs(struct snd_soc_dai_link *)'
  '__poll_t v4l2_ctrl_poll(struct file *, struct poll_table_struct *)'
  'int v4l2_ctrl_subscribe_event(struct v4l2_fh *, const struct v4l2_event_subscription *)'
  'int v4l2_event_unsubscribe(struct v4l2_fh *, const struct v4l2_event_subscription *)'
  'int v4l2_fh_is_singular(struct v4l2_fh *)'
  'int v4l2_fh_release(struct file *)'
  'int v4l2_m2m_querybuf(struct file *, struct v4l2_m2m_ctx *, struct v4l2_buffer *)'
  'int vb2_prepare_buf(struct vb2_queue *, struct media_device *, struct v4l2_buffer *)'
  'int vsprintf(char *, const char *, va_list)'

4 variable symbol(s) added
  'fb_mode_option'
  'atomic_t ignore_console_lock_warning'
  'struct kmem_cache * names_cachep'
  'struct bus_type spi_bus_type'

Bug: 254608320

Change-Id: I8cc3e8bf07945c9be7c27e325c56890cc4ab007a
Signed-off-by: Khalid Shaik <khalid.s@samsung.com>
2022-11-16 15:43:01 +00:00
Rick Yiu
6c86db3f70 ANDROID: Update the ABI representation
1 function symbol(s) added
  'void reweight_task(struct task_struct *, int)'

Bug: 245675204
Change-Id: I30841b0f9fe67009aaa3cace864df75d0f3b4bfc
Signed-off-by: Rick Yiu <rickyiu@google.com>
2022-11-16 08:05:18 +00:00
Rick Yiu
db144888f8 ANDROID: kernel: sched: Export reweight_task
Export reweight_task for vendor usage when they are trying to manipulate
task prio. After the prio changed, it will need to update its load
weight to take effect. Therefore, this function needs to be called
from vendor kernel module. It could be used with
trace_android_rvh_set_user_nice and trace_android_rvh_setscheduler.

Bug: 245675204
Change-Id: I0033518bf1cbd0a8129795743b95340f439d5fe8
Signed-off-by: Rick Yiu <rickyiu@google.com>
2022-11-16 08:05:18 +00:00
Jaegeuk Kim
6f642cd2f2 FROMGIT: f2fs: allow to read node block after shutdown
If block address is still alive, we should give a valid node block even after
shutdown. Otherwise, we can see zero data when reading out a file.

Bug: 257271565
Cc: stable@vger.kernel.org
Fixes: 83a3bfdb5a ("f2fs: indicate shutdown f2fs to allow unmount successfully")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 6953bf65286d git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Change-Id: Ifb70f6c73bd67d5112ee9fa1a5e4ad8e10ae8517
2022-11-15 19:18:47 +00:00
Ray Chi
92a7e867cf FROMGIT: usb: core: stop USB enumeration if too many retries
When a broken USB accessory connects to a USB host, usbcore might
keep doing enumeration retries. If the host has a watchdog mechanism,
the kernel panic will happen on the host.

This patch provides an attribute early_stop to limit the numbers of retries
for each port of a hub. If a port was marked with early_stop attribute,
unsuccessful connection attempts will fail quickly. In addition, if an
early_stop port has failed to initialize, it will ignore all future
connection events until early_stop attribute is clear.

Signed-off-by: Ray Chi <raychi@google.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20221107072754.3336357-1-raychi@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 236915598
(cherry picked from commit 430d57f53e
https: //git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)
Change-Id: Ib85522ca38c0f26ece9807d5304991853f155669
Signed-off-by: Ray Chi <raychi@google.com>
2022-11-15 04:54:20 +00:00
Will Deacon
f3fe2e6612 ANDROID: KVM: arm64: Adjust PSCI MEM_PROTECT refcount across share/unshare
When a protected guest shares or unshares a page with the host, we
should decrement and increment the PSCI MEM_PROTECT refcount respectively
since shared pages do not require poisoning on the reclaim path and will
therefore not be accounted for.

Bug: 258425493
Reported-by: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I80a4fad44de4313c6708a8259a1802ded379f03b
2022-11-15 04:05:41 +00:00
Matthew Wilcox (Oracle)
e7b635a520 BACKPORT: ext4,f2fs: fix readahead of verity data
The recent change of page_cache_ra_unbounded() arguments was buggy in the
two callers, causing us to readahead the wrong pages.  Move the definition
of ractl down to after the index is set correctly.  This affected
performance on configurations that use fs-verity.

Link: https://lkml.kernel.org/r/20221012193419.1453558-1-willy@infradead.org
Fixes: 73bb49da50 ("mm/readahead: make page_cache_ra_unbounded take a readahead_control")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: Jintao Yin <nicememory@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Bug: 258554362
(cherry picked from commit 4fa0e3ff21)
Change-Id: Ib5160c5c53629be328c370f5d5d464956d6a6312
Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-11-15 01:01:59 +00:00
Khalid Shaik
c57ed31850 ANDROID: Update the ABI representation
39 function symbol(s) added
  'int __traceiter_android_rvh_can_migrate_task(void *, struct task_struct *, int, int *)'
  'int __traceiter_android_rvh_cpu_cgroup_can_attach(void *, struct cgroup_taskset *, int *)'
  'int __traceiter_android_rvh_find_busiest_queue(void *, int, struct sched_group *, struct cpumask *, struct rq * *, int *)'
  'int __traceiter_android_rvh_find_lowest_rq(void *, struct task_struct *, struct cpumask *, int, int *)'
  'int __traceiter_android_rvh_find_new_ilb(void *, struct cpumask *, int *)'
  'int __traceiter_android_rvh_replace_next_task_fair(void *, struct rq *, struct task_struct * *, struct sched_entity * *, bool *, bool, struct task_struct *)'
  'int __traceiter_android_rvh_sched_fork_init(void *, struct task_struct *)'
  'int __traceiter_android_rvh_sched_newidle_balance(void *, struct rq *, struct rq_flags *, int *, int *)'
  'int __traceiter_android_rvh_sched_nohz_balancer_kick(void *, struct rq *, unsigned int *, int *)'
  'int __traceiter_android_rvh_sched_rebalance_domains(void *, struct rq *, int *)'
  'int __traceiter_android_rvh_select_fallback_rq(void *, int, struct task_struct *, int *)'
  'int __traceiter_android_vh_binder_wakeup_ilocked(void *, struct task_struct *, bool, struct binder_proc *)'
  'int __traceiter_binder_transaction_received(void *, struct binder_transaction *)'
  'int __traceiter_ipi_entry(void *, const char *)'
  'int __traceiter_ipi_exit(void *, const char *)'
  'int __traceiter_ipi_raise(void *, const struct cpumask *, const char *)'
  'int _raw_write_trylock(rwlock_t *)'
  'void activate_task(struct rq *, struct task_struct *, int)'
  'caches_clean_inval_pou'
  'struct task_struct * cgroup_taskset_first(struct cgroup_taskset *, struct cgroup_subsys_state * *)'
  'struct task_struct * cgroup_taskset_next(struct cgroup_taskset *, struct cgroup_subsys_state * *)'
  'void cpu_hotplug_disable()'
  'void cpu_hotplug_enable()'
  'int cpufreq_frequency_table_get_index(struct cpufreq_policy *, unsigned int)'
  'struct cpuidle_driver * cpuidle_get_cpu_driver(struct cpuidle_device *)'
  'void deactivate_task(struct rq *, struct task_struct *, int)'
  'const struct cpumask * housekeeping_cpumask(enum hk_flags)'
  'u64 int_pow(u64, unsigned int)'
  'void kick_all_cpus_sync()'
  'ssize_t memory_read_from_buffer(void *, size_t, loff_t *, void *, size_t)'
  'int raw_notifier_chain_unregister(struct raw_notifier_head *, struct notifier_block *)'
  'struct reciprocal_value reciprocal_value(u32)'
  'void refresh_frequency_limits(struct cpufreq_policy *)'
  'void set_next_entity(struct cfs_rq *, struct sched_entity *)'
  'void set_task_cpu(struct task_struct *, unsigned int)'
  'void smp_call_function_many(const struct cpumask *, smp_call_func_t, void *, bool)'
  'bool stop_one_cpu_nowait(unsigned int, cpu_stop_fn_t, void *, struct cpu_stop_work *)'
  'const struct cpumask * system_32bit_el0_cpumask()'
  'void wake_up_if_idle(int)'

17 variable symbol(s) added
  'struct tracepoint __tracepoint_android_rvh_can_migrate_task'
  'struct tracepoint __tracepoint_android_rvh_cpu_cgroup_can_attach'
  'struct tracepoint __tracepoint_android_rvh_find_busiest_queue'
  'struct tracepoint __tracepoint_android_rvh_find_lowest_rq'
  'struct tracepoint __tracepoint_android_rvh_find_new_ilb'
  'struct tracepoint __tracepoint_android_rvh_replace_next_task_fair'
  'struct tracepoint __tracepoint_android_rvh_sched_fork_init'
  'struct tracepoint __tracepoint_android_rvh_sched_newidle_balance'
  'struct tracepoint __tracepoint_android_rvh_sched_nohz_balancer_kick'
  'struct tracepoint __tracepoint_android_rvh_sched_rebalance_domains'
  'struct tracepoint __tracepoint_android_rvh_select_fallback_rq'
  'struct tracepoint __tracepoint_android_vh_binder_wakeup_ilocked'
  'struct tracepoint __tracepoint_binder_transaction_received'
  'struct tracepoint __tracepoint_ipi_entry'
  'struct tracepoint __tracepoint_ipi_exit'
  'struct tracepoint __tracepoint_ipi_raise'
  'const char * const sched_feat_names[24]'

Bug: 254608320
Change-Id: Ie0a5acd2ecebf98572d99b31ee464dd161d7dd7b
Signed-off-by: Khalid Shaik <khalid.s@samsung.com>
2022-11-14 20:07:18 +00:00
Martin Liu
bcf1e503f5 ANDROID: adjust vendor hook to control blk_plug
We shouldn't hold lru_lock to proceed blk_finish_plug.

Fixes: 89fed37332 ("ANDROID: vendor hook to control blk_plug for shrink_lruvec")
Bug: 255471591
Change-Id: Ie9d9b0e4ee76b4735e802b2a202fbb79d0ae090e
Signed-off-by: Martin Liu <liumartin@google.com>
2022-11-14 19:50:30 +00:00
Akilesh Kailash
6cbaa88f4a ANDROID: dm-user: Remove bio recount in I/O path
When I/O is submitted to dm-user target, bio already
has a referance. Additional referance is not needed
in the I/O path.

Bug: 229696117
Test: OTA on Pixel
Change-Id: I8db6802e751336d7a10c6de0bc7a247a6d7f6b37
Signed-off-by: Akilesh Kailash <akailash@google.com>
2022-11-10 17:48:52 +00:00