Commit Graph

861706 Commits

Author SHA1 Message Date
LuK1337
eeb682840e Android: Add empty Android.mk file
* This prevents inclusion of drivers/staging/greybus/tools/Android.mk
  which will conflict in case we have more than 1 kernel tree in AOSP
  source dir.

Change-Id: I335bca7b6d6463b1ffc673ab5367603347516e13
2022-11-20 19:48:44 +02:00
Michael Bestas
213c4e99fc Add 'techpack/video/' from tag 'LA.UM.9.12.r1-14900-SMxx50.QSSI13.0'
git-subtree-dir: techpack/video
git-subtree-mainline: 078c8b4302
git-subtree-split: 563c068743
Change-Id: I03aafbfd2c133ff9cd1475c96f3bed969f7bb5be
2022-11-20 19:45:22 +02:00
Michael Bestas
078c8b4302 Add 'techpack/display/' from tag 'LA.UM.9.12.r1-14900-SMxx50.QSSI13.0'
git-subtree-dir: techpack/display
git-subtree-mainline: 59d05eab57
git-subtree-split: 06878e0bb5
Change-Id: I3eb42ba067416dfb810d911813649ff7865da02e
2022-11-20 19:45:00 +02:00
Michael Bestas
59d05eab57 Add 'techpack/data/' from tag 'LA.UM.9.12.r1-14900-SMxx50.QSSI13.0'
git-subtree-dir: techpack/data
git-subtree-mainline: d975c72436
git-subtree-split: f70ca62e22
Change-Id: If8df8a137a8588ae16682c72efefe5d67a11350d
2022-11-20 19:44:41 +02:00
Michael Bestas
d975c72436 Add 'techpack/camera/' from tag 'LA.UM.9.12.r1-14900-SMxx50.QSSI13.0'
git-subtree-dir: techpack/camera
git-subtree-mainline: f4f695d298
git-subtree-split: 430dfeb154
Change-Id: I3696db94d9f8747ce0a416ef9a372e90a5cf6ccc
2022-11-20 19:44:11 +02:00
Michael Bestas
f4f695d298 Add 'techpack/audio/' from tag 'LA.UM.9.12.r1-14900-SMxx50.QSSI13.0'
git-subtree-dir: techpack/audio
git-subtree-mainline: c4ac9f41f5
git-subtree-split: d4a1fdac7b
Change-Id: I9f1af2abd41942d29296c963aac75ed023624164
2022-11-20 19:43:50 +02:00
Michael Bestas
c4ac9f41f5 Add 'drivers/staging/qcacld-3.0/' from tag 'LA.UM.9.12.r1-14900-SMxx50.QSSI13.0'
git-subtree-dir: drivers/staging/qcacld-3.0
git-subtree-mainline: de40f7476c
git-subtree-split: d6816b4f08
Change-Id: I4fb6bbe0f3ac4feb329fadd143bf5c23136f222a
2022-11-20 19:43:27 +02:00
Michael Bestas
de40f7476c Add 'drivers/staging/qca-wifi-host-cmn/' from tag 'LA.UM.9.12.r1-14900-SMxx50.QSSI13.0'
git-subtree-dir: drivers/staging/qca-wifi-host-cmn
git-subtree-mainline: 5f8f9bfcbb
git-subtree-split: a00555d89c
Change-Id: Icf140f73c59b0a51c64eb8097f3658a44af9d660
2022-11-20 19:43:08 +02:00
Michael Bestas
5f8f9bfcbb Add 'drivers/staging/fw-api/' from tag 'LA.UM.9.12.r1-14900-SMxx50.QSSI13.0'
git-subtree-dir: drivers/staging/fw-api
git-subtree-mainline: 36b4500f3d
git-subtree-split: 3c6e03d794
Change-Id: I79fa29027b9e76028c6c4a8310a95f729dd347ec
2022-11-20 19:42:49 +02:00
Michael Bestas
36b4500f3d arm64: dts: vendor: Symlink qcom display bindings
Change-Id: Iab5e2f72e82e6bc85e96bbe0884dd2ef5541611b
2022-11-20 19:36:24 +02:00
Michael Bestas
df1f50e1af Add 'arch/arm64/boot/dts/vendor/qcom/display/' from tag 'LA.UM.9.12.r1-13500-SMxx50.0'
git-subtree-dir: arch/arm64/boot/dts/vendor/qcom/display
git-subtree-mainline: d7762d7bdf
git-subtree-split: 3958a5ac66
Change-Id: I3018f9281f69f04cbbd6b438d368fbbe1629722d
2022-11-20 19:35:52 +02:00
Michael Bestas
d7762d7bdf arm64: dts: vendor: Don't ignore qcom camera dts
Change-Id: I0d38270627bbf4fb954d65a65c3c0ea28a5d5cf7
2022-11-20 19:34:01 +02:00
Michael Bestas
b1e03b2bfc Add 'arch/arm64/boot/dts/vendor/qcom/camera/' from tag 'LA.UM.9.12.r1-13500-SMxx50.0'
git-subtree-dir: arch/arm64/boot/dts/vendor/qcom/camera
git-subtree-mainline: fdbac17619
git-subtree-split: 4d77fd334c
Change-Id: I7158d5d6ed2d484d89b423d242f88e6a11c7a5ab
2022-11-20 19:33:24 +02:00
Michael Bestas
fdbac17619 Add 'arch/arm64/boot/dts/vendor/' from tag 'LA.UM.9.12.r1-13500-SMxx50.0'
git-subtree-dir: arch/arm64/boot/dts/vendor
git-subtree-mainline: ce9c2a7f82
git-subtree-split: abf325db04
Change-Id: Ib3c12e8bd6d6e494030d1ac38f87c3c16074f9d5
2022-11-20 19:31:36 +02:00
Erfan Abdi
ce9c2a7f82 Revert ".gitignore: Add device tree vendor directories to gitignore"
This reverts commit 93d5bbacca.

