https://source.android.com/security/bulletin/2020-02-01
CVE-2020-0030
CVE-2019-11599

* tag 'ASB-2020-02-05_4.19': (4206 commits)
  UPSTREAM: sched/fair/util_est: Implement faster ramp-up EWMA on utilization increases
  ANDROID: Re-use SUGOV_RT_MAX_FREQ to control uclamp rt behavior
  BACKPORT: sched/fair: Make EAS wakeup placement consider uclamp restrictions
  BACKPORT: sched/fair: Make task_fits_capacity() consider uclamp restrictions
  ANDROID: sched/core: Move SchedTune task API into UtilClamp wrappers
  ANDROID: sched/core: Add a latency-sensitive flag to uclamp
  ANDROID: sched/tune: Move SchedTune cpu API into UtilClamp wrappers
  ANDROID: init: kconfig: Only allow sched tune if !uclamp
  FROMGIT: sched/core: Fix size of rq::uclamp initialization
  FROMGIT: sched/uclamp: Fix a bug in propagating uclamp value in new cgroups
  FROMGIT: sched/uclamp: Rename uclamp_util_with() into uclamp_rq_util_with()
  FROMGIT: sched/uclamp: Make uclamp util helpers use and return UL values
  FROMGIT: sched/uclamp: Remove uclamp_util()
  BACKPORT: sched/rt: Make RT capacity-aware
  UPSTREAM: tools headers UAPI: Sync sched.h with the kernel
  UPSTREAM: sched/uclamp: Fix overzealous type replacement
  UPSTREAM: sched/uclamp: Fix incorrect condition
  UPSTREAM: sched/core: Fix compilation error when cgroup not selected
  UPSTREAM: sched/core: Fix uclamp ABI bug, clean up and robustify sched_read_attr() ABI logic and code
  UPSTREAM: sched/uclamp: Always use 'enum uclamp_id' for clamp_id values
  ...

Conflicts:
	drivers/char/random.c
	drivers/devfreq/devfreq.c
	drivers/gpu/drm/drm_fb_helper.c
	drivers/media/i2c/ov2680.c
	drivers/media/i2c/ov2685.c
	drivers/media/i2c/ov5670.c
	drivers/media/i2c/ov5695.c
	drivers/media/usb/uvc/uvc_driver.c
	drivers/mmc/host/cqhci.c
	drivers/spi/spi-rockchip.c
	drivers/usb/dwc2/params.c
	drivers/usb/dwc3/debugfs.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/serial/usb_wwan.c
	include/linux/clk-provider.h
	include/linux/mfd/rk808.h
	kernel/cpu.c
	sound/usb/quirks.c

- Export symbol mm_trace_rss_stat on mm/memory.c for GPU drivers.
- Fix sound/usb/pcm.c for SNDRV_PCM_TRIGGER_SUSPEND.
- Enable DEBUG_FS which is not selected by TRACING.
- Disable of_devlink which broken boot. of_devlink is enabled by commit
  ba3aa33b8f ("ANDROID: of: property: Enable of_devlink by default").
- Add CLK_DONT_HOLD_STATE and CLK_KEEP_REQ_RATE to clk_flags
  on drivers/clk/clk.c.

Change-Id: I500ca1bbc735753f9c8251ed2ac8ad757d5a24a4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2020-02-17 15:47:12 +08:00
3568 changed files with 113350 additions and 191436 deletions

View File

@@ -199,7 +199,7 @@ Description:
What: /sys/bus/iio/devices/iio:deviceX/in_positionrelative_x_raw What: /sys/bus/iio/devices/iio:deviceX/in_positionrelative_x_raw
What: /sys/bus/iio/devices/iio:deviceX/in_positionrelative_y_raw What: /sys/bus/iio/devices/iio:deviceX/in_positionrelative_y_raw
KernelVersion: 4.18 KernelVersion: 4.19
Contact: linux-iio@vger.kernel.org Contact: linux-iio@vger.kernel.org
Description: Description:
Relative position in direction x or y on a pad (may be Relative position in direction x or y on a pad (may be

View File

@@ -4,7 +4,7 @@ KernelVersion: 3.10
Contact: Samuel Ortiz <sameo@linux.intel.com> Contact: Samuel Ortiz <sameo@linux.intel.com>
linux-mei@linux.intel.com linux-mei@linux.intel.com
Description: Stores the same MODALIAS value emitted by uevent Description: Stores the same MODALIAS value emitted by uevent
Format: mei:<mei device name>:<device uuid>: Format: mei:<mei device name>:<device uuid>:<protocol version>
What: /sys/bus/mei/devices/.../name What: /sys/bus/mei/devices/.../name
Date: May 2015 Date: May 2015

View File

@@ -478,6 +478,8 @@ What: /sys/devices/system/cpu/vulnerabilities
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass /sys/devices/system/cpu/vulnerabilities/spec_store_bypass
/sys/devices/system/cpu/vulnerabilities/l1tf /sys/devices/system/cpu/vulnerabilities/l1tf
/sys/devices/system/cpu/vulnerabilities/mds /sys/devices/system/cpu/vulnerabilities/mds
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
Date: January 2018 Date: January 2018
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Description: Information about CPU vulnerabilities Description: Information about CPU vulnerabilities

View File

@@ -31,6 +31,12 @@ Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
Description: Description:
Controls the issue rate of segment discard commands. Controls the issue rate of segment discard commands.
What: /sys/fs/f2fs/<disk>/max_blkaddr
Date: November 2019
Contact: "Ramon Pantin" <pantin@google.com>
Description:
Shows first block address of MAIN area.
What: /sys/fs/f2fs/<disk>/ipu_policy What: /sys/fs/f2fs/<disk>/ipu_policy
Date: November 2013 Date: November 2013
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>

View File

@@ -0,0 +1,27 @@
What: /sys/kernel/ion
Date: Dec 2019
KernelVersion: 4.14.158
Contact: Suren Baghdasaryan <surenb@google.com>,
Sandeep Patil <sspatil@google.com>
Description:
The /sys/kernel/ion directory contains a snapshot of the
internal state of ION memory heaps and pools.
Users: kernel memory tuning tools
What: /sys/kernel/ion/total_heaps_kb
Date: Dec 2019
KernelVersion: 4.14.158
Contact: Suren Baghdasaryan <surenb@google.com>,
Sandeep Patil <sspatil@google.com>
Description:
The total_heaps_kb file is read-only and specifies how much
memory in Kb is allocated to ION heaps.
What: /sys/kernel/ion/total_pools_kb
Date: Dec 2019
KernelVersion: 4.14.158
Contact: Suren Baghdasaryan <surenb@google.com>,
Sandeep Patil <sspatil@google.com>
Description:
The total_pools_kb file is read-only and specifies how much
memory in Kb is allocated to ION pools.

View File

@@ -694,6 +694,12 @@ Conventions
informational files on the root cgroup which end up showing global informational files on the root cgroup which end up showing global
information available elsewhere shouldn't exist. information available elsewhere shouldn't exist.
- The default time unit is microseconds. If a different unit is ever
used, an explicit unit suffix must be present.
- A parts-per quantity should use a percentage decimal with at least
two digit fractional part - e.g. 13.40.
- If a controller implements weight based resource distribution, its - If a controller implements weight based resource distribution, its
interface file should be named "weight" and have the range [1, interface file should be named "weight" and have the range [1,
10000] with 100 as the default. The values are chosen to allow 10000] with 100 as the default. The values are chosen to allow
@@ -907,6 +913,13 @@ controller implements weight and absolute bandwidth limit models for
normal scheduling policy and absolute bandwidth allocation model for normal scheduling policy and absolute bandwidth allocation model for
realtime scheduling policy. realtime scheduling policy.
In all the above models, cycles distribution is defined only on a temporal
base and it does not account for the frequency at which tasks are executed.
The (optional) utilization clamping support allows to hint the schedutil
cpufreq governor about the minimum desired frequency which should always be
provided by a CPU, as well as the maximum desired frequency, which should not
be exceeded by a CPU.
WARNING: cgroup2 doesn't yet support control of realtime processes and WARNING: cgroup2 doesn't yet support control of realtime processes and
the cpu controller can only be enabled when all RT processes are in the cpu controller can only be enabled when all RT processes are in
the root cgroup. Be aware that system management software may already the root cgroup. Be aware that system management software may already
@@ -972,6 +985,33 @@ All time durations are in microseconds.
Shows pressure stall information for CPU. See Shows pressure stall information for CPU. See
Documentation/accounting/psi.txt for details. Documentation/accounting/psi.txt for details.
cpu.uclamp.min
A read-write single value file which exists on non-root cgroups.
The default is "0", i.e. no utilization boosting.
The requested minimum utilization (protection) as a percentage
rational number, e.g. 12.34 for 12.34%.
This interface allows reading and setting minimum utilization clamp
values similar to the sched_setattr(2). This minimum utilization
value is used to clamp the task specific minimum utilization clamp.
The requested minimum utilization (protection) is always capped by
the current value for the maximum utilization (limit), i.e.
`cpu.uclamp.max`.
cpu.uclamp.max
A read-write single value file which exists on non-root cgroups.
The default is "max". i.e. no utilization capping
The requested maximum utilization (limit) as a percentage rational
number, e.g. 98.76 for 98.76%.
This interface allows reading and setting maximum utilization clamp
values similar to the sched_setattr(2). This maximum utilization
value is used to clamp the task specific maximum utilization clamp.
Memory Memory
------ ------

View File

@@ -12,3 +12,5 @@ are configurable at compile, boot or run time.
spectre spectre
l1tf l1tf
mds mds
tsx_async_abort
multihit.rst

View File

@@ -265,8 +265,11 @@ time with the option "mds=". The valid arguments for this option are:
============ ============================================================= ============ =============================================================
Not specifying this option is equivalent to "mds=full". Not specifying this option is equivalent to "mds=full". For processors
that are affected by both TAA (TSX Asynchronous Abort) and MDS,
specifying just "mds=off" without an accompanying "tsx_async_abort=off"
will have no effect as the same mitigation is used for both
vulnerabilities.
Mitigation selection guide Mitigation selection guide
-------------------------- --------------------------

View File

@@ -0,0 +1,163 @@
iTLB multihit
=============
iTLB multihit is an erratum where some processors may incur a machine check
error, possibly resulting in an unrecoverable CPU lockup, when an
instruction fetch hits multiple entries in the instruction TLB. This can
occur when the page size is changed along with either the physical address
or cache type. A malicious guest running on a virtualized system can
exploit this erratum to perform a denial of service attack.
Affected processors
-------------------
Variations of this erratum are present on most Intel Core and Xeon processor
models. The erratum is not present on:
- non-Intel processors
- Some Atoms (Airmont, Bonnell, Goldmont, GoldmontPlus, Saltwell, Silvermont)
- Intel processors that have the PSCHANGE_MC_NO bit set in the
IA32_ARCH_CAPABILITIES MSR.
Related CVEs
------------
The following CVE entry is related to this issue:
============== =================================================
CVE-2018-12207 Machine Check Error Avoidance on Page Size Change
============== =================================================
Problem
-------
Privileged software, including OS and virtual machine managers (VMM), are in
charge of memory management. A key component in memory management is the control
of the page tables. Modern processors use virtual memory, a technique that creates
the illusion of a very large memory for processors. This virtual space is split
into pages of a given size. Page tables translate virtual addresses to physical
addresses.
To reduce latency when performing a virtual to physical address translation,
processors include a structure, called TLB, that caches recent translations.
There are separate TLBs for instruction (iTLB) and data (dTLB).
Under this errata, instructions are fetched from a linear address translated
using a 4 KB translation cached in the iTLB. Privileged software modifies the
paging structure so that the same linear address using large page size (2 MB, 4
MB, 1 GB) with a different physical address or memory type. After the page
structure modification but before the software invalidates any iTLB entries for
the linear address, a code fetch that happens on the same linear address may
cause a machine-check error which can result in a system hang or shutdown.
Attack scenarios
----------------
Attacks against the iTLB multihit erratum can be mounted from malicious
guests in a virtualized system.
iTLB multihit system information
--------------------------------
The Linux kernel provides a sysfs interface to enumerate the current iTLB
multihit status of the system:whether the system is vulnerable and which
mitigations are active. The relevant sysfs file is:
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
The possible values in this file are:
.. list-table::
* - Not affected
- The processor is not vulnerable.
* - KVM: Mitigation: Split huge pages
- Software changes mitigate this issue.
* - KVM: Vulnerable
- The processor is vulnerable, but no mitigation enabled
Enumeration of the erratum
--------------------------------
A new bit has been allocated in the IA32_ARCH_CAPABILITIES (PSCHANGE_MC_NO) msr
and will be set on CPU's which are mitigated against this issue.
======================================= =========== ===============================
IA32_ARCH_CAPABILITIES MSR Not present Possibly vulnerable,check model
IA32_ARCH_CAPABILITIES[PSCHANGE_MC_NO] '0' Likely vulnerable,check model
IA32_ARCH_CAPABILITIES[PSCHANGE_MC_NO] '1' Not vulnerable
======================================= =========== ===============================
Mitigation mechanism
-------------------------
This erratum can be mitigated by restricting the use of large page sizes to
non-executable pages. This forces all iTLB entries to be 4K, and removes
the possibility of multiple hits.
In order to mitigate the vulnerability, KVM initially marks all huge pages
as non-executable. If the guest attempts to execute in one of those pages,
the page is broken down into 4K pages, which are then marked executable.
If EPT is disabled or not available on the host, KVM is in control of TLB
flushes and the problematic situation cannot happen. However, the shadow
EPT paging mechanism used by nested virtualization is vulnerable, because
the nested guest can trigger multiple iTLB hits by modifying its own
(non-nested) page tables. For simplicity, KVM will make large pages
non-executable in all shadow paging modes.
Mitigation control on the kernel command line and KVM - module parameter
------------------------------------------------------------------------
The KVM hypervisor mitigation mechanism for marking huge pages as
non-executable can be controlled with a module parameter "nx_huge_pages=".
The kernel command line allows to control the iTLB multihit mitigations at
boot time with the option "kvm.nx_huge_pages=".
The valid arguments for these options are:
========== ================================================================
force Mitigation is enabled. In this case, the mitigation implements
non-executable huge pages in Linux kernel KVM module. All huge
pages in the EPT are marked as non-executable.
If a guest attempts to execute in one of those pages, the page is
broken down into 4K pages, which are then marked executable.
off Mitigation is disabled.
auto Enable mitigation only if the platform is affected and the kernel
was not booted with the "mitigations=off" command line parameter.
This is the default option.
========== ================================================================
Mitigation selection guide
--------------------------
1. No virtualization in use
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The system is protected by the kernel unconditionally and no further
action is required.
2. Virtualization with trusted guests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If the guest comes from a trusted source, you may assume that the guest will
not attempt to maliciously exploit these errata and no further action is
required.
3. Virtualization with untrusted guests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If the guest comes from an untrusted source, the guest host kernel will need
to apply iTLB multihit mitigation via the kernel command line or kvm
module parameter.

View File

@@ -0,0 +1,279 @@
.. SPDX-License-Identifier: GPL-2.0
TAA - TSX Asynchronous Abort
======================================
TAA is a hardware vulnerability that allows unprivileged speculative access to
data which is available in various CPU internal buffers by using asynchronous
aborts within an Intel TSX transactional region.
Affected processors
-------------------
This vulnerability only affects Intel processors that support Intel
Transactional Synchronization Extensions (TSX) when the TAA_NO bit (bit 8)
is 0 in the IA32_ARCH_CAPABILITIES MSR. On processors where the MDS_NO bit
(bit 5) is 0 in the IA32_ARCH_CAPABILITIES MSR, the existing MDS mitigations
also mitigate against TAA.
Whether a processor is affected or not can be read out from the TAA
vulnerability file in sysfs. See :ref:`tsx_async_abort_sys_info`.
Related CVEs
------------
The following CVE entry is related to this TAA issue:
============== ===== ===================================================
CVE-2019-11135 TAA TSX Asynchronous Abort (TAA) condition on some
microprocessors utilizing speculative execution may
allow an authenticated user to potentially enable
information disclosure via a side channel with
local access.
============== ===== ===================================================
Problem
-------
When performing store, load or L1 refill operations, processors write
data into temporary microarchitectural structures (buffers). The data in
those buffers can be forwarded to load operations as an optimization.
Intel TSX is an extension to the x86 instruction set architecture that adds
hardware transactional memory support to improve performance of multi-threaded
software. TSX lets the processor expose and exploit concurrency hidden in an
application due to dynamically avoiding unnecessary synchronization.
TSX supports atomic memory transactions that are either committed (success) or
aborted. During an abort, operations that happened within the transactional region
are rolled back. An asynchronous abort takes place, among other options, when a
different thread accesses a cache line that is also used within the transactional
region when that access might lead to a data race.
Immediately after an uncompleted asynchronous abort, certain speculatively
executed loads may read data from those internal buffers and pass it to dependent
operations. This can be then used to infer the value via a cache side channel
attack.
Because the buffers are potentially shared between Hyper-Threads cross
Hyper-Thread attacks are possible.
The victim of a malicious actor does not need to make use of TSX. Only the
attacker needs to begin a TSX transaction and raise an asynchronous abort
which in turn potenitally leaks data stored in the buffers.
More detailed technical information is available in the TAA specific x86
architecture section: :ref:`Documentation/x86/tsx_async_abort.rst <tsx_async_abort>`.
Attack scenarios
----------------
Attacks against the TAA vulnerability can be implemented from unprivileged
applications running on hosts or guests.
As for MDS, the attacker has no control over the memory addresses that can
be leaked. Only the victim is responsible for bringing data to the CPU. As
a result, the malicious actor has to sample as much data as possible and
then postprocess it to try to infer any useful information from it.
A potential attacker only has read access to the data. Also, there is no direct
privilege escalation by using this technique.
.. _tsx_async_abort_sys_info:
TAA system information
-----------------------
The Linux kernel provides a sysfs interface to enumerate the current TAA status
of mitigated systems. The relevant sysfs file is:
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
The possible values in this file are:
.. list-table::
* - 'Vulnerable'
- The CPU is affected by this vulnerability and the microcode and kernel mitigation are not applied.
* - 'Vulnerable: Clear CPU buffers attempted, no microcode'
- The system tries to clear the buffers but the microcode might not support the operation.
* - 'Mitigation: Clear CPU buffers'
- The microcode has been updated to clear the buffers. TSX is still enabled.
* - 'Mitigation: TSX disabled'
- TSX is disabled.
* - 'Not affected'
- The CPU is not affected by this issue.
.. _ucode_needed:
Best effort mitigation mode
^^^^^^^^^^^^^^^^^^^^^^^^^^^
If the processor is vulnerable, but the availability of the microcode-based
mitigation mechanism is not advertised via CPUID the kernel selects a best
effort mitigation mode. This mode invokes the mitigation instructions
without a guarantee that they clear the CPU buffers.
This is done to address virtualization scenarios where the host has the
microcode update applied, but the hypervisor is not yet updated to expose the
CPUID to the guest. If the host has updated microcode the protection takes
effect; otherwise a few CPU cycles are wasted pointlessly.
The state in the tsx_async_abort sysfs file reflects this situation
accordingly.
Mitigation mechanism
--------------------
The kernel detects the affected CPUs and the presence of the microcode which is
required. If a CPU is affected and the microcode is available, then the kernel
enables the mitigation by default.
The mitigation can be controlled at boot time via a kernel command line option.
See :ref:`taa_mitigation_control_command_line`.
.. _virt_mechanism:
Virtualization mitigation
^^^^^^^^^^^^^^^^^^^^^^^^^
Affected systems where the host has TAA microcode and TAA is mitigated by
having disabled TSX previously, are not vulnerable regardless of the status
of the VMs.
In all other cases, if the host either does not have the TAA microcode or
the kernel is not mitigated, the system might be vulnerable.
.. _taa_mitigation_control_command_line:
Mitigation control on the kernel command line
---------------------------------------------
The kernel command line allows to control the TAA mitigations at boot time with
the option "tsx_async_abort=". The valid arguments for this option are:
============ =============================================================
off This option disables the TAA mitigation on affected platforms.
If the system has TSX enabled (see next parameter) and the CPU
is affected, the system is vulnerable.
full TAA mitigation is enabled. If TSX is enabled, on an affected
system it will clear CPU buffers on ring transitions. On
systems which are MDS-affected and deploy MDS mitigation,
TAA is also mitigated. Specifying this option on those
systems will have no effect.
full,nosmt The same as tsx_async_abort=full, with SMT disabled on
vulnerable CPUs that have TSX enabled. This is the complete
mitigation. When TSX is disabled, SMT is not disabled because
CPU is not vulnerable to cross-thread TAA attacks.
============ =============================================================
Not specifying this option is equivalent to "tsx_async_abort=full". For
processors that are affected by both TAA and MDS, specifying just
"tsx_async_abort=off" without an accompanying "mds=off" will have no
effect as the same mitigation is used for both vulnerabilities.
The kernel command line also allows to control the TSX feature using the
parameter "tsx=" on CPUs which support TSX control. MSR_IA32_TSX_CTRL is used
to control the TSX feature and the enumeration of the TSX feature bits (RTM
and HLE) in CPUID.
The valid options are:
============ =============================================================
off Disables TSX on the system.
Note that this option takes effect only on newer CPUs which are
not vulnerable to MDS, i.e., have MSR_IA32_ARCH_CAPABILITIES.MDS_NO=1
and which get the new IA32_TSX_CTRL MSR through a microcode
update. This new MSR allows for the reliable deactivation of
the TSX functionality.
on Enables TSX.
Although there are mitigations for all known security
vulnerabilities, TSX has been known to be an accelerator for
several previous speculation-related CVEs, and so there may be
unknown security risks associated with leaving it enabled.
auto Disables TSX if X86_BUG_TAA is present, otherwise enables TSX
on the system.
============ =============================================================
Not specifying this option is equivalent to "tsx=off".
The following combinations of the "tsx_async_abort" and "tsx" are possible. For
affected platforms tsx=auto is equivalent to tsx=off and the result will be:
========= ========================== =========================================
tsx=on tsx_async_abort=full The system will use VERW to clear CPU
buffers. Cross-thread attacks are still
possible on SMT machines.
tsx=on tsx_async_abort=full,nosmt As above, cross-thread attacks on SMT
mitigated.
tsx=on tsx_async_abort=off The system is vulnerable.
tsx=off tsx_async_abort=full TSX might be disabled if microcode
provides a TSX control MSR. If so,
system is not vulnerable.
tsx=off tsx_async_abort=full,nosmt Ditto
tsx=off tsx_async_abort=off ditto
========= ========================== =========================================
For unaffected platforms "tsx=on" and "tsx_async_abort=full" does not clear CPU
buffers. For platforms without TSX control (MSR_IA32_ARCH_CAPABILITIES.MDS_NO=0)
"tsx" command line argument has no effect.
For the affected platforms below table indicates the mitigation status for the
combinations of CPUID bit MD_CLEAR and IA32_ARCH_CAPABILITIES MSR bits MDS_NO
and TSX_CTRL_MSR.
======= ========= ============= ========================================
MDS_NO MD_CLEAR TSX_CTRL_MSR Status
======= ========= ============= ========================================
0 0 0 Vulnerable (needs microcode)
0 1 0 MDS and TAA mitigated via VERW
1 1 0 MDS fixed, TAA vulnerable if TSX enabled
because MD_CLEAR has no meaning and
VERW is not guaranteed to clear buffers
1 X 1 MDS fixed, TAA can be mitigated by
VERW or TSX_CTRL_MSR
======= ========= ============= ========================================
Mitigation selection guide
--------------------------
1. Trusted userspace and guests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If all user space applications are from a trusted source and do not execute
untrusted code which is supplied externally, then the mitigation can be
disabled. The same applies to virtualized environments with trusted guests.
2. Untrusted userspace and guests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If there are untrusted applications or guests on the system, enabling TSX
might allow a malicious actor to leak data from the host or from other
processes running on the same physical core.
If the microcode is available and the TSX is disabled on the host, attacks
are prevented in a virtualized environment as well, even if the VMs do not
explicitly enable the mitigation.
.. _taa_default_mitigations:
Default mitigations
-------------------
The kernel's default action for vulnerable processors is:
- Deploy TSX disable mitigation (tsx_async_abort=full tsx=off).

View File

@@ -113,7 +113,7 @@
the GPE dispatcher. the GPE dispatcher.
This facility can be used to prevent such uncontrolled This facility can be used to prevent such uncontrolled
GPE floodings. GPE floodings.
Format: <int> Format: <byte>
acpi_no_auto_serialize [HW,ACPI] acpi_no_auto_serialize [HW,ACPI]
Disable auto-serialization of AML methods Disable auto-serialization of AML methods
@@ -1955,6 +1955,12 @@
Built with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y, Built with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y,
the default is off. the default is off.
kpti= [ARM64] Control page table isolation of user
and kernel address spaces.
Default: enabled on cores which need mitigation.
0: force disabled
1: force enabled
kvm.ignore_msrs=[KVM] Ignore guest accesses to unhandled MSRs. kvm.ignore_msrs=[KVM] Ignore guest accesses to unhandled MSRs.
Default is 0 (don't ignore, but inject #GP) Default is 0 (don't ignore, but inject #GP)
@@ -1965,6 +1971,25 @@
KVM MMU at runtime. KVM MMU at runtime.
Default is 0 (off) Default is 0 (off)
kvm.nx_huge_pages=
[KVM] Controls the software workaround for the
X86_BUG_ITLB_MULTIHIT bug.
force : Always deploy workaround.
off : Never deploy workaround.
auto : Deploy workaround based on the presence of
X86_BUG_ITLB_MULTIHIT.
Default is 'auto'.
If the software workaround is enabled for the host,
guests do need not to enable it for nested guests.
kvm.nx_huge_pages_recovery_ratio=
[KVM] Controls how many 4KiB pages are periodically zapped
back to huge pages. 0 disables the recovery, otherwise if
the value is N KVM will zap 1/Nth of the 4KiB pages every
minute. The default is 60.
kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM. kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM.
Default is 1 (enabled) Default is 1 (enabled)
@@ -2349,6 +2374,12 @@
SMT on vulnerable CPUs SMT on vulnerable CPUs
off - Unconditionally disable MDS mitigation off - Unconditionally disable MDS mitigation
On TAA-affected machines, mds=off can be prevented by
an active TAA mitigation as both vulnerabilities are
mitigated with the same mechanism so in order to disable
this mitigation, you need to specify tsx_async_abort=off
too.
Not specifying this option is equivalent to Not specifying this option is equivalent to
mds=full. mds=full.
@@ -2532,6 +2563,13 @@
ssbd=force-off [ARM64] ssbd=force-off [ARM64]
l1tf=off [X86] l1tf=off [X86]
mds=off [X86] mds=off [X86]
tsx_async_abort=off [X86]
kvm.nx_huge_pages=off [X86]
Exceptions:
This does not have any effect on
kvm.nx_huge_pages when
kvm.nx_huge_pages=force.
auto (default) auto (default)
Mitigate all CPU vulnerabilities, but leave SMT Mitigate all CPU vulnerabilities, but leave SMT
@@ -2547,6 +2585,7 @@
be fully mitigated, even if it means losing SMT. be fully mitigated, even if it means losing SMT.
Equivalent to: l1tf=flush,nosmt [X86] Equivalent to: l1tf=flush,nosmt [X86]
mds=full,nosmt [X86] mds=full,nosmt [X86]
tsx_async_abort=full,nosmt [X86]
mminit_loglevel= mminit_loglevel=
[KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this [KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
@@ -4709,6 +4748,76 @@
marks the TSC unconditionally unstable at bootup and marks the TSC unconditionally unstable at bootup and
avoids any further wobbles once the TSC watchdog notices. avoids any further wobbles once the TSC watchdog notices.
tsx= [X86] Control Transactional Synchronization
Extensions (TSX) feature in Intel processors that
support TSX control.
This parameter controls the TSX feature. The options are:
on - Enable TSX on the system. Although there are
mitigations for all known security vulnerabilities,
TSX has been known to be an accelerator for
several previous speculation-related CVEs, and
so there may be unknown security risks associated
with leaving it enabled.
off - Disable TSX on the system. (Note that this
option takes effect only on newer CPUs which are
not vulnerable to MDS, i.e., have
MSR_IA32_ARCH_CAPABILITIES.MDS_NO=1 and which get
the new IA32_TSX_CTRL MSR through a microcode
update. This new MSR allows for the reliable
deactivation of the TSX functionality.)
auto - Disable TSX if X86_BUG_TAA is present,
otherwise enable TSX on the system.
Not specifying this option is equivalent to tsx=off.
See Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
for more details.
tsx_async_abort= [X86,INTEL] Control mitigation for the TSX Async
Abort (TAA) vulnerability.
Similar to Micro-architectural Data Sampling (MDS)
certain CPUs that support Transactional
Synchronization Extensions (TSX) are vulnerable to an
exploit against CPU internal buffers which can forward
information to a disclosure gadget under certain
conditions.
In vulnerable processors, the speculatively forwarded
data can be used in a cache side channel attack, to
access data to which the attacker does not have direct
access.
This parameter controls the TAA mitigation. The
options are:
full - Enable TAA mitigation on vulnerable CPUs
if TSX is enabled.
full,nosmt - Enable TAA mitigation and disable SMT on
vulnerable CPUs. If TSX is disabled, SMT
is not disabled because CPU is not
vulnerable to cross-thread TAA attacks.
off - Unconditionally disable TAA mitigation
On MDS-affected machines, tsx_async_abort=off can be
prevented by an active MDS mitigation as both vulnerabilities
are mitigated with the same mechanism so in order to disable
this mitigation, you need to specify mds=off too.
Not specifying this option is equivalent to
tsx_async_abort=full. On CPUs which are MDS affected
and deploy MDS mitigation, TAA mitigation is not
required and doesn't provide any additional
mitigation.
For details see:
Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
turbografx.map[2|3]= [HW,JOY] turbografx.map[2|3]= [HW,JOY]
TurboGraFX parallel port interface TurboGraFX parallel port interface
Format: Format:
@@ -4857,13 +4966,13 @@
Flags is a set of characters, each corresponding Flags is a set of characters, each corresponding
to a common usb-storage quirk flag as follows: to a common usb-storage quirk flag as follows:
a = SANE_SENSE (collect more than 18 bytes a = SANE_SENSE (collect more than 18 bytes
of sense data); of sense data, not on uas);
b = BAD_SENSE (don't collect more than 18 b = BAD_SENSE (don't collect more than 18
bytes of sense data); bytes of sense data, not on uas);
c = FIX_CAPACITY (decrease the reported c = FIX_CAPACITY (decrease the reported
device capacity by one sector); device capacity by one sector);
d = NO_READ_DISC_INFO (don't use d = NO_READ_DISC_INFO (don't use
READ_DISC_INFO command); READ_DISC_INFO command, not on uas);
e = NO_READ_CAPACITY_16 (don't use e = NO_READ_CAPACITY_16 (don't use
READ_CAPACITY_16 command); READ_CAPACITY_16 command);
f = NO_REPORT_OPCODES (don't use report opcodes f = NO_REPORT_OPCODES (don't use report opcodes
@@ -4878,17 +4987,18 @@
j = NO_REPORT_LUNS (don't use report luns j = NO_REPORT_LUNS (don't use report luns
command, uas only); command, uas only);
l = NOT_LOCKABLE (don't try to lock and l = NOT_LOCKABLE (don't try to lock and
unlock ejectable media); unlock ejectable media, not on uas);
m = MAX_SECTORS_64 (don't transfer more m = MAX_SECTORS_64 (don't transfer more
than 64 sectors = 32 KB at a time); than 64 sectors = 32 KB at a time,
not on uas);
n = INITIAL_READ10 (force a retry of the n = INITIAL_READ10 (force a retry of the
initial READ(10) command); initial READ(10) command, not on uas);
o = CAPACITY_OK (accept the capacity o = CAPACITY_OK (accept the capacity
reported by the device); reported by the device, not on uas);
p = WRITE_CACHE (the device cache is ON p = WRITE_CACHE (the device cache is ON
by default); by default, not on uas);
r = IGNORE_RESIDUE (the device reports r = IGNORE_RESIDUE (the device reports
bogus residue values); bogus residue values, not on uas);
s = SINGLE_LUN (the device has only one s = SINGLE_LUN (the device has only one
Logical Unit); Logical Unit);
t = NO_ATA_1X (don't allow ATA(12) and ATA(16) t = NO_ATA_1X (don't allow ATA(12) and ATA(16)
@@ -4897,7 +5007,8 @@
w = NO_WP_DETECT (don't test whether the w = NO_WP_DETECT (don't test whether the
medium is write-protected). medium is write-protected).
y = ALWAYS_SYNC (issue a SYNCHRONIZE_CACHE y = ALWAYS_SYNC (issue a SYNCHRONIZE_CACHE
even if the device claims no cache) even if the device claims no cache,
not on uas)
Example: quirks=0419:aaf5:rl,0421:0433:rc Example: quirks=0419:aaf5:rl,0421:0433:rc
user_debug= [KNL,ARM] user_debug= [KNL,ARM]
@@ -5136,6 +5247,10 @@
the unplug protocol the unplug protocol
never -- do not unplug even if version check succeeds never -- do not unplug even if version check succeeds
xen_legacy_crash [X86,XEN]
Crash from Xen panic notifier, without executing late
panic() code such as dumping handler.
xen_nopvspin [X86,XEN] xen_nopvspin [X86,XEN]
Disables the ticketlock slowpath using Xen PV Disables the ticketlock slowpath using Xen PV
optimizations. optimizations.