Change-Id: I068174bcfa160354e9426374b58098a853817d6e
2022-11-20 19:28:46 +02:00
Erfan Abdi
88d489e056 Revert ".gitignore: Add techpack directory to gitignore"
This reverts commit 3305d4f377.

Change-Id: Iba83d62444e73208f25693f70669e08c23f5d6a0
2022-11-20 19:28:42 +02:00
Linux Build Service Account
b7af6d712f Merge 67bf63c259 on remote branch
Change-Id: Ibfe468542bee0d56fcc1c1af7bfc4c19ddd17a57
2022-11-04 03:38:15 -07:00
qctecmdr
67bf63c259 Merge "arm64: Use the clearbhb instruction in mitigations" 2022-10-20 04:10:47 -07:00
qctecmdr
9bf24a89b5 Merge "KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated" 2022-10-19 11:28:08 -07:00
qctecmdr
46e1b3a464 Merge "arm64: entry: Make the trampoline cleanup optional" 2022-10-19 06:57:46 -07:00
qctecmdr
33710784af Merge "fuse: make sure reclaim doesn't write the inode" 2022-10-17 21:01:21 -07:00
James Morse
1a6c401c2c arm64: Use the clearbhb instruction in mitigations
commit 228a26b912287934789023b4132ba76065d9491c upstream.

Future CPUs may implement a clearbhb instruction that is sufficient
to mitigate SpectreBHB.  CPUs that implement this instruction, but
not CSV2.3 must be affected by Spectre-BHB.

Add support to use this instruction as the BHB mitigation on CPUs
that support it. The instruction is in the hint space so it will
be treated by a NOP as older CPUs.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[ modified for stable: Use a KVM vector template instead of alternatives ]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: ed5dec3fae
Git-repo: https://android.googlesource.com/kernel/common/
Change-Id: I78e5a1888e44ef45294ed35226c4cce43f249126
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:05:34 -07:00
Joey Gouly
5ad450e3a1 arm64: add ID_AA64ISAR2_EL1 sys register
commit 9e45365f1469ef2b934f9d035975dbc9ad352116 upstream.

This is a new ID register introduced in  8.7.

Change-Id: I0421d4caf455202bda563b449ff1af23449884e5
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Reiji Watanabe <reijiw@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211210165432.8106-3-joey.gouly@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: a44e7ddb58
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:05:18 -07:00
James Morse
e6128e21c6 KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated
commit a5905d6af492ee6a4a2205f0d550b3f931b03d03 upstream.
KVM allows the guest to discover whether the ARCH_WORKAROUND SMCCC are
implemented and to preserve that state during migration through its
firmware register interface.
Add the necessary boiler plate for SMCCC_ARCH_WORKAROUND_3.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[ kvm code moved to virt/kvm/arm, removed fw regs ABI. Added 32bit stub ]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 5f051d32b0
Git-repo: https://android.googlesource.com/kernel/common/
Change-Id: Id7ed70b94bd3a3f0575e13691c4c211bb23c1ec3
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:05:04 -07:00
James Morse
604760bf5b arm64: Mitigate spectre style branch history side channels
commit 558c303c9734af5a813739cd284879227f7297d2 upstream.

Speculation attacks against some high-performance processors can
make use of branch history to influence future speculation.
When taking an exception from user-space, a sequence of branches
or a firmware call overwrites or invalidates the branch history.

The sequence of branches is added to the vectors, and should appear
before the first indirect branch. For systems using KPTI the sequence
is added to the kpti trampoline where it has a free register as the exit
from the trampoline is via a  'ret'. For systems not using KPTI, the same
register tricks are used to free up a register in the vectors.
For the firmware call, arch-workaround-3 clobbers 4 registers, so
there is no choice but to save them to the EL1 stack. This only happens
for entry from EL0 so if we take an exception due to the stack access,
it will not become re-entrant.

For KVM, the existing branch-predictor-hardening vectors are used.
When a spectre version of these vectors is in use, the firmware call
is sufficient to mitigate against Spectre-BHB. For the non-spectre
versions the sequence of branches is added to the indirect vector.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: <stable@kernel.org> # <v5.17.x 72bb9dcb6c33c arm64: Add Cortex-X2 CPU part definition
Cc: <stable@kernel.org> # <v5.16.x 2d0d656700d67 arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
Cc: <stable@kernel.org> # <v5.10.x 8a6b88e66233f arm64: Add part number for Arm Cortex-A77
[ modified for stable, moved code to cpu_errata.c removed bitmap of
  mitigations, use kvm template infrastructure ]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: c20d551744
Git-repo: https://android.googlesource.com/kernel/common/
Change-Id: Ib5f1191b3e81b68edbcd2a0ba4f45e0c1041ad05
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:04:48 -07:00
James Morse
b0264309e1 KVM: arm64: Add templates for BHB mitigation sequences
KVM writes the Spectre-v2 mitigation template at the beginning of each
vector when a CPU requires a specific sequence to run.
Because the template is copied, it can not be modified by the alternatives
at runtime. As the KVM template code is intertwined with the bp-hardening
callbacks all templates must have a bp-hardening callback.
Add templates for calling ARCH_WORKAROUND_3  and one for each value of K
in the brancy-loop. Identify these sequences by a new parameter
template_start, and add a copy of install_bp_hardening_cb() that is able to
install them.

Change-Id: I3dbb2d1e06663cbf39b1d212547ac64d569fd72e
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: a68912a3ae
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:04:34 -07:00
James Morse
60d1e2d44c arm64: proton-pack: Report Spectre-BHB vulnerabilities as part of Spectre-v2
commit dee435be76f4117410bbd90573a881fd33488f37 upstream.

Speculation effect against some high-performance processors can
make use of branch history to influence future speculation as part of
a spectre-v2. This is not mitigated by CSV2 meaning CPUs that
previously reported 'Not affected' are now moderately mitigated by CSV2.