View File

@@ -0,0 +1,183 @@
.. SPDX-License-Identifier: GPL-2.0
=================
Inline Encryption
=================
Objective
=========
We want to support inline encryption (IE) in the kernel.
To allow for testing, we also want a crypto API fallback when actual
IE hardware is absent. We also want IE to work with layered devices
like dm and loopback (i.e. we want to be able to use the IE hardware
of the underlying devices if present, or else fall back to crypto API
en/decryption).
Constraints and notes
=====================
- IE hardware have a limited number of "keyslots" that can be programmed
with an encryption context (key, algorithm, data unit size, etc.) at any time.
One can specify a keyslot in a data request made to the device, and the
device will en/decrypt the data using the encryption context programmed into
that specified keyslot. When possible, we want to make multiple requests with
the same encryption context share the same keyslot.
- We need a way for filesystems to specify an encryption context to use for
en/decrypting a struct bio, and a device driver (like UFS) needs to be able
to use that encryption context when it processes the bio.
- We need a way for device drivers to expose their capabilities in a unified
way to the upper layers.
Design
======
We add a struct bio_crypt_ctx to struct bio that can represent an
encryption context, because we need to be able to pass this encryption
context from the FS layer to the device driver to act upon.
While IE hardware works on the notion of keyslots, the FS layer has no
knowledge of keyslots - it simply wants to specify an encryption context to
use while en/decrypting a bio.
We introduce a keyslot manager (KSM) that handles the translation from
encryption contexts specified by the FS to keyslots on the IE hardware.
This KSM also serves as the way IE hardware can expose their capabilities to
upper layers. The generic mode of operation is: each device driver that wants
to support IE will construct a KSM and set it up in its struct request_queue.
Upper layers that want to use IE on this device can then use this KSM in
the device's struct request_queue to translate an encryption context into
a keyslot. The presence of the KSM in the request queue shall be used to mean
that the device supports IE.
On the device driver end of the interface, the device driver needs to tell the
KSM how to actually manipulate the IE hardware in the device to do things like
programming the crypto key into the IE hardware into a particular keyslot. All
this is achieved through the :c:type:`struct keyslot_mgmt_ll_ops` that the
device driver passes to the KSM when creating it.
It uses refcounts to track which keyslots are idle (either they have no
encryption context programmed, or there are no in-flight struct bios
referencing that keyslot). When a new encryption context needs a keyslot, it
tries to find a keyslot that has already been programmed with the same
encryption context, and if there is no such keyslot, it evicts the least
recently used idle keyslot and programs the new encryption context into that
one. If no idle keyslots are available, then the caller will sleep until there
is at least one.
Blk-crypto
==========
The above is sufficient for simple cases, but does not work if there is a
need for a crypto API fallback, or if we are want to use IE with layered
devices. To these ends, we introduce blk-crypto. Blk-crypto allows us to
present a unified view of encryption to the FS (so FS only needs to specify
an encryption context and not worry about keyslots at all), and blk-crypto
can decide whether to delegate the en/decryption to IE hardware or to the
crypto API. Blk-crypto maintains an internal KSM that serves as the crypto
API fallback.
Blk-crypto needs to ensure that the encryption context is programmed into the
"correct" keyslot manager for IE. If a bio is submitted to a layered device
that eventually passes the bio down to a device that really does support IE, we
want the encryption context to be programmed into a keyslot for the KSM of the
device with IE support. However, blk-crypto does not know a priori whether a
particular device is the final device in the layering structure for a bio or
not. So in the case that a particular device does not support IE, since it is
possibly the final destination device for the bio, if the bio requires
encryption (i.e. the bio is doing a write operation), blk-crypto must fallback
to the crypto API *before* sending the bio to the device.
Blk-crypto ensures that:
- The bio's encryption context is programmed into a keyslot in the KSM of the
request queue that the bio is being submitted to (or the crypto API fallback
KSM if the request queue doesn't have a KSM), and that the ``bc_ksm``
in the ``bi_crypt_context`` is set to this KSM
- That the bio has its own individual reference to the keyslot in this KSM.
Once the bio passes through blk-crypto, its encryption context is programmed
in some KSM. The "its own individual reference to the keyslot" ensures that
keyslots can be released by each bio independently of other bios while
ensuring that the bio has a valid reference to the keyslot when, for e.g., the
crypto API fallback KSM in blk-crypto performs crypto on the device's behalf.
The individual references are ensured by increasing the refcount for the
keyslot in the ``bc_ksm`` when a bio with a programmed encryption
context is cloned.
What blk-crypto does on bio submission
--------------------------------------
**Case 1:** blk-crypto is given a bio with only an encryption context that hasn't
been programmed into any keyslot in any KSM (for e.g. a bio from the FS).
In this case, blk-crypto will program the encryption context into the KSM of the
request queue the bio is being submitted to (and if this KSM does not exist,
then it will program it into blk-crypto's internal KSM for crypto API
fallback). The KSM that this encryption context was programmed into is stored
as the ``bc_ksm`` in the bio's ``bi_crypt_context``.
**Case 2:** blk-crypto is given a bio whose encryption context has already been
programmed into a keyslot in the *crypto API fallback* KSM.
In this case, blk-crypto does nothing; it treats the bio as not having
specified an encryption context. Note that we cannot do here what we will do
in Case 3 because we would have already encrypted the bio via the crypto API
by this point.
**Case 3:** blk-crypto is given a bio whose encryption context has already been
programmed into a keyslot in some KSM (that is *not* the crypto API fallback
KSM).
In this case, blk-crypto first releases that keyslot from that KSM and then
treats the bio as in Case 1.
This way, when a device driver is processing a bio, it can be sure that
the bio's encryption context has been programmed into some KSM (either the
device driver's request queue's KSM, or blk-crypto's crypto API fallback KSM).
It then simply needs to check if the bio's ``bc_ksm`` is the device's
request queue's KSM. If so, then it should proceed with IE. If not, it should
simply do nothing with respect to crypto, because some other KSM (perhaps the
blk-crypto crypto API fallback KSM) is handling the en/decryption.
Blk-crypto will release the keyslot that is being held by the bio (and also
decrypt it if the bio is using the crypto API fallback KSM) once
``bio_remaining_done`` returns true for the bio.
Layered Devices
===============
Layered devices that wish to support IE need to create their own keyslot
manager for their request queue, and expose whatever functionality they choose.
When a layered device wants to pass a bio to another layer (either by
resubmitting the same bio, or by submitting a clone), it doesn't need to do
anything special because the bio (or the clone) will once again pass through
blk-crypto, which will work as described in Case 3. If a layered device wants
for some reason to do the IO by itself instead of passing it on to a child
device, but it also chose to expose IE capabilities by setting up a KSM in its
request queue, it is then responsible for en/decrypting the data itself. In
such cases, the device can choose to call the blk-crypto function
``blk_crypto_fallback_to_kernel_crypto_api`` (TODO: Not yet implemented), which will
cause the en/decryption to be done via the crypto API fallback.
Future Optimizations for layered devices
========================================
Creating a keyslot manager for the layered device uses up memory for each
keyslot, and in general, a layered device (like dm-linear) merely passes the
request on to a "child" device, so the keyslots in the layered device itself
might be completely unused. We can instead define a new type of KSM; the
"passthrough KSM", that layered devices can use to let blk-crypto know that
this layered device *will* pass the bio to some child device (and hence
through blk-crypto again, at which point blk-crypto can program the encryption
context, instead of programming it into the layered device's KSM). Again, if
the device "lies" and decides to do the IO itself instead of passing it on to
a child device, it is responsible for doing the en/decryption (and can choose
to call ``blk_crypto_fallback_to_kernel_crypto_api``). Another use case for the
"passthrough KSM" is for IE devices that want to manage their own keyslots/do
not have a limited number of keyslots.

View File

@@ -34,6 +34,7 @@ Profiling data will only become accessible once debugfs has been mounted::
Coverage collection Coverage collection
------------------- -------------------
The following program demonstrates coverage collection from within a test The following program demonstrates coverage collection from within a test
program using kcov: program using kcov:
@@ -128,6 +129,7 @@ only need to enable coverage (disable happens automatically on thread end).
Comparison operands collection Comparison operands collection
------------------------------ ------------------------------
Comparison operands collection is similar to coverage collection: Comparison operands collection is similar to coverage collection:
.. code-block:: c .. code-block:: c
@@ -202,3 +204,130 @@ Comparison operands collection is similar to coverage collection:
Note that the kcov modes (coverage collection or comparison operands) are Note that the kcov modes (coverage collection or comparison operands) are
mutually exclusive. mutually exclusive.
Remote coverage collection
--------------------------
With KCOV_ENABLE coverage is collected only for syscalls that are issued
from the current process. With KCOV_REMOTE_ENABLE it's possible to collect
coverage for arbitrary parts of the kernel code, provided that those parts
are annotated with kcov_remote_start()/kcov_remote_stop().
This allows to collect coverage from two types of kernel background
threads: the global ones, that are spawned during kernel boot in a limited
number of instances (e.g. one USB hub_event() worker thread is spawned per
USB HCD); and the local ones, that are spawned when a user interacts with
some kernel interface (e.g. vhost workers).
To enable collecting coverage from a global background thread, a unique
global handle must be assigned and passed to the corresponding
kcov_remote_start() call. Then a userspace process can pass a list of such
handles to the KCOV_REMOTE_ENABLE ioctl in the handles array field of the
kcov_remote_arg struct. This will attach the used kcov device to the code
sections, that are referenced by those handles.
Since there might be many local background threads spawned from different
userspace processes, we can't use a single global handle per annotation.
Instead, the userspace process passes a non-zero handle through the
common_handle field of the kcov_remote_arg struct. This common handle gets
saved to the kcov_handle field in the current task_struct and needs to be
passed to the newly spawned threads via custom annotations. Those threads
should in turn be annotated with kcov_remote_start()/kcov_remote_stop().
Internally kcov stores handles as u64 integers. The top byte of a handle
is used to denote the id of a subsystem that this handle belongs to, and
the lower 4 bytes are used to denote the id of a thread instance within
that subsystem. A reserved value 0 is used as a subsystem id for common
handles as they don't belong to a particular subsystem. The bytes 4-7 are
currently reserved and must be zero. In the future the number of bytes
used for the subsystem or handle ids might be increased.
When a particular userspace proccess collects coverage by via a common
handle, kcov will collect coverage for each code section that is annotated
to use the common handle obtained as kcov_handle from the current
task_struct. However non common handles allow to collect coverage
selectively from different subsystems.
.. code-block:: c
struct kcov_remote_arg {
__u32 trace_mode;
__u32 area_size;
__u32 num_handles;
__aligned_u64 common_handle;
__aligned_u64 handles[0];
};
#define KCOV_INIT_TRACE _IOR('c', 1, unsigned long)
#define KCOV_DISABLE _IO('c', 101)
#define KCOV_REMOTE_ENABLE _IOW('c', 102, struct kcov_remote_arg)
#define COVER_SIZE (64 << 10)
#define KCOV_TRACE_PC 0
#define KCOV_SUBSYSTEM_COMMON (0x00ull << 56)
#define KCOV_SUBSYSTEM_USB (0x01ull << 56)
#define KCOV_SUBSYSTEM_MASK (0xffull << 56)
#define KCOV_INSTANCE_MASK (0xffffffffull)
static inline __u64 kcov_remote_handle(__u64 subsys, __u64 inst)
{
if (subsys & ~KCOV_SUBSYSTEM_MASK || inst & ~KCOV_INSTANCE_MASK)
return 0;
return subsys | inst;
}
#define KCOV_COMMON_ID 0x42
#define KCOV_USB_BUS_NUM 1
int main(int argc, char **argv)
{
int fd;
unsigned long *cover, n, i;
struct kcov_remote_arg *arg;
fd = open("/sys/kernel/debug/kcov", O_RDWR);
if (fd == -1)
perror("open"), exit(1);
if (ioctl(fd, KCOV_INIT_TRACE, COVER_SIZE))
perror("ioctl"), exit(1);
cover = (unsigned long*)mmap(NULL, COVER_SIZE * sizeof(unsigned long),
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if ((void*)cover == MAP_FAILED)
perror("mmap"), exit(1);
/* Enable coverage collection via common handle and from USB bus #1. */
arg = calloc(1, sizeof(*arg) + sizeof(uint64_t));
if (!arg)
perror("calloc"), exit(1);
arg->trace_mode = KCOV_TRACE_PC;
arg->area_size = COVER_SIZE;
arg->num_handles = 1;
arg->common_handle = kcov_remote_handle(KCOV_SUBSYSTEM_COMMON,
KCOV_COMMON_ID);
arg->handles[0] = kcov_remote_handle(KCOV_SUBSYSTEM_USB,
KCOV_USB_BUS_NUM);
if (ioctl(fd, KCOV_REMOTE_ENABLE, arg))
perror("ioctl"), free(arg), exit(1);
free(arg);
/*
* Here the user needs to trigger execution of a kernel code section
* that is either annotated with the common handle, or to trigger some
* activity on USB bus #1.
*/
sleep(2);
n = __atomic_load_n(&cover[0], __ATOMIC_RELAXED);
for (i = 0; i < n; i++)
printf("0x%lx\n", cover[i + 1]);
if (ioctl(fd, KCOV_DISABLE, 0))
perror("ioctl"), exit(1);
if (munmap(cover, COVER_SIZE * sizeof(unsigned long)))
perror("munmap"), exit(1);
if (close(fd))
perror("close"), exit(1);
return 0;
}

View File

@@ -75,6 +75,15 @@ its hardware characteristcs.
* port or ports: same as above. * port or ports: same as above.
* Optional properties for all components:
* arm,coresight-loses-context-with-cpu : boolean. Indicates that the
hardware will lose register context on CPU power down (e.g. CPUIdle).
An example of where this may be needed are systems which contain a
coresight component and CPU in the same power domain. When the CPU
powers down the coresight component also powers down and loses its
context. This property is currently only used for the ETM 4.x driver.
* Optional properties for ETM/PTMs: * Optional properties for ETM/PTMs:
* arm,cp14: must be present if the system accesses ETM/PTM management * arm,cp14: must be present if the system accesses ETM/PTM management

View File

@@ -35,6 +35,7 @@ Required standard properties:
"ti,sysc-omap3-sham" "ti,sysc-omap3-sham"
"ti,sysc-omap-aes" "ti,sysc-omap-aes"
"ti,sysc-mcasp" "ti,sysc-mcasp"
"ti,sysc-dra7-mcasp"
"ti,sysc-usb-host-fs" "ti,sysc-usb-host-fs"
"ti,sysc-dra7-mcan" "ti,sysc-dra7-mcan"

View File

@@ -46,7 +46,7 @@ Required properties:
Example (R-Car H3): Example (R-Car H3):
usb2_clksel: clock-controller@e6590630 { usb2_clksel: clock-controller@e6590630 {
compatible = "renesas,r8a77950-rcar-usb2-clock-sel", compatible = "renesas,r8a7795-rcar-usb2-clock-sel",
"renesas,rcar-gen3-usb2-clock-sel"; "renesas,rcar-gen3-usb2-clock-sel";
reg = <0 0xe6590630 0 0x02>; reg = <0 0xe6590630 0 0x02>;
clocks = <&cpg CPG_MOD 703>, <&usb_extal>, <&usb_xtal>; clocks = <&cpg CPG_MOD 703>, <&usb_extal>, <&usb_xtal>;

View File

@@ -73,7 +73,7 @@ Example:
}; };
}; };
port@10 { port@a {
reg = <10>; reg = <10>;
adv7482_txa: endpoint { adv7482_txa: endpoint {
@@ -83,7 +83,7 @@ Example:
}; };
}; };
port@11 { port@b {
reg = <11>; reg = <11>;
adv7482_txb: endpoint { adv7482_txb: endpoint {

View File

@@ -19,6 +19,9 @@ Optional properties:
- interrupt-names: must be "mdio_done_error" when there is a share interrupt fed - interrupt-names: must be "mdio_done_error" when there is a share interrupt fed
to this hardware block, or must be "mdio_done" for the first interrupt and to this hardware block, or must be "mdio_done" for the first interrupt and
"mdio_error" for the second when there are separate interrupts "mdio_error" for the second when there are separate interrupts
- clocks: A reference to the clock supplying the MDIO bus controller
- clock-frequency: the MDIO bus clock that must be output by the MDIO bus
hardware, if absent, the default hardware values are used
Child nodes of this MDIO bus controller node are standard Ethernet PHY device Child nodes of this MDIO bus controller node are standard Ethernet PHY device
nodes as described in Documentation/devicetree/bindings/net/phy.txt nodes as described in Documentation/devicetree/bindings/net/phy.txt

View File

@@ -0,0 +1,27 @@
OMAP ROM RNG driver binding
Secure SoCs may provide RNG via secure ROM calls like Nokia N900 does. The
implementation can depend on the SoC secure ROM used.
- compatible:
Usage: required
Value type: <string>
Definition: must be "nokia,n900-rom-rng"
- clocks:
Usage: required
Value type: <prop-encoded-array>
Definition: reference to the the RNG interface clock
- clock-names:
Usage: required
Value type: <stringlist>
Definition: must be "ick"
Example:
rom_rng: rng {
compatible = "nokia,n900-rom-rng";
clocks = <&rng_ick>;
clock-names = "ick";
};

View File

@@ -27,4 +27,4 @@ and valid to enable charging:
- "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V) - "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
- "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output - "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
resistor, the other values are in ohm. resistor, the other values are in kOhm.

View File

@@ -5,18 +5,20 @@ UniPhier SoCs have SCSSI which supports SPI single channel.
Required properties: Required properties:
- compatible: should be "socionext,uniphier-scssi" - compatible: should be "socionext,uniphier-scssi"
- reg: address and length of the spi master registers - reg: address and length of the spi master registers
- #address-cells: must be <1>, see spi-bus.txt - interrupts: a single interrupt specifier
- #size-cells: must be <0>, see spi-bus.txt - pinctrl-names: should be "default"
- clocks: A phandle to the clock for the device. - pinctrl-0: pin control state for the default mode
- resets: A phandle to the reset control for the device. - clocks: a phandle to the clock for the device
- resets: a phandle to the reset control for the device
Example: Example:
spi0: spi@54006000 { spi0: spi@54006000 {
compatible = "socionext,uniphier-scssi"; compatible = "socionext,uniphier-scssi";
reg = <0x54006000 0x100>; reg = <0x54006000 0x100>;
#address-cells = <1>; interrupts = <0 39 4>;
#size-cells = <0>; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi0>;
clocks = <&peri_clk 11>; clocks = <&peri_clk 11>;
resets = <&peri_rst 11>; resets = <&peri_rst 11>;
}; };

View File

@@ -164,6 +164,49 @@ A driver's probe() may return a negative errno value to indicate that
the driver did not bind to this device, in which case it should have the driver did not bind to this device, in which case it should have
released all resources it allocated. released all resources it allocated.
void (*sync_state)(struct device *dev);
sync_state is called only once for a device. It's called when all the consumer
devices of the device have successfully probed. The list of consumers of the
device is obtained by looking at the device links connecting that device to its
consumer devices.
The first attempt to call sync_state() is made during late_initcall_sync() to
give firmware and drivers time to link devices to each other. During the first
attempt at calling sync_state(), if all the consumers of the device at that
point in time have already probed successfully, sync_state() is called right
away. If there are no consumers of the device during the first attempt, that
too is considered as "all consumers of the device have probed" and sync_state()
is called right away.
If during the first attempt at calling sync_state() for a device, there are
still consumers that haven't probed successfully, the sync_state() call is
postponed and reattempted in the future only when one or more consumers of the
device probe successfully. If during the reattempt, the driver core finds that
there are one or more consumers of the device that haven't probed yet, then
sync_state() call is postponed again.
A typical use case for sync_state() is to have the kernel cleanly take over
management of devices from the bootloader. For example, if a device is left on
and at a particular hardware configuration by the bootloader, the device's
driver might need to keep the device in the boot configuration until all the
consumers of the device have probed. Once all the consumers of the device have
probed, the device's driver can synchronize the hardware state of the device to
match the aggregated software state requested by all the consumers. Hence the
name sync_state().
While obvious examples of resources that can benefit from sync_state() include
resources such as regulator, sync_state() can also be useful for complex
resources like IOMMUs. For example, IOMMUs with multiple consumers (devices
whose addresses are remapped by the IOMMU) might need to keep their mappings
fixed at (or additive to) the boot configuration until all its consumers have
probed.
While the typical use case for sync_state() is to have the kernel cleanly take
over management of devices from the bootloader, the usage of sync_state() is
not restricted to that. Use it whenever it makes sense to take an action after
all the consumers of a device have probed.
int (*remove) (struct device * dev); int (*remove) (struct device * dev);
remove is called to unbind a driver from a device. This may be remove is called to unbind a driver from a device. This may be

View File

@@ -297,6 +297,9 @@ Files in /sys/fs/f2fs/<devname>
reclaim the prefree segments to free segments. reclaim the prefree segments to free segments.
By default, 5% over total # of segments. By default, 5% over total # of segments.
main_blkaddr This value gives the first block address of
MAIN area in the partition.
max_small_discards This parameter controls the number of discard max_small_discards This parameter controls the number of discard
commands that consist small blocks less than 2MB. commands that consist small blocks less than 2MB.
The candidates to be discarded are cached until The candidates to be discarded are cached until
@@ -346,7 +349,7 @@ Files in /sys/fs/f2fs/<devname>
ram_thresh This parameter controls the memory footprint used ram_thresh This parameter controls the memory footprint used
by free nids and cached nat entries. By default, by free nids and cached nat entries. By default,
10 is set, which indicates 10 MB / 1 GB RAM. 1 is set, which indicates 10 MB / 1 GB RAM.
ra_nid_pages When building free nids, F2FS reads NAT blocks ra_nid_pages When building free nids, F2FS reads NAT blocks
ahead for speed up. Default is 0. ahead for speed up. Default is 0.

View File

@@ -256,13 +256,8 @@ alternative master keys or to support rotating master keys. Instead,
the master keys may be wrapped in userspace, e.g. as is done by the the master keys may be wrapped in userspace, e.g. as is done by the
`fscrypt <https://github.com/google/fscrypt>`_ tool. `fscrypt <https://github.com/google/fscrypt>`_ tool.
Including the inode number in the IVs was considered. However, it was DIRECT_KEY policies
rejected as it would have prevented ext4 filesystems from being -------------------
resized, and by itself still wouldn't have been sufficient to prevent
the same key from being directly reused for both XTS and CTS-CBC.
DIRECT_KEY and per-mode keys
----------------------------
The Adiantum encryption mode (see `Encryption modes and usage`_) is The Adiantum encryption mode (see `Encryption modes and usage`_) is
suitable for both contents and filenames encryption, and it accepts suitable for both contents and filenames encryption, and it accepts
@@ -285,6 +280,21 @@ IV. Moreover:
key derived using the KDF. Users may use the same master key for key derived using the KDF. Users may use the same master key for
other v2 encryption policies. other v2 encryption policies.
IV_INO_LBLK_64 policies
-----------------------
When FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 is set in the fscrypt policy,
the encryption keys are derived from the master key, encryption mode
number, and filesystem UUID. This normally results in all files
protected by the same master key sharing a single contents encryption
key and a single filenames encryption key. To still encrypt different
files' data differently, inode numbers are included in the IVs.
Consequently, shrinking the filesystem may not be allowed.
This format is optimized for use with inline encryption hardware
compliant with the UFS or eMMC standards, which support only 64 IV
bits per I/O request and may have only a small number of keyslots.
Key identifiers Key identifiers
--------------- ---------------
@@ -308,8 +318,9 @@ If unsure, you should use the (AES-256-XTS, AES-256-CTS-CBC) pair.
AES-128-CBC was added only for low-powered embedded devices with AES-128-CBC was added only for low-powered embedded devices with
crypto accelerators such as CAAM or CESA that do not support XTS. To crypto accelerators such as CAAM or CESA that do not support XTS. To
use AES-128-CBC, CONFIG_CRYPTO_SHA256 (or another SHA-256 use AES-128-CBC, CONFIG_CRYPTO_ESSIV and CONFIG_CRYPTO_SHA256 (or
implementation) must be enabled so that ESSIV can be used. another SHA-256 implementation) must be enabled so that ESSIV can be
used.
Adiantum is a (primarily) stream cipher-based mode that is fast even Adiantum is a (primarily) stream cipher-based mode that is fast even
on CPUs without dedicated crypto instructions. It's also a true on CPUs without dedicated crypto instructions. It's also a true
@@ -341,10 +352,16 @@ a little endian number, except that:
is encrypted with AES-256 where the AES-256 key is the SHA-256 hash is encrypted with AES-256 where the AES-256 key is the SHA-256 hash
of the file's data encryption key. of the file's data encryption key.
- In the "direct key" configuration (FSCRYPT_POLICY_FLAG_DIRECT_KEY - With `DIRECT_KEY policies`_, the file's nonce is appended to the IV.
set in the fscrypt_policy), the file's nonce is also appended to the Currently this is only allowed with the Adiantum encryption mode.
IV. Currently this is only allowed with the Adiantum encryption
mode. - With `IV_INO_LBLK_64 policies`_, the logical block number is limited
to 32 bits and is placed in bits 0-31 of the IV. The inode number
(which is also limited to 32 bits) is placed in bits 32-63.
Note that because file logical block numbers are included in the IVs,
filesystems must enforce that blocks are never shifted around within
encrypted files, e.g. via "collapse range" or "insert range".
Filenames encryption Filenames encryption
-------------------- --------------------
@@ -354,10 +371,10 @@ the requirements to retain support for efficient directory lookups and
filenames of up to 255 bytes, the same IV is used for every filename filenames of up to 255 bytes, the same IV is used for every filename
in a directory. in a directory.
However, each encrypted directory still uses a unique key; or However, each encrypted directory still uses a unique key, or
alternatively (for the "direct key" configuration) has the file's alternatively has the file's nonce (for `DIRECT_KEY policies`_) or
nonce included in the IVs. Thus, IV reuse is limited to within a inode number (for `IV_INO_LBLK_64 policies`_) included in the IVs.
single directory. Thus, IV reuse is limited to within a single directory.
With CTS-CBC, the IV reuse means that when the plaintext filenames With CTS-CBC, the IV reuse means that when the plaintext filenames
share a common prefix at least as long as the cipher block size (16 share a common prefix at least as long as the cipher block size (16
@@ -431,12 +448,15 @@ This structure must be initialized as follows:
(1) for ``contents_encryption_mode`` and FSCRYPT_MODE_AES_256_CTS (1) for ``contents_encryption_mode`` and FSCRYPT_MODE_AES_256_CTS
(4) for ``filenames_encryption_mode``. (4) for ``filenames_encryption_mode``.
- ``flags`` must contain a value from ``<linux/fscrypt.h>`` which - ``flags`` contains optional flags from ``<linux/fscrypt.h>``:
identifies the amount of NUL-padding to use when encrypting
filenames. If unsure, use FSCRYPT_POLICY_FLAGS_PAD_32 (0x3). - FSCRYPT_POLICY_FLAGS_PAD_*: The amount of NUL padding to use when
Additionally, if the encryption modes are both encrypting filenames. If unsure, use FSCRYPT_POLICY_FLAGS_PAD_32
FSCRYPT_MODE_ADIANTUM, this can contain (0x3).
FSCRYPT_POLICY_FLAG_DIRECT_KEY; see `DIRECT_KEY and per-mode keys`_. - FSCRYPT_POLICY_FLAG_DIRECT_KEY: See `DIRECT_KEY policies`_.
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64: See `IV_INO_LBLK_64
policies`_. This is mutually exclusive with DIRECT_KEY and is not
supported on v1 policies.
- For v2 encryption policies, ``__reserved`` must be zeroed. - For v2 encryption policies, ``__reserved`` must be zeroed.
@@ -1089,7 +1109,7 @@ policy structs (see `Setting an encryption policy`_), except that the
context structs also contain a nonce. The nonce is randomly generated context structs also contain a nonce. The nonce is randomly generated
by the kernel and is used as KDF input or as a tweak to cause by the kernel and is used as KDF input or as a tweak to cause
different files to be encrypted differently; see `Per-file keys`_ and different files to be encrypted differently; see `Per-file keys`_ and
`DIRECT_KEY and per-mode keys`_. `DIRECT_KEY policies`_.
Data path changes Data path changes
----------------- -----------------

View File

@@ -226,6 +226,14 @@ To do so, check for FS_VERITY_FL (0x00100000) in the returned flags.
The verity flag is not settable via FS_IOC_SETFLAGS. You must use The verity flag is not settable via FS_IOC_SETFLAGS. You must use
FS_IOC_ENABLE_VERITY instead, since parameters must be provided. FS_IOC_ENABLE_VERITY instead, since parameters must be provided.
statx
-----
Since Linux v5.5, the statx() system call sets STATX_ATTR_VERITY if
the file has fs-verity enabled. This can perform better than
FS_IOC_GETFLAGS and FS_IOC_MEASURE_VERITY because it doesn't require
opening the file, and opening verity files can be expensive.
Accessing verity files Accessing verity files
====================== ======================
@@ -398,7 +406,7 @@ pages have been read into the pagecache. (See `Verifying data`_.)
ext4 ext4
---- ----
ext4 supports fs-verity since Linux TODO and e2fsprogs v1.45.2. ext4 supports fs-verity since Linux v5.4 and e2fsprogs v1.45.2.
To create verity files on an ext4 filesystem, the filesystem must have To create verity files on an ext4 filesystem, the filesystem must have
been formatted with ``-O verity`` or had ``tune2fs -O verity`` run on been formatted with ``-O verity`` or had ``tune2fs -O verity`` run on
@@ -434,7 +442,7 @@ also only supports extent-based files.
f2fs f2fs
---- ----
f2fs supports fs-verity since Linux TODO and f2fs-tools v1.11.0. f2fs supports fs-verity since Linux v5.4 and f2fs-tools v1.11.0.
To create verity files on an f2fs filesystem, the filesystem must have To create verity files on an f2fs filesystem, the filesystem must have
been formatted with ``-O verity``. been formatted with ``-O verity``.

View File

@@ -427,6 +427,7 @@ SwapPss: 0 kB
KernelPageSize: 4 kB KernelPageSize: 4 kB
MMUPageSize: 4 kB MMUPageSize: 4 kB
Locked: 0 kB Locked: 0 kB
THPeligible: 0
VmFlags: rd ex mr mw me dw VmFlags: rd ex mr mw me dw
Name: name from userspace Name: name from userspace
@@ -465,6 +466,8 @@ replaced by copy-on-write) part of the underlying shmem object out on swap.
"SwapPss" shows proportional swap share of this mapping. Unlike "Swap", this "SwapPss" shows proportional swap share of this mapping. Unlike "Swap", this
does not take into account swapped out page of underlying shmem objects. does not take into account swapped out page of underlying shmem objects.
"Locked" indicates whether the mapping is locked in memory or not. "Locked" indicates whether the mapping is locked in memory or not.
"THPeligible" indicates whether the mapping is eligible for THP pages - 1 if
true, 0 otherwise.
"VmFlags" field deserves a separate description. This member represents the kernel "VmFlags" field deserves a separate description. This member represents the kernel
flags associated with the particular virtual memory area in two letter encoded flags associated with the particular virtual memory area in two letter encoded
@@ -866,6 +869,7 @@ Writeback: 0 kB
AnonPages: 861800 kB AnonPages: 861800 kB
Mapped: 280372 kB Mapped: 280372 kB
Shmem: 644 kB Shmem: 644 kB
KReclaimable: 168048 kB
Slab: 284364 kB Slab: 284364 kB
SReclaimable: 159856 kB SReclaimable: 159856 kB
SUnreclaim: 124508 kB SUnreclaim: 124508 kB
@@ -933,6 +937,9 @@ AnonHugePages: Non-file backed huge pages mapped into userspace page tables
ShmemHugePages: Memory used by shared memory (shmem) and tmpfs allocated ShmemHugePages: Memory used by shared memory (shmem) and tmpfs allocated
with huge pages with huge pages
ShmemPmdMapped: Shared memory mapped into userspace with huge pages ShmemPmdMapped: Shared memory mapped into userspace with huge pages
KReclaimable: Kernel allocations that the kernel will attempt to reclaim
under memory pressure. Includes SReclaimable (below), and other
direct allocations with a shrinker.
Slab: in-kernel data structures cache Slab: in-kernel data structures cache
SReclaimable: Part of Slab, that might be reclaimed, such as caches SReclaimable: Part of Slab, that might be reclaimed, such as caches
SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure

View File

@@ -160,7 +160,7 @@ them but you should handle them according to your needs.
UHID_OUTPUT: UHID_OUTPUT:
This is sent if the HID device driver wants to send raw data to the I/O This is sent if the HID device driver wants to send raw data to the I/O
device on the interrupt channel. You should read the payload and forward it to device on the interrupt channel. You should read the payload and forward it to
the device. The payload is of type "struct uhid_data_req". the device. The payload is of type "struct uhid_output_req".
This may be received even though you haven't received UHID_OPEN, yet. This may be received even though you haven't received UHID_OPEN, yet.
UHID_GET_REPORT: UHID_GET_REPORT:

View File

@@ -90,6 +90,51 @@ There are two ways in which a group may become throttled:
In case b) above, even though the child may have runtime remaining it will not In case b) above, even though the child may have runtime remaining it will not
be allowed to until the parent's runtime is refreshed. be allowed to until the parent's runtime is refreshed.
CFS Bandwidth Quota Caveats
---------------------------
Once a slice is assigned to a cpu it does not expire. However all but 1ms of
the slice may be returned to the global pool if all threads on that cpu become
unrunnable. This is configured at compile time by the min_cfs_rq_runtime
variable. This is a performance tweak that helps prevent added contention on
the global lock.
The fact that cpu-local slices do not expire results in some interesting corner
cases that should be understood.
For cgroup cpu constrained applications that are cpu limited this is a
relatively moot point because they will naturally consume the entirety of their
quota as well as the entirety of each cpu-local slice in each period. As a
result it is expected that nr_periods roughly equal nr_throttled, and that
cpuacct.usage will increase roughly equal to cfs_quota_us in each period.
For highly-threaded, non-cpu bound applications this non-expiration nuance
allows applications to briefly burst past their quota limits by the amount of
unused slice on each cpu that the task group is running on (typically at most
1ms per cpu or as defined by min_cfs_rq_runtime). This slight burst only
applies if quota had been assigned to a cpu and then not fully used or returned
in previous periods. This burst amount will not be transferred between cores.
As a result, this mechanism still strictly limits the task group to quota
average usage, albeit over a longer time window than a single period. This
also limits the burst ability to no more than 1ms per cpu. This provides
better more predictable user experience for highly threaded applications with
small quota limits on high core count machines. It also eliminates the
propensity to throttle these applications while simultanously using less than
quota amounts of cpu. Another way to say this, is that by allowing the unused
portion of a slice to remain valid across periods we have decreased the
possibility of wastefully expiring quota on cpu-local silos that don't need a
full slice's amount of cpu time.
The interaction between cpu-bound and non-cpu-bound-interactive applications
should also be considered, especially when single core usage hits 100%. If you
gave each of these applications half of a cpu-core and they both got scheduled
on the same CPU it is theoretically possible that the non-cpu bound application
will use up to 1ms additional quota in some periods, thereby preventing the
cpu-bound application from fully using its quota by that same amount. In these
instances it will be up to the CFS algorithm (see sched-design-CFS.rst) to
decide which application is chosen to run, as they will both be runnable and
have remaining quota. This runtime discrepancy will be made up in the following
periods when the interactive application idles.
Examples Examples
-------- --------
1. Limit a group to 1 CPU worth of runtime. 1. Limit a group to 1 CPU worth of runtime.

View File

@@ -233,9 +233,9 @@ Thus, with the sched_cfs_boost enabled we have the following main functions to
get the current utilization of a CPU: get the current utilization of a CPU:
cpu_util() cpu_util()
boosted_cpu_util() stune_util()
The new boosted_cpu_util() is similar to the first but returns a boosted The new stune_util() is similar to the first but returns a boosted
utilization signal which is a function of the sched_cfs_boost value. utilization signal which is a function of the sched_cfs_boost value.
This function is used in the CFS scheduler code paths where schedutil needs to This function is used in the CFS scheduler code paths where schedutil needs to

View File

@@ -693,8 +693,7 @@ allowed to execute.
perf_event_paranoid: perf_event_paranoid:
Controls use of the performance events system by unprivileged Controls use of the performance events system by unprivileged
users (without CAP_SYS_ADMIN). The default value is 3 if users (without CAP_SYS_ADMIN). The default value is 2.
CONFIG_SECURITY_PERF_EVENTS_RESTRICT is set, or 2 otherwise.
-1: Allow use of (almost) all events by all users -1: Allow use of (almost) all events by all users
Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK
@@ -702,7 +701,6 @@ CONFIG_SECURITY_PERF_EVENTS_RESTRICT is set, or 2 otherwise.
Disallow raw tracepoint access by users without CAP_SYS_ADMIN Disallow raw tracepoint access by users without CAP_SYS_ADMIN
>=1: Disallow CPU event access by users without CAP_SYS_ADMIN >=1: Disallow CPU event access by users without CAP_SYS_ADMIN
>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN >=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
>=3: Disallow all event access by users without CAP_SYS_ADMIN
============================================================== ==============================================================

View File

@@ -15,8 +15,6 @@ The acquisition orders for mutexes are as follows:
On x86, vcpu->mutex is taken outside kvm->arch.hyperv.hv_lock. On x86, vcpu->mutex is taken outside kvm->arch.hyperv.hv_lock.
For spinlocks, kvm_lock is taken outside kvm->mmu_lock.
Everything else is a leaf: no other lock is taken inside the critical Everything else is a leaf: no other lock is taken inside the critical
sections. sections.
@@ -169,7 +167,7 @@ which time it will be set using the Dirty tracking mechanism described above.
------------ ------------
Name: kvm_lock Name: kvm_lock
Type: spinlock_t Type: mutex
Arch: any Arch: any
Protects: - vm_list Protects: - vm_list

View File

@@ -6,3 +6,4 @@ x86 architecture specifics
:maxdepth: 1 :maxdepth: 1
mds mds
tsx_async_abort

View File

@@ -0,0 +1,117 @@
.. SPDX-License-Identifier: GPL-2.0
TSX Async Abort (TAA) mitigation
================================
.. _tsx_async_abort:
Overview
--------
TSX Async Abort (TAA) is a side channel attack on internal buffers in some
Intel processors similar to Microachitectural Data Sampling (MDS). In this
case certain loads may speculatively pass invalid data to dependent operations
when an asynchronous abort condition is pending in a Transactional
Synchronization Extensions (TSX) transaction. This includes loads with no
fault or assist condition. Such loads may speculatively expose stale data from
the same uarch data structures as in MDS, with same scope of exposure i.e.
same-thread and cross-thread. This issue affects all current processors that
support TSX.
Mitigation strategy
-------------------
a) TSX disable - one of the mitigations is to disable TSX. A new MSR
IA32_TSX_CTRL will be available in future and current processors after
microcode update which can be used to disable TSX. In addition, it
controls the enumeration of the TSX feature bits (RTM and HLE) in CPUID.
b) Clear CPU buffers - similar to MDS, clearing the CPU buffers mitigates this
vulnerability. More details on this approach can be found in
:ref:`Documentation/admin-guide/hw-vuln/mds.rst <mds>`.
Kernel internal mitigation modes
--------------------------------
============= ============================================================
off Mitigation is disabled. Either the CPU is not affected or
tsx_async_abort=off is supplied on the kernel command line.
tsx disabled Mitigation is enabled. TSX feature is disabled by default at
bootup on processors that support TSX control.
verw Mitigation is enabled. CPU is affected and MD_CLEAR is
advertised in CPUID.
ucode needed Mitigation is enabled. CPU is affected and MD_CLEAR is not
advertised in CPUID. That is mainly for virtualization
scenarios where the host has the updated microcode but the
hypervisor does not expose MD_CLEAR in CPUID. It's a best
effort approach without guarantee.
============= ============================================================
If the CPU is affected and the "tsx_async_abort" kernel command line parameter is
not provided then the kernel selects an appropriate mitigation depending on the
status of RTM and MD_CLEAR CPUID bits.
Below tables indicate the impact of tsx=on|off|auto cmdline options on state of
TAA mitigation, VERW behavior and TSX feature for various combinations of
MSR_IA32_ARCH_CAPABILITIES bits.
1. "tsx=off"
========= ========= ============ ============ ============== =================== ======================
MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=off
---------------------------------- -------------------------------------------------------------------------
TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
========= ========= ============ ============ ============== =================== ======================
0 0 0 HW default Yes Same as MDS Same as MDS
0 0 1 Invalid case Invalid case Invalid case Invalid case
0 1 0 HW default No Need ucode update Need ucode update
0 1 1 Disabled Yes TSX disabled TSX disabled
1 X 1 Disabled X None needed None needed
========= ========= ============ ============ ============== =================== ======================
2. "tsx=on"
========= ========= ============ ============ ============== =================== ======================
MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=on
---------------------------------- -------------------------------------------------------------------------
TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
========= ========= ============ ============ ============== =================== ======================
0 0 0 HW default Yes Same as MDS Same as MDS
0 0 1 Invalid case Invalid case Invalid case Invalid case
0 1 0 HW default No Need ucode update Need ucode update
0 1 1 Enabled Yes None Same as MDS
1 X 1 Enabled X None needed None needed
========= ========= ============ ============ ============== =================== ======================
3. "tsx=auto"
========= ========= ============ ============ ============== =================== ======================
MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=auto
---------------------------------- -------------------------------------------------------------------------
TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
========= ========= ============ ============ ============== =================== ======================
0 0 0 HW default Yes Same as MDS Same as MDS
0 0 1 Invalid case Invalid case Invalid case Invalid case
0 1 0 HW default No Need ucode update Need ucode update
0 1 1 Disabled Yes TSX disabled TSX disabled
1 X 1 Enabled X None needed None needed
========= ========= ============ ============ ============== =================== ======================
In the tables, TSX_CTRL_MSR is a new bit in MSR_IA32_ARCH_CAPABILITIES that
indicates whether MSR_IA32_TSX_CTRL is supported.
There are two control bits in IA32_TSX_CTRL MSR:
Bit 0: When set it disables the Restricted Transactional Memory (RTM)
sub-feature of TSX (will force all transactions to abort on the
XBEGIN instruction).
Bit 1: When set it disables the enumeration of the RTM and HLE feature
(i.e. it will make CPUID(EAX=7).EBX{bit4} and
CPUID(EAX=7).EBX{bit11} read as 0).

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 4 VERSION = 4
PATCHLEVEL = 19 PATCHLEVEL = 19
SUBLEVEL = 80 SUBLEVEL = 101
EXTRAVERSION = EXTRAVERSION =
NAME = "People's Front" NAME = "People's Front"
@@ -837,10 +837,24 @@ LDFLAGS_vmlinux += --gc-sections
endif endif
ifdef CONFIG_LTO_CLANG ifdef CONFIG_LTO_CLANG
lto-clang-flags := -flto -fvisibility=hidden ifdef CONFIG_THINLTO
lto-clang-flags := -flto=thin
KBUILD_LDFLAGS += --thinlto-cache-dir=.thinlto-cache
else
lto-clang-flags := -flto
endif
lto-clang-flags += -fvisibility=default $(call cc-option, -fsplit-lto-unit)
# Limit inlining across translation units to reduce binary size
LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5
KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG)
KBUILD_LDFLAGS_MODULE += $(LD_FLAGS_LTO_CLANG)
KBUILD_LDS_MODULE += $(srctree)/scripts/module-lto.lds
# allow disabling only clang LTO where needed # allow disabling only clang LTO where needed
DISABLE_LTO_CLANG := -fno-lto -fvisibility=default DISABLE_LTO_CLANG := -fno-lto
export DISABLE_LTO_CLANG export DISABLE_LTO_CLANG
endif endif
@@ -853,7 +867,7 @@ export LTO_CFLAGS DISABLE_LTO
endif endif
ifdef CONFIG_CFI_CLANG ifdef CONFIG_CFI_CLANG
cfi-clang-flags += -fsanitize=cfi $(call cc-option, -fsplit-lto-unit) cfi-clang-flags += -fsanitize=cfi -fno-sanitize-cfi-canonical-jump-tables
DISABLE_CFI_CLANG := -fno-sanitize=cfi DISABLE_CFI_CLANG := -fno-sanitize=cfi
ifdef CONFIG_MODULES ifdef CONFIG_MODULES
cfi-clang-flags += -fsanitize-cfi-cross-dso cfi-clang-flags += -fsanitize-cfi-cross-dso
@@ -878,6 +892,12 @@ DISABLE_LTO += $(DISABLE_CFI)
export CFI_CFLAGS DISABLE_CFI export CFI_CFLAGS DISABLE_CFI
endif endif
ifdef CONFIG_SHADOW_CALL_STACK
CC_FLAGS_SCS := -fsanitize=shadow-call-stack
KBUILD_CFLAGS += $(CC_FLAGS_SCS)
export CC_FLAGS_SCS
endif
# arch Makefile may override CC so keep this after arch Makefile is included # arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
@@ -926,6 +946,12 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
# change __FILE__ to the relative path from the srctree # change __FILE__ to the relative path from the srctree
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
# ensure -fcf-protection is disabled when using retpoline as it is
# incompatible with -mindirect-branch=thunk-extern
ifdef CONFIG_RETPOLINE
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
endif
# use the deterministic mode of AR if available # use the deterministic mode of AR if available
KBUILD_ARFLAGS := $(call ar-option,D) KBUILD_ARFLAGS := $(call ar-option,D)
@@ -1053,6 +1079,7 @@ ifdef CONFIG_STACK_VALIDATION
endif endif
endif endif
PHONY += prepare0
ifeq ($(KBUILD_EXTMOD),) ifeq ($(KBUILD_EXTMOD),)
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
@@ -1161,8 +1188,7 @@ scripts: scripts_basic asm-generic gcc-plugins $(autoksyms_h)
# archprepare is used in arch Makefiles and when processed asm symlink, # archprepare is used in arch Makefiles and when processed asm symlink,
# version.h and scripts_basic is processed / created. # version.h and scripts_basic is processed / created.
# Listed in dependency order PHONY += prepare archprepare prepare1 prepare2 prepare3
PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
# prepare3 is used to check if we are building in a separate output directory, # prepare3 is used to check if we are building in a separate output directory,
# and if so do: # and if so do:
@@ -1596,9 +1622,6 @@ else # KBUILD_EXTMOD
# We are always building modules # We are always building modules
KBUILD_MODULES := 1 KBUILD_MODULES := 1
PHONY += crmodverdir
crmodverdir:
$(cmd_crmodverdir)
PHONY += $(objtree)/Module.symvers PHONY += $(objtree)/Module.symvers
$(objtree)/Module.symvers: $(objtree)/Module.symvers:
@@ -1610,7 +1633,7 @@ $(objtree)/Module.symvers:
module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
PHONY += $(module-dirs) modules PHONY += $(module-dirs) modules
$(module-dirs): crmodverdir $(objtree)/Module.symvers $(module-dirs): prepare $(objtree)/Module.symvers
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
modules: $(module-dirs) modules: $(module-dirs)
@@ -1651,7 +1674,8 @@ help:
# Dummies... # Dummies...
PHONY += prepare scripts PHONY += prepare scripts
prepare: ; prepare:
$(cmd_crmodverdir)
scripts: ; scripts: ;
endif # KBUILD_EXTMOD endif # KBUILD_EXTMOD
@@ -1779,17 +1803,14 @@ endif
# Modules # Modules
/: prepare scripts FORCE /: prepare scripts FORCE
$(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir) $(build)=$(build-dir)
# Make sure the latest headers are built for Documentation # Make sure the latest headers are built for Documentation
Documentation/ samples/: headers_install Documentation/ samples/: headers_install
%/: prepare scripts FORCE %/: prepare scripts FORCE
$(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir) $(build)=$(build-dir)
%.ko: prepare scripts FORCE %.ko: prepare scripts FORCE
$(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir) $(@:.ko=.o) $(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost

File diff suppressed because it is too large Load Diff

939
abi_gki_aarch64_whitelist Normal file
View File

@@ -0,0 +1,939 @@
[abi_whitelist]
add_timer
add_uevent_var
add_wait_queue
alloc_chrdev_region
__alloc_disk_node
alloc_etherdev_mqs
alloc_netdev_mqs
alloc_pages_exact
__alloc_pages_nodemask
__alloc_percpu
__alloc_skb
__alloc_workqueue_key
arch_bpf_jit_check_func
__arch_copy_from_user
__arch_copy_to_user
arm64_const_caps_ready
autoremove_wake_function
bcmp
bin2hex
blk_cleanup_queue
blk_execute_rq
blk_get_queue
blk_get_request
blk_mq_alloc_tag_set
blk_mq_complete_request
__blk_mq_end_request
blk_mq_end_request
blk_mq_free_tag_set
blk_mq_init_queue
blk_mq_quiesce_queue
blk_mq_requeue_request
blk_mq_run_hw_queues
blk_mq_start_request
blk_mq_start_stopped_hw_queues
blk_mq_stop_hw_queue
blk_mq_unquiesce_queue
blk_mq_virtio_map_queues
blk_put_queue
blk_put_request
blk_queue_alignment_offset
blk_queue_bounce_limit
blk_queue_flag_clear
blk_queue_flag_set
blk_queue_io_min
blk_queue_io_opt
blk_queue_logical_block_size
blk_queue_max_discard_sectors
blk_queue_max_hw_sectors
blk_queue_max_segments
blk_queue_max_segment_size
blk_queue_physical_block_size
blk_queue_rq_timeout
blk_queue_write_cache
blk_rq_map_kern
blk_rq_map_sg
blk_status_to_errno
blk_update_request
bpf_prog_add
bpf_prog_put
bpf_prog_sub
bpf_trace_run10
bpf_trace_run2
bpf_trace_run8
bpf_warn_invalid_xdp_action
bprm_change_interp
build_skb
bus_find_device_by_name
bus_register
bus_unregister
call_netdevice_notifiers
call_rcu
cancel_delayed_work
cancel_delayed_work_sync
cancel_work_sync
capable
cdev_add
cdev_alloc
cdev_del
cdev_device_add
cdev_device_del
cdev_init
cfg80211_connect_done
cfg80211_disconnected
cfg80211_inform_bss_data
cfg80211_put_bss
cfg80211_scan_done
__cfi_slowpath
check_disk_change
__check_object_size
__class_create
class_destroy
__class_register
class_unregister
clear_inode
clear_page
clk_disable
clk_enable
clk_get_rate
clk_prepare
clk_unprepare
__close_fd
complete
complete_all
completion_done
console_suspend_enabled
__const_udelay
consume_skb
contig_page_data
_copy_from_iter_full
copy_page
copy_strings_kernel
_copy_to_iter
cpu_bit_bitmap
cpufreq_generic_attr
cpufreq_register_driver
cpufreq_unregister_driver
__cpuhp_remove_state
__cpuhp_setup_state
__cpuhp_state_add_instance
__cpuhp_state_remove_instance
cpu_hwcap_keys
cpu_hwcaps
cpumask_next
cpumask_next_wrap
cpu_number
__cpu_online_mask
cpus_read_lock
cpus_read_unlock
cpu_topology
crypto_ablkcipher_type
crypto_dequeue_request
crypto_enqueue_request
crypto_init_queue
crypto_register_alg
crypto_unregister_alg
_ctype
current_time
datagram_poll
d_drop
debugfs_create_dir
debugfs_create_file
debugfs_create_x32
debugfs_remove
debugfs_remove_recursive
debug_smp_processor_id
default_llseek
default_wake_function
delayed_work_timer_fn
del_gendisk
del_timer
del_timer_sync
dentry_open
destroy_workqueue
dev_add_pack
dev_close
dev_driver_string
_dev_err
dev_fwnode
__dev_get_by_index
dev_get_by_index
dev_get_by_index_rcu
dev_get_stats
device_add
device_add_disk
device_create
device_create_file
device_del
device_destroy
device_find_child
device_for_each_child
device_initialize
device_property_present
device_property_read_u32_array
device_register
device_remove_file
device_unregister
_dev_info
__dev_kfree_skb_any
devm_clk_get
dev_mc_sync_multiple
dev_mc_unsync
devm_gpiod_get_index
devm_gpio_request_one
devm_ioremap
devm_ioremap_resource
devm_kfree
devm_kmalloc
devm_regulator_get_optional
__devm_request_region
devm_request_threaded_irq
__devm_reset_control_get
devm_rtc_allocate_device
_dev_notice
dev_open
dev_pm_domain_attach
dev_pm_domain_detach
dev_printk
dev_queue_xmit
dev_remove_pack
devres_add
__devres_alloc_node
devres_destroy
devres_free
dev_set_mtu
dev_set_name
dev_uc_sync_multiple
dev_uc_unsync
_dev_warn
d_instantiate
disable_irq
dma_alloc_from_dev_coherent
dma_buf_export
dma_buf_fd
dma_buf_get
dma_buf_put
dma_fence_context_alloc
dma_fence_enable_sw_signaling
dma_fence_init
dma_fence_match_context
dma_fence_release
dma_fence_signal
dma_fence_signal_locked
dma_fence_wait_timeout
dma_release_from_dev_coherent
down_read
down_write
dput
driver_register
driver_unregister
drm_add_edid_modes
drm_add_modes_noedid
drm_atomic_helper_check
drm_atomic_helper_cleanup_planes
drm_atomic_helper_commit
drm_atomic_helper_commit_hw_done
drm_atomic_helper_commit_modeset_disables
drm_atomic_helper_commit_modeset_enables
drm_atomic_helper_commit_planes
drm_atomic_helper_connector_destroy_state
drm_atomic_helper_connector_duplicate_state
drm_atomic_helper_connector_reset
drm_atomic_helper_crtc_destroy_state
drm_atomic_helper_crtc_duplicate_state
drm_atomic_helper_crtc_reset
drm_atomic_helper_disable_plane
drm_atomic_helper_page_flip
drm_atomic_helper_plane_destroy_state
drm_atomic_helper_plane_duplicate_state
drm_atomic_helper_plane_reset
drm_atomic_helper_set_config
drm_atomic_helper_shutdown
drm_atomic_helper_update_plane
drm_atomic_helper_wait_for_vblanks
drm_class_device_register
drm_class_device_unregister
drm_clflush_pages
drm_compat_ioctl
drm_connector_attach_edid_property
drm_connector_attach_encoder
drm_connector_cleanup
drm_connector_init
drm_connector_register
drm_connector_unregister
drm_connector_update_edid_property
drm_crtc_cleanup
drm_crtc_init_with_planes
drm_crtc_send_vblank_event
drm_cvt_mode
drm_dbg
drm_debugfs_create_files
drm_dev_alloc
drm_dev_put
drm_dev_register
drm_dev_set_unique
drm_do_get_edid
drm_encoder_cleanup
drm_encoder_init
drm_err
drm_framebuffer_init
drm_gem_fb_create_handle
drm_gem_fb_destroy
drm_gem_handle_create
drm_gem_object_init
drm_gem_object_lookup
drm_gem_object_put_unlocked
drm_gem_object_release
drm_gem_prime_export
drm_gem_prime_fd_to_handle
drm_gem_prime_handle_to_fd
drm_gem_prime_import
drm_gem_prime_mmap
drm_global_item_ref
drm_global_item_unref
drm_helper_hpd_irq_event
drm_helper_mode_fill_fb_struct
drm_helper_probe_single_connector_modes
drm_ht_create
drm_ht_find_item
drm_ht_insert_item
drm_ht_just_insert_please
drm_ht_remove
drm_ht_remove_item
drm_ioctl
drm_kms_helper_hotplug_event
drm_mm_init
drm_mm_insert_node_in_range
drm_mm_print
drm_mm_remove_node
drm_mm_takedown
drm_mode_config_cleanup
drm_mode_config_init
drm_mode_config_reset
drm_mode_probed_add
drm_open
drm_plane_cleanup
drm_poll
drm_prime_pages_to_sg
__drm_printfn_debug
drm_put_dev
drm_read
drm_release
drm_set_preferred_mode
drm_universal_plane_init
drm_vma_offset_add
drm_vma_offset_lookup_locked
drm_vma_offset_manager_destroy
drm_vma_offset_manager_init
drm_vma_offset_remove
drop_nlink
dummy_dma_ops
eth_commit_mac_addr_change
ether_setup
eth_prepare_mac_addr_change
__ethtool_get_link_ksettings
ethtool_op_get_link
ethtool_op_get_ts_info
eth_type_trans
eth_validate_addr
event_triggers_call
fasync_helper
fd_install
filp_close
finish_wait
flow_keys_basic_dissector
flush_work
flush_workqueue
fput
free_irq
free_netdev
__free_pages
free_pages
free_pages_exact
free_percpu
freezing_slow_path
fsl8250_handle_irq
generic_file_llseek
get_device
__get_free_pages
get_next_ino
get_random_bytes
__get_task_comm
get_unused_fd_flags
gnss_allocate_device
gnss_deregister_device
gnss_insert_raw
gnss_put_device
gnss_register_device
gpiod_cansleep
gpiod_get_raw_value
gpiod_get_raw_value_cansleep
gpiod_get_value
gpiod_get_value_cansleep
gpiod_is_active_low
gpiod_set_debounce
gpiod_to_irq
gpio_to_desc
hrtimer_active
hrtimer_cancel
hrtimer_forward
hrtimer_init
hrtimer_start_range_ns
hvc_alloc
hvc_instantiate
hvc_kick
hvc_poll
hvc_remove
__hvc_resize
hwrng_register
hwrng_unregister
ida_alloc_range
ida_destroy
ida_free
init_net
__init_rwsem
init_timer_key
init_wait_entry
__init_waitqueue_head
input_alloc_absinfo
input_allocate_device
input_event
input_free_device
input_mt_init_slots
input_register_device
input_set_abs_params
input_unregister_device
iomem_resource
__ioremap
__iounmap
iput
irq_dispose_mapping
irq_set_affinity_hint
irq_set_irq_wake
jiffies
jiffies_to_msecs
kernel_kobj
kernel_read
kfree
kfree_call_rcu
kfree_skb
kill_fasync
kill_litter_super
kimage_voffset
__kmalloc
kmalloc_caches
kmalloc_order_trace
kmem_cache_alloc
kmem_cache_alloc_trace
kmem_cache_create
kmem_cache_destroy
kmem_cache_free
kmemdup
kobject_create_and_add
kobject_del
kobject_init_and_add
kobject_put
kobject_uevent
kobject_uevent_env
kstrdup
kstrtoint
kstrtoull
kthread_create_on_node
kthread_create_worker
kthread_destroy_worker
kthread_queue_work
kthread_should_stop
kthread_stop
ktime_get
ktime_get_real_seconds
ktime_get_ts64
ktime_get_with_offset
kvfree
kvmalloc_node
kzfree
led_classdev_unregister
led_trigger_event
led_trigger_register_simple
led_trigger_unregister_simple
__ll_sc_atomic64_add
__ll_sc_atomic64_add_return_relaxed
__ll_sc_atomic64_andnot
__ll_sc_atomic64_fetch_or
__ll_sc_atomic64_or
__ll_sc_atomic64_sub
__ll_sc_atomic_add
__ll_sc_atomic_add_return
__ll_sc_atomic_sub
__ll_sc_atomic_sub_return
__ll_sc___cmpxchg_case_mb_4
__ll_sc___cmpxchg_case_mb_8
__local_bh_enable_ip
lockref_get
lock_sock_nested
lookup_one_len
mark_page_accessed
memcpy
__memcpy_fromio
__memcpy_toio
memdup_user
memmove
memparse
memset
__memset_io
memstart_addr
memzero_explicit
misc_deregister
misc_register
mod_node_page_state
mod_timer
__module_get
module_put
mount_single
__msecs_to_jiffies
msleep
__mutex_init
mutex_lock
mutex_lock_interruptible
mutex_trylock
mutex_unlock
__napi_alloc_skb
napi_complete_done
napi_consume_skb
napi_disable
napi_gro_receive
napi_hash_del
__napi_schedule
napi_schedule_prep
__netdev_alloc_skb
netdev_change_features
netdev_err
netdev_increment_features
netdev_info
netdev_lower_state_changed
netdev_master_upper_dev_link
netdev_notify_peers
netdev_rx_handler_register
netdev_rx_handler_unregister
netdev_upper_dev_link
netdev_upper_dev_unlink
netdev_warn
netif_carrier_off
netif_carrier_on
netif_device_attach
netif_device_detach
netif_napi_add
netif_napi_del
netif_receive_skb
netif_rx
netif_rx_ni
netif_schedule_queue
netif_set_real_num_rx_queues
netif_set_real_num_tx_queues
__netif_set_xps_queue
netif_stacked_transfer_operstate
netif_tx_stop_all_queues
netif_tx_wake_queue
netlink_capable
__netlink_dump_start
net_ratelimit
new_inode
nf_conntrack_destroy
nla_memcpy
nla_parse
nla_put
__nlmsg_put
no_llseek
nonseekable_open
noop_llseek
nr_cpu_ids
nr_swap_pages
nsecs_to_jiffies
of_address_to_resource
of_alias_get_id
of_device_is_big_endian
of_device_is_compatible
of_find_property
of_get_child_by_name
of_get_next_child
of_get_property
of_irq_get
of_led_classdev_register
of_match_device
of_parse_phandle
of_property_read_u64
of_property_read_variable_u32_array
open_exec
panic
param_ops_bool
param_ops_charp
param_ops_int
param_ops_uint
passthru_features_check
pci_alloc_irq_vectors_affinity
pci_bus_type
pci_disable_device
pci_enable_device
pci_find_capability
pci_find_ext_capability
pci_find_next_capability
pci_free_irq_vectors
pci_iomap_range
pci_irq_get_affinity
pci_irq_vector
pci_read_config_byte
pci_read_config_dword
__pci_register_driver
pci_release_selected_regions
pci_request_selected_regions
pci_set_master
pci_unregister_driver
PDE_DATA
__per_cpu_offset
perf_trace_buf_alloc
perf_trace_run_bpf_submit
pipe_lock
pipe_unlock
platform_bus_type
platform_device_add
platform_device_add_data
platform_device_alloc
platform_device_del
platform_device_put
platform_device_register_full
platform_device_unregister
__platform_driver_register
platform_driver_unregister
platform_get_irq
platform_get_resource
plist_add
pm_generic_resume
pm_generic_runtime_resume
pm_generic_runtime_suspend
pm_generic_suspend
__pm_runtime_disable
pm_runtime_enable
__pm_runtime_idle
__pm_runtime_resume
pm_runtime_set_autosuspend_delay
__pm_runtime_set_status
__pm_runtime_suspend
__pm_runtime_use_autosuspend
pm_wakeup_dev_event
prandom_u32
preempt_count_add
preempt_count_sub
preempt_schedule
preempt_schedule_notrace
prepare_binprm
prepare_to_wait
prepare_to_wait_event
printk
proc_create_net_single
proc_mkdir_data
proto_register
proto_unregister
__put_cred
put_device
put_disk
__put_page
put_unused_fd
queue_delayed_work_on
queue_work_on
___ratelimit
_raw_read_lock
_raw_read_unlock
_raw_spin_lock
_raw_spin_lock_bh
_raw_spin_lock_irq
_raw_spin_lock_irqsave
_raw_spin_trylock
_raw_spin_unlock
_raw_spin_unlock_bh
_raw_spin_unlock_irq
_raw_spin_unlock_irqrestore
_raw_write_lock
_raw_write_lock_bh
_raw_write_unlock
_raw_write_unlock_bh
rb_erase
rb_insert_color
rcu_barrier
__rcu_read_lock
__rcu_read_unlock
refcount_dec_and_test_checked
refcount_inc_checked
refcount_inc_not_zero_checked
__refrigerator
__register_binfmt
register_blkdev
__register_chrdev
register_filesystem
register_netdev
register_netdevice
register_netdevice_notifier
register_pernet_subsys
register_pm_notifier
register_shrinker
regulator_count_voltages
regulator_disable
regulator_enable
regulator_get_current_limit
regulator_get_voltage
regulator_is_supported_voltage
regulator_list_voltage
regulator_set_voltage
release_sock
remap_pfn_range
remove_arg_zero
remove_conflicting_framebuffers
remove_proc_entry
remove_wait_queue
__request_module
request_threaded_irq
reservation_object_add_excl_fence
reservation_object_add_shared_fence
reservation_object_copy_fences
reservation_object_reserve_shared
reservation_object_test_signaled_rcu
reservation_object_wait_timeout_rcu
reservation_ww_class
reset_control_assert
reset_control_deassert
revalidate_disk
round_jiffies
__rtc_register_device
rtc_time64_to_tm
rtc_tm_to_time64
rtc_update_irq
rtnl_is_locked
rtnl_link_register
rtnl_link_unregister
rtnl_lock
rtnl_register_module
rtnl_unlock
rtnl_unregister
rtnl_unregister_all
scatterwalk_map_and_copy
sched_setscheduler
schedule
schedule_timeout
scnprintf
search_binary_handler
security_sock_graft
send_sig
seq_lseek
seq_printf
seq_putc
seq_puts
seq_read
serdev_device_close
serdev_device_open
serdev_device_set_baudrate
serdev_device_set_flow_control
serdev_device_wait_until_sent
serdev_device_write
serdev_device_write_wakeup
serial8250_get_port
serial8250_register_8250_port
serial8250_resume_port
serial8250_suspend_port
serial8250_unregister_port
set_disk_ro
set_page_dirty
sg_alloc_table
sg_alloc_table_from_pages
sg_copy_from_buffer
sg_copy_to_buffer
sg_free_table
sg_init_one
sg_init_table
sg_miter_next
sg_miter_start
sg_miter_stop
sg_nents
sg_nents_for_len
sg_next
__sg_page_iter_next
__sg_page_iter_start
shmem_file_setup
shmem_read_mapping_page_gfp
si_mem_available
si_meminfo
simple_attr_open
simple_attr_read
simple_attr_release
simple_attr_write
simple_fill_super
simple_pin_fs
simple_read_from_buffer
simple_release_fs
simple_statfs
simple_strtoul
single_open
single_release
sk_alloc
skb_add_rx_frag
skb_clone
skb_coalesce_rx_frag
skb_copy
skb_dequeue
__skb_flow_dissect
skb_free_datagram
skb_page_frag_refill
skb_partial_csum_set
skb_put
skb_queue_purge
skb_queue_tail
skb_recv_datagram
skb_to_sgvec
skb_trim
skb_tstamp_tx
sk_free
snprintf
sock_alloc_send_skb
sock_diag_register
sock_diag_save_cookie
sock_diag_unregister
sock_efree
sock_get_timestamp
sock_i_ino
sock_init_data
sock_no_accept
sock_no_bind
sock_no_connect
sock_no_getname
sock_no_getsockopt
sock_no_ioctl
sock_no_listen
sock_no_mmap
sock_no_sendpage
sock_no_setsockopt
sock_no_shutdown
sock_no_socketpair
sock_queue_rcv_skb
__sock_recv_ts_and_drops
sock_register
__sock_tx_timestamp
sock_unregister
__splice_from_pipe
split_page
sprintf
sscanf
__stack_chk_fail
__stack_chk_guard
strchr
strcmp
strcpy
string_get_size
string_unescape
strlcpy
strlen
strncmp
strncpy
strrchr
strsep
strstr
__sw_hweight64
swiotlb_max_segment
sync_file_create
sync_file_get_fence
synchronize_hardirq
synchronize_irq
synchronize_net
synchronize_rcu
sysfs_create_bin_file
sysfs_create_group
sysfs_create_groups
__sysfs_match_string
sysfs_remove_bin_file
sysfs_remove_group
system_freezable_wq
system_freezing_cnt
system_wq
__tasklet_hi_schedule
tasklet_init
tasklet_kill
__tasklet_schedule
totalram_pages
trace_define_field
trace_event_buffer_commit
trace_event_buffer_reserve
trace_event_ignore_this_pid
trace_event_raw_init
trace_event_reg
trace_handle_return
__tracepoint_dma_fence_emit
__tracepoint_xdp_exception
trace_print_symbols_seq
trace_raw_output_prep
trace_seq_printf
try_module_get
unlock_page
unmap_mapping_range
unregister_binfmt
unregister_blkdev
__unregister_chrdev
unregister_chrdev_region
unregister_filesystem
unregister_netdev
unregister_netdevice_notifier
unregister_netdevice_queue
unregister_pernet_subsys
unregister_pm_notifier
unregister_shrinker
up_read
up_write
usb_add_gadget_udc
usb_add_hcd
usb_create_hcd
usb_create_shared_hcd
usb_del_gadget_udc
usb_disabled
usb_ep_set_maxpacket_limit
usb_gadget_giveback_request
usb_gadget_udc_reset
usb_get_dev
usb_hcd_check_unlink_urb
usb_hcd_giveback_urb
usb_hcd_is_primary_hcd
usb_hcd_link_urb_to_ep
usb_hcd_poll_rh_status
usb_hcd_resume_root_hub
usb_hcd_unlink_urb_from_ep
usb_put_dev
usb_put_hcd
usb_remove_hcd
usleep_range
vfree
vmalloc
vmalloc_to_page
vmap
vm_get_page_prot
vm_insert_mixed
vm_insert_pfn
vm_map_ram
vm_unmap_ram
vunmap
wait_for_completion
wait_for_completion_killable
wait_woken
__wake_up
wake_up_process
__warn_printk
wiphy_free
wiphy_new_nm
wiphy_register
wiphy_unregister
woken_wake_function
would_dump
ww_mutex_lock
ww_mutex_lock_interruptible
ww_mutex_unlock
xdp_do_flush_map
xdp_do_redirect
xdp_return_frame
xdp_return_frame_rx_napi
xdp_rxq_info_reg
xdp_rxq_info_reg_mem_model
xdp_rxq_info_unreg

View File

@@ -486,6 +486,18 @@ config ARCH_SUPPORTS_LTO_CLANG
- compiling inline assembly with clang's integrated assembler, - compiling inline assembly with clang's integrated assembler,
- and linking with LLD. - and linking with LLD.
config ARCH_SUPPORTS_THINLTO
bool
help
An architecture should select this if it supports clang's ThinLTO.
config THINLTO
bool "Use clang ThinLTO (EXPERIMENTAL)"
depends on LTO_CLANG && ARCH_SUPPORTS_THINLTO
default y
help
Use ThinLTO to speed up Link Time Optimization.
choice choice
prompt "Link-Time Optimization (LTO) (EXPERIMENTAL)" prompt "Link-Time Optimization (LTO) (EXPERIMENTAL)"
default LTO_NONE default LTO_NONE
@@ -542,6 +554,39 @@ config CFI_CLANG_SHADOW
If you select this option, the kernel builds a fast look-up table of If you select this option, the kernel builds a fast look-up table of
CFI check functions in loaded modules to reduce overhead. CFI check functions in loaded modules to reduce overhead.
config ARCH_SUPPORTS_SHADOW_CALL_STACK
bool
help
An architecture should select this if it supports Clang's Shadow
Call Stack, has asm/scs.h, and implements runtime support for shadow
stack switching.
config SHADOW_CALL_STACK
bool "Clang Shadow Call Stack"
depends on ARCH_SUPPORTS_SHADOW_CALL_STACK
help
This option enables Clang's Shadow Call Stack, which uses a
shadow stack to protect function return addresses from being
overwritten by an attacker. More information can be found from
Clang's documentation:
https://clang.llvm.org/docs/ShadowCallStack.html
Note that security guarantees in the kernel differ from the ones
documented for user space. The kernel must store addresses of shadow
stacks used by other tasks and interrupt handlers in memory, which
means an attacker capable reading and writing arbitrary memory may
be able to locate them and hijack control flow by modifying shadow
stacks that are not currently in use.
config SHADOW_CALL_STACK_VMAP
bool "Use virtually mapped shadow call stacks"
depends on SHADOW_CALL_STACK
help
Use virtually mapped shadow call stacks. Selecting this option
provides better stack exhaustion protection, but increases per-thread
memory consumption as a full page is allocated for each shadow stack.
config HAVE_ARCH_WITHIN_STACK_FRAMES config HAVE_ARCH_WITHIN_STACK_FRAMES
bool bool
help help

View File

@@ -124,7 +124,9 @@ extern unsigned long perip_base, perip_end;
/* IO coherency related Auxiliary registers */ /* IO coherency related Auxiliary registers */
#define ARC_REG_IO_COH_ENABLE 0x500 #define ARC_REG_IO_COH_ENABLE 0x500
#define ARC_IO_COH_ENABLE_BIT BIT(0)
#define ARC_REG_IO_COH_PARTIAL 0x501 #define ARC_REG_IO_COH_PARTIAL 0x501
#define ARC_IO_COH_PARTIAL_BIT BIT(0)
#define ARC_REG_IO_COH_AP0_BASE 0x508 #define ARC_REG_IO_COH_AP0_BASE 0x508
#define ARC_REG_IO_COH_AP0_SIZE 0x509 #define ARC_REG_IO_COH_AP0_SIZE 0x509

View File

@@ -490,8 +490,8 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
/* loop thru all available h/w condition indexes */ /* loop thru all available h/w condition indexes */
for (j = 0; j < cc_bcr.c; j++) { for (j = 0; j < cc_bcr.c; j++) {
write_aux_reg(ARC_REG_CC_INDEX, j); write_aux_reg(ARC_REG_CC_INDEX, j);
cc_name.indiv.word0 = read_aux_reg(ARC_REG_CC_NAME0); cc_name.indiv.word0 = le32_to_cpu(read_aux_reg(ARC_REG_CC_NAME0));
cc_name.indiv.word1 = read_aux_reg(ARC_REG_CC_NAME1); cc_name.indiv.word1 = le32_to_cpu(read_aux_reg(ARC_REG_CC_NAME1));
/* See if it has been mapped to a perf event_id */ /* See if it has been mapped to a perf event_id */
for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) { for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) {

View File

@@ -1144,6 +1144,20 @@ noinline void __init arc_ioc_setup(void)
{ {
unsigned int ioc_base, mem_sz; unsigned int ioc_base, mem_sz;
/*
* If IOC was already enabled (due to bootloader) it technically needs to
* be reconfigured with aperture base,size corresponding to Linux memory map
* which will certainly be different than uboot's. But disabling and
* reenabling IOC when DMA might be potentially active is tricky business.
* To avoid random memory issues later, just panic here and ask user to
* upgrade bootloader to one which doesn't enable IOC
*/
if (read_aux_reg(ARC_REG_IO_COH_ENABLE) & ARC_IO_COH_ENABLE_BIT)
panic("IOC already enabled, please upgrade bootloader!\n");
if (!ioc_enable)
return;
/* /*
* As for today we don't support both IOC and ZONE_HIGHMEM enabled * As for today we don't support both IOC and ZONE_HIGHMEM enabled
* simultaneously. This happens because as of today IOC aperture covers * simultaneously. This happens because as of today IOC aperture covers
@@ -1187,8 +1201,8 @@ noinline void __init arc_ioc_setup(void)
panic("IOC Aperture start must be aligned to the size of the aperture"); panic("IOC Aperture start must be aligned to the size of the aperture");
write_aux_reg(ARC_REG_IO_COH_AP0_BASE, ioc_base >> 12); write_aux_reg(ARC_REG_IO_COH_AP0_BASE, ioc_base >> 12);
write_aux_reg(ARC_REG_IO_COH_PARTIAL, 1); write_aux_reg(ARC_REG_IO_COH_PARTIAL, ARC_IO_COH_PARTIAL_BIT);
write_aux_reg(ARC_REG_IO_COH_ENABLE, 1); write_aux_reg(ARC_REG_IO_COH_ENABLE, ARC_IO_COH_ENABLE_BIT);
/* Re-enable L1 dcache */ /* Re-enable L1 dcache */
__dc_enable(); __dc_enable();
@@ -1265,7 +1279,7 @@ void __init arc_cache_init_master(void)
if (is_isa_arcv2() && l2_line_sz && !slc_enable) if (is_isa_arcv2() && l2_line_sz && !slc_enable)
arc_slc_disable(); arc_slc_disable();
if (is_isa_arcv2() && ioc_enable) if (is_isa_arcv2() && ioc_exists)
arc_ioc_setup(); arc_ioc_setup();
if (is_isa_arcv2() && l2_line_sz && slc_enable) { if (is_isa_arcv2() && l2_line_sz && slc_enable) {

View File

@@ -7,7 +7,7 @@
menuconfig ARC_PLAT_EZNPS menuconfig ARC_PLAT_EZNPS
bool "\"EZchip\" ARC dev platform" bool "\"EZchip\" ARC dev platform"
select CPU_BIG_ENDIAN select CPU_BIG_ENDIAN
select CLKSRC_NPS select CLKSRC_NPS if !PHYS_ADDR_T_64BIT
select EZNPS_GIC select EZNPS_GIC
select EZCHIP_NPS_MANAGEMENT_ENET if ETHERNET select EZCHIP_NPS_MANAGEMENT_ENET if ETHERNET
help help

View File

@@ -69,7 +69,7 @@ config ARM
select HAVE_EXIT_THREAD select HAVE_EXIT_THREAD
select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL)
select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) && (CC_IS_GCC || CLANG_VERSION >= 100000)
select HAVE_GCC_PLUGINS select HAVE_GCC_PLUGINS
select HAVE_GENERIC_DMA_COHERENT select HAVE_GENERIC_DMA_COHERENT
select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7))

View File

@@ -1079,14 +1079,21 @@ choice
Say Y here if you want kernel low-level debugging support Say Y here if you want kernel low-level debugging support
on SOCFPGA(Cyclone 5 and Arria 5) based platforms. on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
config DEBUG_SOCFPGA_UART1 config DEBUG_SOCFPGA_ARRIA10_UART1
depends on ARCH_SOCFPGA depends on ARCH_SOCFPGA
bool "Use SOCFPGA UART1 for low-level debug" bool "Use SOCFPGA Arria10 UART1 for low-level debug"
select DEBUG_UART_8250 select DEBUG_UART_8250
help help
Say Y here if you want kernel low-level debugging support Say Y here if you want kernel low-level debugging support
on SOCFPGA(Arria 10) based platforms. on SOCFPGA(Arria 10) based platforms.
config DEBUG_SOCFPGA_CYCLONE5_UART1
depends on ARCH_SOCFPGA
bool "Use SOCFPGA Cyclone 5 UART1 for low-level debug"
select DEBUG_UART_8250
help
Say Y here if you want kernel low-level debugging support
on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
config DEBUG_SUN9I_UART0 config DEBUG_SUN9I_UART0
bool "Kernel low-level debugging messages via sun9i UART0" bool "Kernel low-level debugging messages via sun9i UART0"
@@ -1432,21 +1439,21 @@ config DEBUG_OMAP2PLUS_UART
depends on ARCH_OMAP2PLUS depends on ARCH_OMAP2PLUS
config DEBUG_IMX_UART_PORT config DEBUG_IMX_UART_PORT
int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ int "i.MX Debug UART Port Selection"
DEBUG_IMX25_UART || \ depends on DEBUG_IMX1_UART || \
DEBUG_IMX21_IMX27_UART || \ DEBUG_IMX25_UART || \
DEBUG_IMX31_UART || \ DEBUG_IMX21_IMX27_UART || \
DEBUG_IMX35_UART || \ DEBUG_IMX31_UART || \
DEBUG_IMX50_UART || \ DEBUG_IMX35_UART || \
DEBUG_IMX51_UART || \ DEBUG_IMX50_UART || \
DEBUG_IMX53_UART || \ DEBUG_IMX51_UART || \
DEBUG_IMX6Q_UART || \ DEBUG_IMX53_UART || \
DEBUG_IMX6SL_UART || \ DEBUG_IMX6Q_UART || \
DEBUG_IMX6SX_UART || \ DEBUG_IMX6SL_UART || \
DEBUG_IMX6UL_UART || \ DEBUG_IMX6SX_UART || \
DEBUG_IMX7D_UART DEBUG_IMX6UL_UART || \
DEBUG_IMX7D_UART
default 1 default 1
depends on ARCH_MXC
help help
Choose UART port on which kernel low-level debug messages Choose UART port on which kernel low-level debug messages
should be output. should be output.
@@ -1647,7 +1654,8 @@ config DEBUG_UART_PHYS
default 0xfe800000 if ARCH_IOP32X default 0xfe800000 if ARCH_IOP32X
default 0xff690000 if DEBUG_RK32_UART2 default 0xff690000 if DEBUG_RK32_UART2
default 0xffc02000 if DEBUG_SOCFPGA_UART0 default 0xffc02000 if DEBUG_SOCFPGA_UART0
default 0xffc02100 if DEBUG_SOCFPGA_UART1 default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
default 0xffc03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
default 0xffd82340 if ARCH_IOP13XX default 0xffd82340 if ARCH_IOP13XX
default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0 default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0
default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2 default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2
@@ -1754,7 +1762,8 @@ config DEBUG_UART_VIRT
default 0xfeb30c00 if DEBUG_KEYSTONE_UART0 default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
default 0xfeb31000 if DEBUG_KEYSTONE_UART1 default 0xfeb31000 if DEBUG_KEYSTONE_UART1
default 0xfec02000 if DEBUG_SOCFPGA_UART0 default 0xfec02000 if DEBUG_SOCFPGA_UART0
default 0xfec02100 if DEBUG_SOCFPGA_UART1 default 0xfec02100 if DEBUG_SOCFPGA_ARRIA10_UART1
default 0xfec03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
default 0xfec10000 if DEBUG_SIRFATLAS7_UART0 default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
@@ -1803,9 +1812,9 @@ config DEBUG_UART_8250_WORD
depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
depends on DEBUG_UART_8250_SHIFT >= 2 depends on DEBUG_UART_8250_SHIFT >= 2
default y if DEBUG_PICOXCELL_UART || \ default y if DEBUG_PICOXCELL_UART || \
DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_UART1 || \ DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_ARRIA10_UART1 || \
DEBUG_KEYSTONE_UART0 || DEBUG_KEYSTONE_UART1 || \ DEBUG_SOCFPGA_CYCLONE5_UART1 || DEBUG_KEYSTONE_UART0 || \
DEBUG_ALPINE_UART0 || \ DEBUG_KEYSTONE_UART1 || DEBUG_ALPINE_UART0 || \
DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \ DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_BCM_IPROC_UART3 || \ DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_BCM_IPROC_UART3 || \
DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2

View File

@@ -36,7 +36,10 @@ KBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access)
endif endif
ifeq ($(CONFIG_FRAME_POINTER),y) ifeq ($(CONFIG_FRAME_POINTER),y)
KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog KBUILD_CFLAGS +=-fno-omit-frame-pointer
ifeq ($(CONFIG_CC_IS_GCC),y)
KBUILD_CFLAGS += -mapcs -mno-sched-prolog
endif
endif endif
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
@@ -112,6 +115,10 @@ ifeq ($(CONFIG_ARM_UNWIND),y)
CFLAGS_ABI +=-funwind-tables CFLAGS_ABI +=-funwind-tables
endif endif
ifeq ($(CONFIG_CC_IS_CLANG),y)
CFLAGS_ABI += -meabi gnu
endif
# Accept old syntax despite ".syntax unified" # Accept old syntax despite ".syntax unified"
AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)

View File

@@ -2,10 +2,14 @@
#ifndef _ARM_LIBFDT_ENV_H #ifndef _ARM_LIBFDT_ENV_H
#define _ARM_LIBFDT_ENV_H #define _ARM_LIBFDT_ENV_H
#include <linux/limits.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#define INT32_MAX S32_MAX
#define UINT32_MAX U32_MAX
typedef __be16 fdt16_t; typedef __be16 fdt16_t;
typedef __be32 fdt32_t; typedef __be32 fdt32_t;
typedef __be64 fdt64_t; typedef __be64 fdt64_t;

View File

@@ -88,7 +88,7 @@
}; };
&i2c0 { &i2c0 {
tda19988: tda19988 { tda19988: tda19988@70 {
compatible = "nxp,tda998x"; compatible = "nxp,tda998x";
reg = <0x70>; reg = <0x70>;

View File

@@ -731,6 +731,7 @@
pinctrl-0 = <&cpsw_default>; pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>; pinctrl-1 = <&cpsw_sleep>;
status = "okay"; status = "okay";
slaves = <1>;
}; };
&davinci_mdio { &davinci_mdio {
@@ -738,15 +739,14 @@
pinctrl-0 = <&davinci_mdio_default>; pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>; pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay"; status = "okay";
ethphy0: ethernet-phy@0 {
reg = <0>;
};
}; };
&cpsw_emac0 { &cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>; phy-handle = <&ethphy0>;
phy-mode = "rgmii-txid";
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = "rgmii-txid"; phy-mode = "rgmii-txid";
}; };

View File

@@ -161,7 +161,7 @@
invensense,key = [4e cc 7e eb f6 1e 35 22 00 34 0d 65 32 e9 94 89];*/ invensense,key = [4e cc 7e eb f6 1e 35 22 00 34 0d 65 32 e9 94 89];*/
}; };
bmp280: pressure@78 { bmp280: pressure@76 {
compatible = "bosch,bmp280"; compatible = "bosch,bmp280";
reg = <0x76>; reg = <0x76>;
}; };