Update the value in /sys/devices/system/cpu/vulnerabilities/spectre_v2
to show the state of the BHB mitigation.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[ code move to cpu_errata.c for backport ]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 7b012f6597
Git-repo: https://android.googlesource.com/kernel/common/
Change-Id: I7dc0fc8e5d198c1d9d7b3d8227a93b43d746c97a
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:04:23 -07:00
James Morse
c52fc1f469 arm64: Add percpu vectors for EL1
commit bd09128d16fac3c34b80bd6a29088ac632e8ce09 upstream.

The Spectre-BHB workaround adds a firmware call to the vectors. This
is needed on some CPUs but not others. To avoid the unaffected CPU in
a big or little pair from making the firmware call create per cpu vectors.
The per-cpu vectors only apply when returning from EL0.

Systems using KPTI can use the canonical 'full-fat' vectors directly at
EL1, the trampoline exit code will switch to this_cpu_vector on exit to
EL0. Systems not using KPTI should always use this_cpu_vector.
this_cpu_vector will point at a vector in tramp_vecs or
__bp_harden_el1_vectors, depending on whether KPTI is in use.

Change-Id: I9983edd36ee880f3f951f4933b6fa4fca5a91a5b
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 5b5ca2608f
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:04:04 -07:00
James Morse
99a2130039 arm64: entry: Add macro for reading symbol addresses from the trampoline
commit b28a8eebe81c186fdb1a0078263b30576c8e1f42 upstream.

The trampoline code needs to use the address of symbols in the wider
kernel, e.g., vectors. PC-relative addressing wouldn't work as the
trampoline code doesn't run at the address the linker expected.

tramp_ventry uses a literal pool, unless CONFIG_RANDOMIZE_BASE is
set in which case it uses the data page as a literal pool because
the data page can be unmapped when running in user-space, which is
required for CPUs vulnerable to meltdown.

Pull this logic out as a macro instead of adding a third copy
of it.

Change-Id: Ic2c62933b6a49c15f572c40e430a83bfa50dedae
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: e18876b523
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:03:52 -07:00
James Morse
005ec074d6 arm64: entry: Add vectors that have the bhb mitigation sequences
commit ba2689234be92024e5635d30fe744f4853ad97db upstream.

Some CPUs affected by Spectre-BHB need a sequence of branches, or a
firmware call to be run before any indirect branch. This needs to go
in the vectors. No CPU needs both.

While this can be patched in it would run on all CPUs as there is a
single set of vectors. If the only one part of a big or little combination is
affected the unaffected CPUs have to run the mitigation too.

Create extra vectors that include the sequence. Subsequent patches will
allow affected CPUs to select this set of vectors. Later patches will
modify the loop count to match what the CPU requires.

Change-Id: I83274b2d90e65c1c5bf3b11fb236c08731b83456
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 91429ed04e
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:03:35 -07:00
James Morse
47acc862c3 arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
commit aff65393fa1401e034656e349abd655cfe272de0 upstream.

kpti is an optional feature for systems not using kpti a set of
vectors for the spectre-bhb mitigations is needed.

Add another set of vectors, __bp_harden_el1_vectors that will be
used if a mitigation is needed and kpti is not in use.

The EL1 ventries are repeated verbatim as there is no additional
work needed for entry from EL1.

Change-Id: Ib7ad5dfccb9dd86e75796ae8b6303024c9019848
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 901c0a20aa
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:03:16 -07:00
James Morse
8d50dce187 arm64: entry: Allow the trampoline text to occupy multiple pages
commit a9c406e6462ff14956d690de7bbe5131a5677dc9 upstream.

Adding a second set of vectors to .entry.tramp.text will make it
larger than a single 4K page.

Allow the trampoline text to occupy up to three pages by adding two
more fixmap slots. So previous changes to tramp_valias allowed it to reach
beyond a single page.

Change-Id: Iaecfa089c3c7c2edaffe257a841c3dbb0a15e1a4
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 22fdfcf1c2
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:03:01 -07:00
James Morse
00885bc22e arm64: entry: Make the kpti trampoline's kpti sequence optional
commit c47e4d04ba0f1ea17353d85d45f611277507e07a upstream.

Spectre-BHB needs to add sequences to the vectors. Having one global
set of vectors is a problem for big/little systems where the sequence
is costly on cpus that are not vulnerable.