View File

@@ -373,7 +373,7 @@
ti,pindir-d0-out-d1-in; ti,pindir-d0-out-d1-in;
status = "okay"; status = "okay";
cfaf240320a032t { display-controller@0 {
compatible = "orisetech,otm3225a"; compatible = "orisetech,otm3225a";
reg = <0>; reg = <0>;
spi-max-frequency = <1000000>; spi-max-frequency = <1000000>;
@@ -577,7 +577,7 @@
bus-width = <4>; bus-width = <4>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>; pinctrl-0 = <&mmc2_pins>;
cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; cd-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
}; };
&sham { &sham {

View File

@@ -1101,7 +1101,7 @@
}; };
}; };
qspi: qspi@47900000 { qspi: spi@47900000 {
compatible = "ti,am4372-qspi"; compatible = "ti,am4372-qspi";
reg = <0x47900000 0x100>, reg = <0x47900000 0x100>,
<0x30000000 0x4000000>; <0x30000000 0x4000000>;
@@ -1142,6 +1142,8 @@
ti,hwmods = "dss_dispc"; ti,hwmods = "dss_dispc";
clocks = <&disp_clk>; clocks = <&disp_clk>;
clock-names = "fck"; clock-names = "fck";
max-memory-bandwidth = <230000000>;
}; };
rfbi: rfbi@4832a800 { rfbi: rfbi@4832a800 {

View File

@@ -83,7 +83,7 @@
}; };
lcd0: display { lcd0: display {
compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
label = "lcd"; label = "lcd";
backlight = <&lcd_bl>; backlight = <&lcd_bl>;

View File

@@ -45,7 +45,7 @@
}; };
lcd0: display { lcd0: display {
compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
label = "lcd"; label = "lcd";
backlight = <&lcd_bl>; backlight = <&lcd_bl>;

View File

@@ -90,7 +90,7 @@
&pcie1_rc { &pcie1_rc {
status = "okay"; status = "okay";
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
}; };
&pcie1_ep { &pcie1_ep {

View File

@@ -518,7 +518,7 @@
}; };
/* touch controller */ /* touch controller */
ads7846@0 { touchscreen@1 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ads7846_pins>; pinctrl-0 = <&ads7846_pins>;

View File

@@ -371,7 +371,7 @@
clock-names = "uartclk", "apb_pclk"; clock-names = "uartclk", "apb_pclk";
}; };
ssp: ssp@1000d000 { ssp: spi@1000d000 {
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
reg = <0x1000d000 0x1000>; reg = <0x1000d000 0x1000>;
clocks = <&sspclk>, <&pclk>; clocks = <&sspclk>, <&pclk>;

View File

@@ -45,7 +45,7 @@
}; };
/* The voltage to the MMC card is hardwired at 3.3V */ /* The voltage to the MMC card is hardwired at 3.3V */
vmmc: fixedregulator@0 { vmmc: regulator-vmmc {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "vmmc"; regulator-name = "vmmc";
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
@@ -53,7 +53,7 @@
regulator-boot-on; regulator-boot-on;
}; };
veth: fixedregulator@0 { veth: regulator-veth {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "veth"; regulator-name = "veth";
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
@@ -380,7 +380,7 @@
clock-names = "apb_pclk"; clock-names = "apb_pclk";
}; };
pb1176_ssp: ssp@1010b000 { pb1176_ssp: spi@1010b000 {
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
reg = <0x1010b000 0x1000>; reg = <0x1010b000 0x1000>;
interrupt-parent = <&intc_dc1176>; interrupt-parent = <&intc_dc1176>;

View File

@@ -145,7 +145,7 @@
}; };
/* The voltage to the MMC card is hardwired at 3.3V */ /* The voltage to the MMC card is hardwired at 3.3V */
vmmc: fixedregulator@0 { vmmc: regulator-vmmc {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "vmmc"; regulator-name = "vmmc";
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
@@ -153,7 +153,7 @@
regulator-boot-on; regulator-boot-on;
}; };
veth: fixedregulator@0 { veth: regulator-veth {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "veth"; regulator-name = "veth";
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
@@ -523,7 +523,7 @@
clock-names = "uartclk", "apb_pclk"; clock-names = "uartclk", "apb_pclk";
}; };
ssp@1000d000 { spi@1000d000 {
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
reg = <0x1000d000 0x1000>; reg = <0x1000d000 0x1000>;
interrupt-parent = <&intc_pb11mp>; interrupt-parent = <&intc_pb11mp>;

View File

@@ -44,7 +44,7 @@
}; };
/* The voltage to the MMC card is hardwired at 3.3V */ /* The voltage to the MMC card is hardwired at 3.3V */
vmmc: fixedregulator@0 { vmmc: regulator-vmmc {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "vmmc"; regulator-name = "vmmc";
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
@@ -52,7 +52,7 @@
regulator-boot-on; regulator-boot-on;
}; };
veth: fixedregulator@0 { veth: regulator-veth {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "veth"; regulator-name = "veth";
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
@@ -362,7 +362,7 @@
clock-names = "uartclk", "apb_pclk"; clock-names = "uartclk", "apb_pclk";
}; };
ssp: ssp@1000d000 { ssp: spi@1000d000 {
compatible = "arm,pl022", "arm,primecell"; compatible = "arm,pl022", "arm,primecell";
reg = <0x1000d000 0x1000>; reg = <0x1000d000 0x1000>;
clocks = <&sspclk>, <&pclk>; clocks = <&sspclk>, <&pclk>;
@@ -567,4 +567,3 @@
}; };
}; };
}; };

View File

@@ -48,7 +48,7 @@
&clearfog_sdhci_cd_pins>; &clearfog_sdhci_cd_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
status = "okay"; status = "okay";
vmmc = <&reg_3p3v>; vmmc-supply = <&reg_3p3v>;
wp-inverted; wp-inverted;
}; };

View File

@@ -350,7 +350,7 @@
status = "disabled"; status = "disabled";
}; };
i2c: i2c@1e78a000 { i2c: bus@1e78a000 {
compatible = "simple-bus"; compatible = "simple-bus";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;

View File

@@ -247,7 +247,7 @@
compatible = "aspeed,ast2500-gpio"; compatible = "aspeed,ast2500-gpio";
reg = <0x1e780000 0x1000>; reg = <0x1e780000 0x1000>;
interrupts = <20>; interrupts = <20>;
gpio-ranges = <&pinctrl 0 0 220>; gpio-ranges = <&pinctrl 0 0 232>;
clocks = <&syscon ASPEED_CLK_APB>; clocks = <&syscon ASPEED_CLK_APB>;
interrupt-controller; interrupt-controller;
}; };
@@ -410,7 +410,7 @@
status = "disabled"; status = "disabled";
}; };
i2c: i2c@1e78a000 { i2c: bus@1e78a000 {
compatible = "simple-bus"; compatible = "simple-bus";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;

View File

@@ -70,9 +70,9 @@
&i2c1 { &i2c1 {
status = "okay"; status = "okay";
eeprom@87 { eeprom@57 {
compatible = "giantec,gt24c32a", "atmel,24c32"; compatible = "giantec,gt24c32a", "atmel,24c32";
reg = <87>; reg = <0x57>;
pagesize = <32>; pagesize = <32>;
}; };
}; };

View File

@@ -59,9 +59,9 @@
&i2c1 { &i2c1 {
status = "okay"; status = "okay";
ft5426@56 { ft5426@38 {
compatible = "focaltech,ft5426", "edt,edt-ft5406"; compatible = "focaltech,ft5426", "edt,edt-ft5406";
reg = <56>; reg = <0x38>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lcd_ctp_int>; pinctrl-0 = <&pinctrl_lcd_ctp_int>;

View File

@@ -38,14 +38,16 @@
atmel,pins = atmel,pins =
<AT91_PIOA 21 <AT91_PIOA 21
AT91_PERIPH_GPIO AT91_PERIPH_GPIO
AT91_PINCTRL_OUTPUT_VAL(0)>; (AT91_PINCTRL_OUTPUT |
AT91_PINCTRL_OUTPUT_VAL(0))>;
}; };
pinctrl_lcd_hipow0: lcd_hipow0 { pinctrl_lcd_hipow0: lcd_hipow0 {
atmel,pins = atmel,pins =
<AT91_PIOA 23 <AT91_PIOA 23
AT91_PERIPH_GPIO AT91_PERIPH_GPIO
AT91_PINCTRL_OUTPUT_VAL(0)>; (AT91_PINCTRL_OUTPUT |
AT91_PINCTRL_OUTPUT_VAL(0))>;
}; };
}; };
}; };
@@ -219,6 +221,7 @@
reg = <0>; reg = <0>;
bus-width = <4>; bus-width = <4>;
cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>; cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
cd-inverted;
}; };
}; };