Making the vectors per-cpu in the style of KVM's bh_harden_hyp_vecs
requires the vectors to be generated by macros.

Make the kpti remapping of the kernel optional so the macros can be
used without kpti.

Change-Id: I4dc98f5af303700bd3ae02eb80e17772f52fde36
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 9e056623df
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:02:45 -07:00
James Morse
20f15f073b arm64: entry: Move trampoline macros out of ifdef'd section
commit 13d7a08352a83ef2252aeb464a5e08dfc06b5dfd upstream.

The macros for building the kpti trampoline are all behind
CONFIG_UNMAP_KERNEL_AT_EL0 and in a region that outputs to the
.entry.tramp.text section.

Move the macros out so they can be used to generate other kinds of
trampoline. Only the symbols that need to be guarded by
CONFIG_UNMAP_KERNEL_AT_EL0 and appear in the .entry.tramp.text section.

Change-Id: I126e6fc751f5ed64ed9916ea21026203c1a403d1
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: f689fa53bb
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:02:32 -07:00
James Morse
fabab83316 arm64: entry: Don't assume tramp_vectors is the start of the vectors
commit ed50da7764535f1e24432ded289974f2bf2b0c5a upstream.

The tramp_ventry macro uses tramp_vectors as the address of the vectors
when calculating which ventry in the 'full fat' vectors to branch to.

While there is a one set of tramp_vectors this will be true.
Adding multiple sets of vectors will break this assumption.

Move the generation of the vectors to a macro and pass the start
of the vectors as an argument to tramp_ventry.

Change-Id: Ia9607bea454f9822be63c8be7bfbf55d3dabedd0
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: af484e69b5
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:02:18 -07:00
James Morse
2f54d35a64 arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
commit 6c5bf79b69f911560fbf82214c0971af6e58e682 upstream.

Systems using kpti enter and exit the kernel through a trampoline mapping
that is always mapped even when the kernel is not. tramp_valias is a macro
to find the address of a symbol in the trampoline mapping.

Adding the extra sets of vectors will expand the size of the entry.tramp.text
section to beyond 4K. tramp_valias will be unable to generate addresses
for symbols beyond 4K as it uses the 12 bit immediate of the add
instruction.

As there are now two registers available when tramp_alias is called,
use the extra register to avoid the 4K limit of the 12 bit immediate.

Change-Id: I225b66c724b2d167d92d190715f885b465beb388
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: ebcdd80d00
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:01:48 -07:00
James Morse
5b732b09f2 arm64: entry: Move the trampoline data page before the text page
commit c091fb6ae059cda563b2a4d93fdbc548ef34e1d6 upstream.

The trampoline code has a data page that holds the address of the vectors,
which is unmapped when running in user-space. This ensures that with
CONFIG_RANDOMIZE_BASE the randomised address of the kernel cannot be
discovered until after the kernel has been mapped.

If the trampoline text page is extended to include multiple sets of
vectors, it will be larger than a single page making it tricky to
find the data page without knowing the size of the trampoline text
pages, which will vary with PAGE_SIZE.

Move the data page to appear before the text page. This allows the
data page to be found without knowing the size of the trampoline text
pages. 'tramp_vectors' is used to refer to the beginning of the
.entry.tramp.text section,so do that explicitly.

Change-Id: I0034331c077fbd3e49b4934d84ec009b0797bf34
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 266b1ef136
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:01:31 -07:00
James Morse
0465045e68 arm64: entry: Free up another register on kpti's tramp_exit path
commit 03aff3a77a58b5b52a77e00537a42090ad57b80b upstream.

Kpti stashes x30 in far_el1 while it uses x30 for all its work.

Making the vectors a per cpu data structure will require a second
register.

Allow tramp_exit two registers before it unmaps the kernel by
leaving x30 on the stack and stashing x29 in far_el1.

Change-Id: I324402ec90a8401780ac88d6ed91eaa50fb1911a
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 51acb81130
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-17 04:00:43 -07:00
James Morse
aa33c63094 arm64: entry: Make the trampoline cleanup optional
commit d739da1694a0eaef0358a42b76904b611539b77b upstream.