View File

@@ -92,13 +92,13 @@
reg = <0x40000 0xc0000>; reg = <0x40000 0xc0000>;
}; };
bootloaderenv@0x100000 { bootloaderenvred@0x100000 {
label = "bootloader env"; label = "bootloader env redundant";
reg = <0x100000 0x40000>; reg = <0x100000 0x40000>;
}; };
bootloaderenvred@0x140000 { bootloaderenv@0x140000 {
label = "bootloader env redundant"; label = "bootloader env";
reg = <0x140000 0x40000>; reg = <0x140000 0x40000>;
}; };

View File

@@ -252,7 +252,7 @@
rootfs@800000 { rootfs@800000 {
label = "rootfs"; label = "rootfs";
reg = <0x800000 0x0f800000>; reg = <0x800000 0x1f800000>;
}; };
}; };
}; };

View File

@@ -128,7 +128,7 @@
i2c2: i2c@f8024000 { i2c2: i2c@f8024000 {
status = "okay"; status = "okay";
rtc1: rtc@64 { rtc1: rtc@32 {
compatible = "epson,rx8900"; compatible = "epson,rx8900";
reg = <0x32>; reg = <0x32>;
}; };

View File

@@ -127,7 +127,7 @@
spi0: spi@fffc8000 { spi0: spi@fffc8000 {
cs-gpios = <0>, <&pioC 11 0>, <0>, <0>; cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
mtd_dataflash@0 { mtd_dataflash@1 {
compatible = "atmel,at45", "atmel,dataflash"; compatible = "atmel,at45", "atmel,dataflash";
spi-max-frequency = <50000000>; spi-max-frequency = <50000000>;
reg = <1>; reg = <1>;

View File

@@ -160,7 +160,7 @@
spi-max-frequency = <15000000>; spi-max-frequency = <15000000>;
}; };
tsc2046@0 { tsc2046@2 {
reg = <2>; reg = <2>;
compatible = "ti,ads7843"; compatible = "ti,ads7843";
interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>; interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>;

View File

@@ -109,7 +109,7 @@
spi0: spi@fffc8000 { spi0: spi@fffc8000 {
cs-gpios = <0>, <&pioC 11 0>, <0>, <0>; cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
mtd_dataflash@0 { mtd_dataflash@1 {
compatible = "atmel,at45", "atmel,dataflash"; compatible = "atmel,at45", "atmel,dataflash";
spi-max-frequency = <50000000>; spi-max-frequency = <50000000>;
reg = <1>; reg = <1>;

View File

@@ -570,7 +570,7 @@
}; };
}; };
uart1 { usart1 {
pinctrl_usart1: usart1-0 { pinctrl_usart1: usart1-0 {
atmel,pins = atmel,pins =
<AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE

View File

@@ -100,7 +100,7 @@
rootfs@800000 { rootfs@800000 {
label = "rootfs"; label = "rootfs";
reg = <0x800000 0x1f800000>; reg = <0x800000 0x0f800000>;
}; };
}; };
}; };

View File

@@ -169,8 +169,8 @@
mdio: mdio@18002000 { mdio: mdio@18002000 {
compatible = "brcm,iproc-mdio"; compatible = "brcm,iproc-mdio";
reg = <0x18002000 0x8>; reg = <0x18002000 0x8>;
#size-cells = <1>; #size-cells = <0>;
#address-cells = <0>; #address-cells = <1>;
status = "disabled"; status = "disabled";
gphy0: ethernet-phy@0 { gphy0: ethernet-phy@0 {

View File

@@ -216,7 +216,7 @@
reg = <0x33000 0x14>; reg = <0x33000 0x14>;
}; };
qspi: qspi@27200 { qspi: spi@27200 {
compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi"; compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
reg = <0x027200 0x184>, reg = <0x027200 0x184>,
<0x027000 0x124>, <0x027000 0x124>,

View File

@@ -273,7 +273,7 @@
brcm,nand-has-wp; brcm,nand-has-wp;
}; };
qspi: qspi@27200 { qspi: spi@27200 {
compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi"; compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
reg = <0x027200 0x184>, reg = <0x027200 0x184>,
<0x027000 0x124>, <0x027000 0x124>,

View File

@@ -32,7 +32,7 @@
mailbox@7e00b840 { mailbox@7e00b840 {
compatible = "brcm,bcm2835-vchiq"; compatible = "brcm,bcm2835-vchiq";
reg = <0x7e00b840 0xf>; reg = <0x7e00b840 0x3c>;
interrupts = <0 2>; interrupts = <0 2>;
}; };
}; };

View File

@@ -39,7 +39,7 @@
trips { trips {
cpu-crit { cpu-crit {
temperature = <80000>; temperature = <90000>;
hysteresis = <0>; hysteresis = <0>;
type = "critical"; type = "critical";
}; };

View File

@@ -350,8 +350,8 @@
mdio: mdio@18003000 { mdio: mdio@18003000 {
compatible = "brcm,iproc-mdio"; compatible = "brcm,iproc-mdio";
reg = <0x18003000 0x8>; reg = <0x18003000 0x8>;
#size-cells = <1>; #size-cells = <0>;
#address-cells = <0>; #address-cells = <1>;
}; };
mdio-bus-mux { mdio-bus-mux {

View File

@@ -87,7 +87,7 @@
status = "okay"; status = "okay";
clock-frequency = <100000>; clock-frequency = <100000>;
si5351: clock-generator { si5351: clock-generator@60 {
compatible = "silabs,si5351a-msop"; compatible = "silabs,si5351a-msop";
reg = <0x60>; reg = <0x60>;
#address-cells = <1>; #address-cells = <1>;

View File

@@ -155,7 +155,7 @@
0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800 /* CESA SRAM 2k */ 0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800 /* CESA SRAM 2k */
0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU SRAM 2k */ 0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU SRAM 2k */
spi0: spi-ctrl@10600 { spi0: spi@10600 {
compatible = "marvell,orion-spi"; compatible = "marvell,orion-spi";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
@@ -168,7 +168,7 @@
status = "disabled"; status = "disabled";
}; };
i2c: i2c-ctrl@11000 { i2c: i2c@11000 {
compatible = "marvell,mv64xxx-i2c"; compatible = "marvell,mv64xxx-i2c";
reg = <0x11000 0x20>; reg = <0x11000 0x20>;
#address-cells = <1>; #address-cells = <1>;
@@ -218,7 +218,7 @@
status = "disabled"; status = "disabled";
}; };
spi1: spi-ctrl@14600 { spi1: spi@14600 {
compatible = "marvell,orion-spi"; compatible = "marvell,orion-spi";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;

View File

@@ -336,6 +336,7 @@
<0 0 0 2 &pcie1_intc 2>, <0 0 0 2 &pcie1_intc 2>,
<0 0 0 3 &pcie1_intc 3>, <0 0 0 3 &pcie1_intc 3>,
<0 0 0 4 &pcie1_intc 4>; <0 0 0 4 &pcie1_intc 4>;
ti,syscon-unaligned-access = <&scm_conf1 0x14 1>;
status = "disabled"; status = "disabled";
pcie1_intc: interrupt-controller { pcie1_intc: interrupt-controller {
interrupt-controller; interrupt-controller;
@@ -387,6 +388,7 @@
<0 0 0 2 &pcie2_intc 2>, <0 0 0 2 &pcie2_intc 2>,
<0 0 0 3 &pcie2_intc 3>, <0 0 0 3 &pcie2_intc 3>,
<0 0 0 4 &pcie2_intc 4>; <0 0 0 4 &pcie2_intc 4>;
ti,syscon-unaligned-access = <&scm_conf1 0x14 2>;
pcie2_intc: interrupt-controller { pcie2_intc: interrupt-controller {
interrupt-controller; interrupt-controller;
#address-cells = <0>; #address-cells = <0>;
@@ -1369,7 +1371,7 @@
status = "disabled"; status = "disabled";
}; };
qspi: qspi@4b300000 { qspi: spi@4b300000 {
compatible = "ti,dra7xxx-qspi"; compatible = "ti,dra7xxx-qspi";
reg = <0x4b300000 0x100>, reg = <0x4b300000 0x100>,
<0x5c000000 0x4000000>; <0x5c000000 0x4000000>;

View File

@@ -69,6 +69,8 @@
compatible = "samsung,s2mps14-pmic"; compatible = "samsung,s2mps14-pmic";
interrupt-parent = <&gpx3>; interrupt-parent = <&gpx3>;
interrupts = <5 IRQ_TYPE_NONE>; interrupts = <5 IRQ_TYPE_NONE>;
pinctrl-names = "default";
pinctrl-0 = <&s2mps14_irq>;
reg = <0x66>; reg = <0x66>;
s2mps14_osc: clocks { s2mps14_osc: clocks {
@@ -350,6 +352,11 @@
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV3>; samsung,pin-drv = <EXYNOS4_PIN_DRV_LV3>;
samsung,pin-val = <1>; samsung,pin-val = <1>;
}; };
s2mps14_irq: s2mps14-irq {
samsung,pins = "gpx3-5";
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
};
}; };
&rtc { &rtc {

View File

@@ -360,7 +360,7 @@
}; };
hsotg: hsotg@12480000 { hsotg: hsotg@12480000 {
compatible = "snps,dwc2"; compatible = "samsung,s3c6400-hsotg", "snps,dwc2";
reg = <0x12480000 0x20000>; reg = <0x12480000 0x20000>;
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cmu CLK_USBOTG>; clocks = <&cmu CLK_USBOTG>;

View File

@@ -149,9 +149,11 @@
}; };
&hdmi { &hdmi {
pinctrl-names = "default";
pinctrl-0 = <&hdmi_hpd>;
status = "okay"; status = "okay";
ddc = <&i2c_2>; ddc = <&i2c_ddc>;
hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
vdd_osc-supply = <&ldo10_reg>; vdd_osc-supply = <&ldo10_reg>;
vdd_pll-supply = <&ldo8_reg>; vdd_pll-supply = <&ldo8_reg>;
vdd-supply = <&ldo8_reg>; vdd-supply = <&ldo8_reg>;
@@ -168,6 +170,8 @@
reg = <0x66>; reg = <0x66>;
interrupt-parent = <&gpx3>; interrupt-parent = <&gpx3>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>; interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&s5m8767_irq>;
vinb1-supply = <&main_dc_reg>; vinb1-supply = <&main_dc_reg>;
vinb2-supply = <&main_dc_reg>; vinb2-supply = <&main_dc_reg>;
@@ -452,13 +456,6 @@
}; };
}; };
&i2c_2 {
status = "okay";
/* used by HDMI DDC */
samsung,i2c-sda-delay = <100>;
samsung,i2c-max-bus-freq = <66000>;
};
&i2c_3 { &i2c_3 {
status = "okay"; status = "okay";
@@ -535,6 +532,13 @@
cap-sd-highspeed; cap-sd-highspeed;
}; };
&pinctrl_0 {
s5m8767_irq: s5m8767-irq {
samsung,pins = "gpx3-2";
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
};
};
&rtc { &rtc {
status = "okay"; status = "okay";
}; };
@@ -547,3 +551,22 @@
status = "okay"; status = "okay";
samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>;
}; };
&soc {
/*
* For unknown reasons HDMI-DDC does not work with Exynos I2C
* controllers. Lets use software I2C over GPIO pins as a workaround.
*/
i2c_ddc: i2c-gpio {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_gpio_bus>;
status = "okay";
compatible = "i2c-gpio";
gpios = <&gpa0 6 0 /* sda */
&gpa0 7 0 /* scl */
>;
i2c-gpio,delay-us = <2>;
#address-cells = <1>;
#size-cells = <0>;
};
};

View File

@@ -225,6 +225,12 @@
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
}; };
i2c2_gpio_bus: i2c2-gpio-bus {
samsung,pins = "gpa0-6", "gpa0-7";
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
uart2_data: uart2-data { uart2_data: uart2-data {
samsung,pins = "gpa1-0", "gpa1-1"; samsung,pins = "gpa1-0", "gpa1-1";
samsung,pin-function = <EXYNOS_PIN_FUNC_2>; samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
@@ -593,6 +599,11 @@
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
}; };
hdmi_hpd: hdmi-hpd {
samsung,pins = "gpx3-7";
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
};
}; };
&pinctrl_1 { &pinctrl_1 {

View File

@@ -20,6 +20,14 @@
samsung,model = "Snow-I2S-MAX98090"; samsung,model = "Snow-I2S-MAX98090";
samsung,audio-codec = <&max98090>; samsung,audio-codec = <&max98090>;
cpu {
sound-dai = <&i2s0 0>;
};
codec {
sound-dai = <&max98090 0>, <&hdmi>;
};
}; };
}; };
@@ -31,6 +39,9 @@
interrupt-parent = <&gpx0>; interrupt-parent = <&gpx0>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&max98090_irq>; pinctrl-0 = <&max98090_irq>;
clocks = <&pmu_system_controller 0>;
clock-names = "mclk";
#sound-dai-cells = <1>;
}; };
}; };

View File

@@ -153,7 +153,7 @@
&clock_audss { &clock_audss {
assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>; assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
assigned-clock-parents = <&clock CLK_FOUT_EPLL>; assigned-clock-parents = <&clock CLK_MAU_EPLL>;
}; };
&cpu0 { &cpu0 {
@@ -312,6 +312,7 @@
regulator-name = "vdd_1v35"; regulator-name = "vdd_1v35";
regulator-min-microvolt = <1350000>; regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>; regulator-max-microvolt = <1350000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem { regulator-state-mem {
regulator-on-in-suspend; regulator-on-in-suspend;
@@ -333,6 +334,7 @@
regulator-name = "vdd_2v"; regulator-name = "vdd_2v";
regulator-min-microvolt = <2000000>; regulator-min-microvolt = <2000000>;
regulator-max-microvolt = <2000000>; regulator-max-microvolt = <2000000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem { regulator-state-mem {
regulator-on-in-suspend; regulator-on-in-suspend;
@@ -343,6 +345,7 @@
regulator-name = "vdd_1v8"; regulator-name = "vdd_1v8";
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem { regulator-state-mem {
regulator-on-in-suspend; regulator-on-in-suspend;

View File

@@ -224,7 +224,7 @@
ldo13_reg: LDO13 { ldo13_reg: LDO13 {
regulator-name = "vddq_mmc2"; regulator-name = "vddq_mmc2";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
}; };

View File

@@ -153,7 +153,7 @@
&clock_audss { &clock_audss {
assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>; assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
assigned-clock-parents = <&clock CLK_FOUT_EPLL>; assigned-clock-parents = <&clock CLK_MAU_EPLL>;
}; };
&cpu0 { &cpu0 {
@@ -312,6 +312,7 @@
regulator-name = "vdd_1v35"; regulator-name = "vdd_1v35";
regulator-min-microvolt = <1350000>; regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>; regulator-max-microvolt = <1350000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem { regulator-state-mem {
regulator-on-in-suspend; regulator-on-in-suspend;
@@ -333,6 +334,7 @@
regulator-name = "vdd_2v"; regulator-name = "vdd_2v";
regulator-min-microvolt = <2000000>; regulator-min-microvolt = <2000000>;
regulator-max-microvolt = <2000000>; regulator-max-microvolt = <2000000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem { regulator-state-mem {
regulator-on-in-suspend; regulator-on-in-suspend;
@@ -343,6 +345,7 @@
regulator-name = "vdd_1v8"; regulator-name = "vdd_1v8";
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
regulator-state-mem { regulator-state-mem {
regulator-on-in-suspend; regulator-on-in-suspend;

View File

@@ -20,7 +20,7 @@
}; };
chosen { chosen {
bootargs = "console=ttyS0,115200n8"; bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait";
stdout-path = &uart0; stdout-path = &uart0;
}; };
@@ -138,37 +138,10 @@
/* 16MB of flash */ /* 16MB of flash */
reg = <0x30000000 0x01000000>; reg = <0x30000000 0x01000000>;
partition@0 { partitions {
label = "RedBoot"; compatible = "redboot-fis";
reg = <0x00000000 0x00120000>; /* Eraseblock at 0xfe0000 */
read-only; fis-index-block = <0x1fc>;
};
partition@120000 {
label = "Kernel";
reg = <0x00120000 0x00200000>;
};
partition@320000 {
label = "Ramdisk";
reg = <0x00320000 0x00600000>;
};
partition@920000 {
label = "Application";
reg = <0x00920000 0x00600000>;
};
partition@f20000 {
label = "VCTL";
reg = <0x00f20000 0x00020000>;
read-only;
};
partition@f40000 {
label = "CurConf";
reg = <0x00f40000 0x000a0000>;
read-only;
};
partition@fe0000 {
label = "FIS directory";
reg = <0x00fe0000 0x00020000>;
read-only;
}; };
}; };

View File

@@ -21,6 +21,7 @@
}; };
memory@8000000 { memory@8000000 {
device_type = "memory";
reg = <0x08000000 0x04000000>; reg = <0x08000000 0x04000000>;
}; };
}; };

View File

@@ -21,6 +21,7 @@
}; };
memory@8000000 { memory@8000000 {
device_type = "memory";
reg = <0x08000000 0x00800000>; reg = <0x08000000 0x00800000>;
}; };
}; };

View File

@@ -15,10 +15,8 @@
* The decompressor and also some bootloaders rely on a * The decompressor and also some bootloaders rely on a
* pre-existing /chosen node to be available to insert the * pre-existing /chosen node to be available to insert the
* command line and merge other ATAGS info. * command line and merge other ATAGS info.
* Also for U-Boot there must be a pre-existing /memory node.
*/ */
chosen {}; chosen {};
memory { device_type = "memory"; };
aliases { aliases {
gpio0 = &gpio1; gpio0 = &gpio1;

View File

@@ -10,6 +10,7 @@
compatible = "fsl,imx23-evk", "fsl,imx23"; compatible = "fsl,imx23-evk", "fsl,imx23";
memory@40000000 { memory@40000000 {
device_type = "memory";
reg = <0x40000000 0x08000000>; reg = <0x40000000 0x08000000>;
}; };

View File

@@ -20,6 +20,7 @@
compatible = "olimex,imx23-olinuxino", "fsl,imx23"; compatible = "olimex,imx23-olinuxino", "fsl,imx23";
memory@40000000 { memory@40000000 {
device_type = "memory";
reg = <0x40000000 0x04000000>; reg = <0x40000000 0x04000000>;
}; };

View File

@@ -50,6 +50,7 @@
compatible = "sandisk,sansa_fuze_plus", "fsl,imx23"; compatible = "sandisk,sansa_fuze_plus", "fsl,imx23";
memory@40000000 { memory@40000000 {
device_type = "memory";
reg = <0x40000000 0x04000000>; reg = <0x40000000 0x04000000>;
}; };

View File

@@ -17,6 +17,7 @@
compatible = "fsl,stmp378x-devb", "fsl,imx23"; compatible = "fsl,stmp378x-devb", "fsl,imx23";
memory@40000000 { memory@40000000 {
device_type = "memory";
reg = <0x40000000 0x04000000>; reg = <0x40000000 0x04000000>;
}; };

View File

@@ -49,6 +49,7 @@
compatible = "creative,x-fi3", "fsl,imx23"; compatible = "creative,x-fi3", "fsl,imx23";
memory@40000000 { memory@40000000 {
device_type = "memory";
reg = <0x40000000 0x04000000>; reg = <0x40000000 0x04000000>;
}; };

View File

@@ -13,10 +13,8 @@
* The decompressor and also some bootloaders rely on a * The decompressor and also some bootloaders rely on a
* pre-existing /chosen node to be available to insert the * pre-existing /chosen node to be available to insert the
* command line and merge other ATAGS info. * command line and merge other ATAGS info.
* Also for U-Boot there must be a pre-existing /memory node.
*/ */
chosen {}; chosen {};
memory { device_type = "memory"; };
aliases { aliases {
gpio0 = &gpio0; gpio0 = &gpio0;

View File

@@ -18,6 +18,7 @@
compatible = "eukrea,cpuimx25", "fsl,imx25"; compatible = "eukrea,cpuimx25", "fsl,imx25";
memory@80000000 { memory@80000000 {
device_type = "memory";
reg = <0x80000000 0x4000000>; /* 64M */ reg = <0x80000000 0x4000000>; /* 64M */
}; };
}; };

Some files were not shown because too many files have changed in this diff Show More