Subsequent patches will add additional sets of vectors that use
the same tricks as the kpti vectors to reach the full-fat vectors.
The full-fat vectors contain some cleanup for kpti that is patched
in by alternatives when kpti is in use. Once there are additional
vectors, the cleanup will be needed in more cases.

But on big or little systems, the cleanup would be harmful if no
trampoline vector were in use. Instead of forcing CPUs that don't
need a trampoline vector to use one make the trampoline cleanup
optional.

Entry at the top of the vectors will skip the cleanup. The trampoline
vectors can then skip the first instruction, triggering the cleanup
to run.

Change-Id: I1db4a6bc057f191cd596e6cd68d50f6a26a4eddf
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 87eccd56c5
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-14 14:37:07 +05:30
James Morse
2716da964d arm64: entry.S: Add ventry overflow sanity checks
commit 4330e2c5c04c27bebf89d34e0bc14e6943413067 upstream.

Subsequent patches add even more code to the ventry slots.
Ensure kernels  that overflow ventry slot do not get built.

Change-Id: I93c5b565257efdddb704b2b477b6521c3440a334
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: e8bfe29afc
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-14 14:36:15 +05:30
James Morse
67accca701 arm64: Add Cortex-X2 CPU part definition
commit 72bb9dcb6c33cfac80282713c2b4f2b254cd24d1 upstream.
Add the CPU Part numbers for the new arm designs.

Change-Id: I8883915e748d96975a75cabf33f26e59b72735b0
Cc: Will Deacon <will@kernel.org>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/1642994138-25887-2-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 3482cafada
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-14 14:35:59 +05:30
Suzuki K Poulose
a9a74dcf97 arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
commit 2d0d656700d67239a57afaf617439143d8dac9be upstream.
Add the CPU Part numbers for the new arm designs.

Change-Id: I525f410704e80fa256310cab4bf535b0ee0e6cf9
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20211019163153.3692640-2-suzuki.poulose@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 6be1a2b2d4
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
2022-10-14 14:35:42 +05:30
Linux Build Service Account
563c068743 Merge ea1ec63548 on remote branch
Change-Id: I403a6286024e41a51cdeb27f4e9503a78e69fcb1
2022-10-12 18:12:19 -07:00
Linux Build Service Account
a00555d89c Merge 0e307776f7 on remote branch
Change-Id: I64b9066a0cee51faca5c1038be3f076918a2764c
2022-10-12 18:09:59 -07:00
Linux Build Service Account
d6816b4f08 Merge 2fce764b54 on remote branch
Change-Id: I828cc4f2242a840ef84304fbdf72f8286bc45698
2022-10-12 18:05:10 -07:00
Linux Build Service Account
3c6e03d794 Merge c047bdc65f on remote branch
Change-Id: If9010f944c2fc580db9d270b734d0dda6f9993c2
2022-10-12 18:04:27 -07:00
Linux Build Service Account
55efe99d60 Merge a4341e9d9e on remote branch
Change-Id: Idee755b787be25ce021f3fd8dd9285f1cdbea82f
2022-10-12 17:44:25 -07:00
qctecmdr
156f8ff50d Merge "leds:qpnp-flash-v2: Add support for flash realtime control" 2022-10-10 03:31:39 -07:00
qctecmdr
bc0c038acd Merge "usb: f_fs: Prevent race & use after free scenario on epfile" 2022-10-10 00:17:41 -07:00
Kavya Nunna
68b5c0dcdc leds:qpnp-flash-v2: Add support for flash realtime control
In the default design, every time we change the brightness
in torch node it gets reflected only when the enable bit
in the switch node is toggled from 0 to 1. Add new DT property
to optionally allow brightness change to reflect in realtime,
for as long as the switch node enable bit remains set.

Change-Id: I0bc339ba2488177fff144b2771e9a8db425ced84
Signed-off-by: Kavya Nunna <quic_knunna@quicinc.com>
2022-10-07 10:43:41 +05:30