29 Oct, 2020

2 commits

  • On Cortex-A77 r0p0 and r1p0, a sequence of a non-cacheable or device load
    and a store exclusive or PAR_EL1 read can cause a deadlock.

    The workaround requires a DMB SY before and after a PAR_EL1 register
    read. In addition, it's possible an interrupt (doing a device read) or
    KVM guest exit could be taken between the DMB and PAR read, so we
    also need a DMB before returning from interrupt and before returning to
    a guest.

    A deadlock is still possible with the workaround as KVM guests must also
    have the workaround. IOW, a malicious guest can deadlock an affected
    systems.

    This workaround also depends on a firmware counterpart to enable the h/w
    to insert DMB SY after load and store exclusive instructions. See the
    errata document SDEN-1152370 v10 [1] for more information.

    [1] https://static.docs.arm.com/101992/0010/Arm_Cortex_A77_MP074_Software_Developer_Errata_Notice_v10.pdf

    Signed-off-by: Rob Herring
    Reviewed-by: Catalin Marinas
    Acked-by: Marc Zyngier
    Cc: Catalin Marinas
    Cc: James Morse
    Cc: Suzuki K Poulose
    Cc: Will Deacon
    Cc: Julien Thierry
    Cc: kvmarm@lists.cs.columbia.edu
    Link: https://lore.kernel.org/r/20201028182839.166037-2-robh@kernel.org
    Signed-off-by: Will Deacon

    Rob Herring
     
  • On exception entry, the kernel explicitly resets the PSTATE.TCO (tag
    check override) so that any kernel memory accesses will be checked (the
    bit is restored on exception return). This has the side-effect that the
    uaccess routines will not honour the PSTATE.TCO that may have been set
    by the user prior to a syscall.

    There is no issue in practice since PSTATE.TCO is expected to be used
    only for brief periods in specific routines (e.g. garbage collection).
    To control the tag checking mode of the uaccess routines, the user will
    have to invoke a corresponding prctl() call.

    Document the kernel behaviour w.r.t. PSTATE.TCO accordingly.

    Signed-off-by: Catalin Marinas
    Fixes: df9d7a22dd21 ("arm64: mte: Add Memory Tagging Extension documentation")
    Reviewed-by: Vincenzo Frascino
    Cc: Will Deacon
    Cc: Szabolcs Nagy
    Signed-off-by: Will Deacon

    Catalin Marinas
     

24 Oct, 2020

1 commit

  • Pull documentation fixes from Jonathan Corbet:
    "A handful of late-arriving documentation fixes"

    * tag 'docs-5.10-2' of git://git.lwn.net/linux:
    docs: Add two missing entries in vm sysctl index
    docs/vm: trivial fixes to several spelling mistakes
    docs: submitting-patches: describe preserving review/test tags
    Documentation: Chinese translation of Documentation/arm64/hugetlbpage.rst
    Documentation: x86: fix a missing word in x86_64/mm.rst.
    docs: driver-api: remove a duplicated index entry
    docs: lkdtm: Modernize and improve details
    docs: deprecated.rst: Expand str*cpy() replacement notes
    docs/cpu-load: format the example code.

    Linus Torvalds
     

22 Oct, 2020

1 commit


13 Oct, 2020

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "As hoped, things calmed down for docs this cycle; fewer changes and
    almost no conflicts at all. This includes:

    - A reworked and expanded user-mode Linux document

    - Some simplifications and improvements for submitting-patches.rst

    - An emergency fix for (some) problems with Sphinx 3.x

    - Some welcome automarkup improvements to automatically generate
    cross-references to struct definitions and other documents

    - The usual collection of translation updates, typo fixes, etc"

    * tag 'docs-5.10' of git://git.lwn.net/linux: (81 commits)
    gpiolib: Update indentation in driver.rst for code excerpts
    Documentation/admin-guide: tainted-kernels: Fix typo occured
    Documentation: better locations for sysfs-pci, sysfs-tagging
    docs: programming-languages: refresh blurb on clang support
    Documentation: kvm: fix a typo
    Documentation: Chinese translation of Documentation/arm64/amu.rst
    doc: zh_CN: index files in arm64 subdirectory
    mailmap: add entry for
    doc: seq_file: clarify role of *pos in ->next()
    docs: trace: ring-buffer-design.rst: use the new SPDX tag
    Documentation: kernel-parameters: clarify "module." parameters
    Fix references to nommu-mmap.rst
    docs: rewrite admin-guide/sysctl/abi.rst
    docs: fb: Remove vesafb scrollback boot option
    docs: fb: Remove sstfb scrollback boot option
    docs: fb: Remove matroxfb scrollback boot option
    docs: fb: Remove framebuffer scrollback boot option
    docs: replace the old User Mode Linux HowTo with a new one
    Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev"
    Documentation/admin-guide: README & svga: remove use of "rdev"
    ...

    Linus Torvalds
     

29 Sep, 2020

3 commits


04 Sep, 2020

1 commit

  • Memory Tagging Extension (part of the ARMv8.5 Extensions) provides
    a mechanism to detect the sources of memory related errors which
    may be vulnerable to exploitation, including bounds violations,
    use-after-free, use-after-return, use-out-of-scope and use before
    initialization errors.

    Add Memory Tagging Extension documentation for the arm64 linux
    kernel support.

    Signed-off-by: Vincenzo Frascino
    Co-developed-by: Catalin Marinas
    Signed-off-by: Catalin Marinas
    Acked-by: Szabolcs Nagy
    Cc: Will Deacon

    Vincenzo Frascino
     

12 Aug, 2020

1 commit

  • Pull iommu updates from Joerg Roedel:

    - Remove of the dev->archdata.iommu (or similar) pointers from most
    architectures. Only Sparc is left, but this is private to Sparc as
    their drivers don't use the IOMMU-API.

    - ARM-SMMU updates from Will Deacon:

    - Support for SMMU-500 implementation in Marvell Armada-AP806 SoC

    - Support for SMMU-500 implementation in NVIDIA Tegra194 SoC

    - DT compatible string updates

    - Remove unused IOMMU_SYS_CACHE_ONLY flag

    - Move ARM-SMMU drivers into their own subdirectory

    - Intel VT-d updates from Lu Baolu:

    - Misc tweaks and fixes for vSVA

    - Report/response page request events

    - Cleanups

    - Move the Kconfig and Makefile bits for the AMD and Intel drivers into
    their respective subdirectory.

    - MT6779 IOMMU Support

    - Support for new chipsets in the Renesas IOMMU driver

    - Other misc cleanups and fixes (e.g. to improve compile test coverage)

    * tag 'iommu-updates-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (77 commits)
    iommu/amd: Move Kconfig and Makefile bits down into amd directory
    iommu/vt-d: Move Kconfig and Makefile bits down into intel directory
    iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory
    iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu
    iommu: Add gfp parameter to io_pgtable_ops->map()
    iommu: Mark __iommu_map_sg() as static
    iommu/vt-d: Rename intel-pasid.h to pasid.h
    iommu/vt-d: Add page response ops support
    iommu/vt-d: Report page request faults for guest SVA
    iommu/vt-d: Add a helper to get svm and sdev for pasid
    iommu/vt-d: Refactor device_to_iommu() helper
    iommu/vt-d: Disable multiple GPASID-dev bind
    iommu/vt-d: Warn on out-of-range invalidation address
    iommu/vt-d: Fix devTLB flush for vSVA
    iommu/vt-d: Handle non-page aligned address
    iommu/vt-d: Fix PASID devTLB invalidation
    iommu/vt-d: Remove global page support in devTLB flush
    iommu/vt-d: Enforce PASID devTLB field mask
    iommu: Make some functions static
    iommu/amd: Remove double zero check
    ...

    Linus Torvalds
     

05 Aug, 2020

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "It's been a busy cycle for documentation - hopefully the busiest for a
    while to come. Changes include:

    - Some new Chinese translations

    - Progress on the battle against double words words and non-HTTPS
    URLs

    - Some block-mq documentation

    - More RST conversions from Mauro. At this point, that task is
    essentially complete, so we shouldn't see this kind of churn again
    for a while. Unless we decide to switch to asciidoc or
    something...:)

    - Lots of typo fixes, warning fixes, and more"

    * tag 'docs-5.9' of git://git.lwn.net/linux: (195 commits)
    scripts/kernel-doc: optionally treat warnings as errors
    docs: ia64: correct typo
    mailmap: add entry for
    doc/zh_CN: add cpu-load Chinese version
    Documentation/admin-guide: tainted-kernels: fix spelling mistake
    MAINTAINERS: adjust kprobes.rst entry to new location
    devices.txt: document rfkill allocation
    PCI: correct flag name
    docs: filesystems: vfs: correct flag name
    docs: filesystems: vfs: correct sync_mode flag names
    docs: path-lookup: markup fixes for emphasis
    docs: path-lookup: more markup fixes
    docs: path-lookup: fix HTML entity mojibake
    CREDITS: Replace HTTP links with HTTPS ones
    docs: process: Add an example for creating a fixes tag
    doc/zh_CN: add Chinese translation prefer section
    doc/zh_CN: add clearing-warn-once Chinese version
    doc/zh_CN: add admin-guide index
    doc:it_IT: process: coding-style.rst: Correct __maybe_unused compiler label
    futex: MAINTAINERS: Re-add selftests directory
    ...

    Linus Torvalds
     

29 Jul, 2020

1 commit


24 Jul, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Link: https://lore.kernel.org/r/20200720211231.63831-1-grandmaster@al2klimov.de
    Signed-off-by: Jonathan Corbet

    Alexander A. Klimov
     

16 Jul, 2020

1 commit

  • Due to erratum #582743, the Marvell Armada-AP806 can't access 64bit to
    ARM SMMUv2 registers.

    Provide implementation relevant hooks:
    - split the writeq/readq to two accesses of writel/readl.
    - mask the MMU_IDR2.PTFSv8 fields to not use AArch64 format (but
    only AARCH32_L) since with AArch64 format 32 bits access is not supported.

    Note that most 64-bit registers like TTBRn can be accessed as two 32-bit
    halves without issue, and AArch32 format ensures that the register writes
    which must be atomic (for TLBI etc.) need only be 32-bit.

    Signed-off-by: Hanna Hawa
    Signed-off-by: Gregory CLEMENT
    Signed-off-by: Tomasz Nowicki
    Reviewed-by: Robin Murphy
    Link: https://lore.kernel.org/r/20200715070649.18733-3-tn@semihalf.com
    Signed-off-by: Will Deacon

    Hanna Hawa
     

09 Jul, 2020

1 commit

  • cpu-feature-registers.rst is missing a new line before a couple
    of tables listing the visible fields, causing broken tables in
    the HTML documentation generated by "make htmldocs". Fix this
    by adding the missing new line.

    Reported-by: Peter Maydell
    Signed-off-by: Suzuki K Poulose
    Cc: Mark Rutland
    Cc: Will Deacon
    Cc: Catalin Marinas
    Link: https://lore.kernel.org/r/20200707143152.154541-1-suzuki.poulose@arm.com
    Signed-off-by: Will Deacon

    Suzuki K Poulose
     

06 Jul, 2020

3 commits

  • Drop the doubled word "for".

    Signed-off-by: Randy Dunlap
    Acked-by: Mike Rapoport
    Cc: Jonathan Corbet
    Cc: linux-doc@vger.kernel.org
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Dave Martin
    Link: https://lore.kernel.org/r/20200703205110.29873-4-rdunlap@infradead.org
    Signed-off-by: Jonathan Corbet

    Randy Dunlap
     
  • Drop the doubled word "and".

    Signed-off-by: Randy Dunlap
    Acked-by: Mike Rapoport
    Cc: Jonathan Corbet
    Cc: linux-doc@vger.kernel.org
    Cc: Lorenzo Pieralisi
    Cc: Hanjun Guo
    Cc: Sudeep Holla
    Cc: linux-acpi@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Link: https://lore.kernel.org/r/20200703205110.29873-3-rdunlap@infradead.org
    Signed-off-by: Jonathan Corbet

    Randy Dunlap
     
  • Drop the doubled word "the".

    Signed-off-by: Randy Dunlap
    Acked-by: Mike Rapoport
    Cc: Jonathan Corbet
    Cc: linux-doc@vger.kernel.org
    Cc: Lorenzo Pieralisi
    Cc: Hanjun Guo
    Cc: Sudeep Holla
    Cc: linux-acpi@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Link: https://lore.kernel.org/r/20200703205110.29873-2-rdunlap@infradead.org
    Signed-off-by: Jonathan Corbet

    Randy Dunlap
     

03 Jul, 2020

2 commits

  • KRYO4XX silver/LITTLE CPU cores with revision r1p0 are affected by
    erratum 1530923 and 1024718, so add them to the respective list.
    The variant and revision bits are implementation defined and are
    different from the their Cortex CPU counterparts on which they are
    based on, i.e., r1p0 is equivalent to rdpe.

    Signed-off-by: Sai Prakash Ranjan
    Link: https://lore.kernel.org/r/7013e8a3f857ca7e82863cc9e34a614293d7f80c.1593539394.git.saiprakash.ranjan@codeaurora.org
    Signed-off-by: Will Deacon

    Sai Prakash Ranjan
     
  • KRYO4XX gold/big CPU core revisions r0p0 to r3p1 are affected by
    erratum 1463225 and 1418040, so add them to the respective list.
    The variant and revision bits are implementation defined and are
    different from the their Cortex CPU counterparts on which they are
    based on, i.e., (r0p0 to r3p1) is equivalent to (rcpe to rfpf).

    Signed-off-by: Sai Prakash Ranjan
    Link: https://lore.kernel.org/r/83780e80c6377c12ca51b5d53186b61241685e49.1593539394.git.saiprakash.ranjan@codeaurora.org
    Signed-off-by: Will Deacon

    Sai Prakash Ranjan
     

20 Jun, 2020

1 commit

  • This file is almost in ReST. All it needs is a rename and
    adding a :field: for the two fields at the beginning
    (author and date).

    While here, add a proper SPDX header, and use the standard
    markup for document titles, just for consistency.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/c99bebf166559e9098a9eb78fb2eab2847fffb05.1592203650.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

15 Jun, 2020

1 commit

  • sve.rst describes a flag PR_SVE_SET_VL_INHERIT for the
    PR_SVE_SET_VL prctl, but there is no flag of this name. The flag
    is shared between the _GET and _SET calls, so the _SET prefix was
    dropped, giving the name PR_SVE_VL_INHERIT in the headers.

    Fix it.

    Signed-off-by: Dave Martin
    Link: https://lore.kernel.org/r/1591808590-20210-2-git-send-email-Dave.Martin@arm.com
    Signed-off-by: Will Deacon

    Dave Martin
     

02 Jun, 2020

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "A fair amount of stuff this time around, dominated by yet another
    massive set from Mauro toward the completion of the RST conversion. I
    *really* hope we are getting close to the end of this. Meanwhile,
    those patches reach pretty far afield to update document references
    around the tree; there should be no actual code changes there. There
    will be, alas, more of the usual trivial merge conflicts.

    Beyond that we have more translations, improvements to the sphinx
    scripting, a number of additions to the sysctl documentation, and lots
    of fixes"

    * tag 'docs-5.8' of git://git.lwn.net/linux: (130 commits)
    Documentation: fixes to the maintainer-entry-profile template
    zswap: docs/vm: Fix typo accept_threshold_percent in zswap.rst
    tracing: Fix events.rst section numbering
    docs: acpi: fix old http link and improve document format
    docs: filesystems: add info about efivars content
    Documentation: LSM: Correct the basic LSM description
    mailmap: change email for Ricardo Ribalda
    docs: sysctl/kernel: document unaligned controls
    Documentation: admin-guide: update bug-hunting.rst
    docs: sysctl/kernel: document ngroups_max
    nvdimm: fixes to maintainter-entry-profile
    Documentation/features: Correct RISC-V kprobes support entry
    Documentation/features: Refresh the arch support status files
    Revert "docs: sysctl/kernel: document ngroups_max"
    docs: move locking-specific documents to locking/
    docs: move digsig docs to the security book
    docs: move the kref doc into the core-api book
    docs: add IRQ documentation at the core-api book
    docs: debugging-via-ohci1394.txt: add it to the core-api book
    docs: fix references for ipmi.rst file
    ...

    Linus Torvalds
     

29 May, 2020

1 commit

  • Support for Branch Target Identification (BTI) in user and kernel
    (Mark Brown and others)
    * for-next/bti: (39 commits)
    arm64: vdso: Fix CFI directives in sigreturn trampoline
    arm64: vdso: Don't prefix sigreturn trampoline with a BTI C instruction
    arm64: bti: Fix support for userspace only BTI
    arm64: kconfig: Update and comment GCC version check for kernel BTI
    arm64: vdso: Map the vDSO text with guarded pages when built for BTI
    arm64: vdso: Force the vDSO to be linked as BTI when built for BTI
    arm64: vdso: Annotate for BTI
    arm64: asm: Provide a mechanism for generating ELF note for BTI
    arm64: bti: Provide Kconfig for kernel mode BTI
    arm64: mm: Mark executable text as guarded pages
    arm64: bpf: Annotate JITed code for BTI
    arm64: Set GP bit in kernel page tables to enable BTI for the kernel
    arm64: asm: Override SYM_FUNC_START when building the kernel with BTI
    arm64: bti: Support building kernel C code using BTI
    arm64: Document why we enable PAC support for leaf functions
    arm64: insn: Report PAC and BTI instructions as skippable
    arm64: insn: Don't assume unrecognized HINTs are skippable
    arm64: insn: Provide a better name for aarch64_insn_is_nop()
    arm64: insn: Add constants for new HINT instruction decode
    arm64: Disable old style assembly annotations
    ...

    Will Deacon
     

05 May, 2020

1 commit

  • Merge in user support for Branch Target Identification, which narrowly
    missed the cut for 5.7 after a late ABI concern.

    * for-next/bti-user:
    arm64: bti: Document behaviour for dynamically linked binaries
    arm64: elf: Fix allnoconfig kernel build with !ARCH_USE_GNU_PROPERTY
    arm64: BTI: Add Kconfig entry for userspace BTI
    mm: smaps: Report arm64 guarded pages in smaps
    arm64: mm: Display guarded pages in ptdump
    KVM: arm64: BTI: Reset BTYPE when skipping emulated instructions
    arm64: BTI: Reset BTYPE when skipping emulated instructions
    arm64: traps: Shuffle code to eliminate forward declarations
    arm64: unify native/compat instruction skipping
    arm64: BTI: Decode BYTPE bits when printing PSTATE
    arm64: elf: Enable BTI at exec based on ELF program properties
    elf: Allow arch to tweak initial mmap prot flags
    arm64: Basic Branch Target Identification support
    ELF: Add ELF program property parsing support
    ELF: UAPI and Kconfig additions for ELF program properties

    Will Deacon
     

30 Apr, 2020

1 commit

  • The Arm silicon errata list is mostly sorted by CPU name with the
    exception of Cortex-A55, so let's sort it before adding more entries.

    Signed-off-by: Rob Herring
    Cc: Catalin Marinas
    Cc: Will Deacon
    Link: https://lore.kernel.org/r/20200429191921.32484-1-robh@kernel.org
    Signed-off-by: Will Deacon

    Rob Herring
     

28 Apr, 2020

1 commit

  • Although we require that the loaded kernel Image has been cleaned to the
    PoC, we neglect to spell out the state of the I-cache. Although this
    should be reasonably obvious, it doesn't hurt to be explicit.

    Require that the I-cache doesn't hold any stale entries for the kernel
    Image at boot.

    Acked-by: Mark Rutland
    Acked-by: Catalin Marinas
    Cc: Mark Rutland
    Cc: Catalin Marinas
    Link: https://lore.kernel.org/r/20200423093658.10602-1-will@kernel.org
    Signed-off-by: Will Deacon

    Will Deacon
     

24 Apr, 2020

1 commit

  • Fix bullet list formatting to eliminate doc warnings:

    Documentation/arm64/amu.rst:26: WARNING: Unexpected indentation.
    Documentation/arm64/amu.rst:60: WARNING: Unexpected indentation.
    Documentation/arm64/amu.rst:81: WARNING: Unexpected indentation.
    Documentation/arm64/amu.rst:108: WARNING: Unexpected indentation.

    Signed-off-by: Randy Dunlap
    Cc: Ionela Voinescu
    Cc: Will Deacon
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Catalin Marinas

    Randy Dunlap
     

21 Apr, 2020

2 commits

  • Get rid of those warnings:

    Documentation/arm64/booting.rst:253: WARNING: Unexpected indentation.
    Documentation/arm64/booting.rst:259: WARNING: Block quote ends without a blank line; unexpected unindent.

    By adding an extra blank lines where needed.

    While here, use list markups on some places, as otherwise Sphinx
    will consider the next lines as continuation of the privious ones.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/121b267be0a102fde73498c31792e5a9309013cc.1586881715.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • Add extra blank lines on some places, in order to avoid those
    warnings when building the docs:

    Documentation/arm64/amu.rst:26: WARNING: Unexpected indentation.
    Documentation/arm64/amu.rst:60: WARNING: Unexpected indentation.
    Documentation/arm64/amu.rst:81: WARNING: Unexpected indentation.
    Documentation/arm64/amu.rst:108: WARNING: Unexpected indentation.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/ab0881638fc41ed790b3307a8e022ec84b7cce7e.1586881715.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

01 Apr, 2020

1 commit

  • Pull arm64 updates from Catalin Marinas:
    "The bulk is in-kernel pointer authentication, activity monitors and
    lots of asm symbol annotations. I also queued the sys_mremap() patch
    commenting the asymmetry in the address untagging.

    Summary:

    - In-kernel Pointer Authentication support (previously only offered
    to user space).

    - ARM Activity Monitors (AMU) extension support allowing better CPU
    utilisation numbers for the scheduler (frequency invariance).

    - Memory hot-remove support for arm64.

    - Lots of asm annotations (SYM_*) in preparation for the in-kernel
    Branch Target Identification (BTI) support.

    - arm64 perf updates: ARMv8.5-PMU 64-bit counters, refactoring the
    PMU init callbacks, support for new DT compatibles.

    - IPv6 header checksum optimisation.

    - Fixes: SDEI (software delegated exception interface) double-lock on
    hibernate with shared events.

    - Minor clean-ups and refactoring: cpu_ops accessor,
    cpu_do_switch_mm() converted to C, cpufeature finalisation helper.

    - sys_mremap() comment explaining the asymmetric address untagging
    behaviour"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (81 commits)
    mm/mremap: Add comment explaining the untagging behaviour of mremap()
    arm64: head: Convert install_el2_stub to SYM_INNER_LABEL
    arm64: Introduce get_cpu_ops() helper function
    arm64: Rename cpu_read_ops() to init_cpu_ops()
    arm64: Declare ACPI parking protocol CPU operation if needed
    arm64: move kimage_vaddr to .rodata
    arm64: use mov_q instead of literal ldr
    arm64: Kconfig: verify binutils support for ARM64_PTR_AUTH
    lkdtm: arm64: test kernel pointer authentication
    arm64: compile the kernel with ptrauth return address signing
    kconfig: Add support for 'as-option'
    arm64: suspend: restore the kernel ptrauth keys
    arm64: __show_regs: strip PAC from lr in printk
    arm64: unwind: strip PAC from kernel addresses
    arm64: mask PAC bits of __builtin_return_address
    arm64: initialize ptrauth keys for kernel booting task
    arm64: initialize and switch ptrauth kernel keys
    arm64: enable ptrauth earlier
    arm64: cpufeature: handle conflicts based on capability
    arm64: cpufeature: Move cpu capability helpers inside C file
    ...

    Linus Torvalds
     

17 Mar, 2020

1 commit

  • This patch adds the bare minimum required to expose the ARMv8.5
    Branch Target Identification feature to userspace.

    By itself, this does _not_ automatically enable BTI for any initial
    executable pages mapped by execve(). This will come later, but for
    now it should be possible to enable BTI manually on those pages by
    using mprotect() from within the target process.

    Other arches already using the generic mman.h are already using
    0x10 for arch-specific prot flags, so we use that for PROT_BTI
    here.

    For consistency, signal handler entry points in BTI guarded pages
    are required to be annotated as such, just like any other function.
    This blocks a relatively minor attack vector, but comforming
    userspace will have the annotations anyway, so we may as well
    enforce them.

    Signed-off-by: Mark Brown
    Signed-off-by: Dave Martin
    Reviewed-by: Catalin Marinas
    Signed-off-by: Catalin Marinas

    Dave Martin
     

16 Mar, 2020

1 commit


15 Mar, 2020

1 commit


14 Mar, 2020

1 commit

  • Despite the architecture spec requiring that reserved registers in the GIC
    distributor memory map are RES0 (and thus are not allowed to generate
    an exception), the Cavium ThunderX (aka TX1) SoC explodes as such:

    [ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode
    [ 0.000000] GICv3: 128 SPIs implemented
    [ 0.000000] GICv3: 0 Extended SPIs implemented
    [ 0.000000] Internal error: synchronous external abort: 96000210 [#1] SMP
    [ 0.000000] Modules linked in:
    [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-rc4-00035-g3cf6a3d5725f #7956
    [ 0.000000] Hardware name: cavium,thunder-88xx (DT)
    [ 0.000000] pstate: 60000085 (nZCv daIf -PAN -UAO)
    [ 0.000000] pc : __raw_readl+0x0/0x8
    [ 0.000000] lr : gic_init_bases+0x110/0x560
    [ 0.000000] sp : ffff800011243d90
    [ 0.000000] x29: ffff800011243d90 x28: 0000000000000000
    [ 0.000000] x27: 0000000000000018 x26: 0000000000000002
    [ 0.000000] x25: ffff8000116f0000 x24: ffff000fbe6a2c80
    [ 0.000000] x23: 0000000000000000 x22: ffff010fdc322b68
    [ 0.000000] x21: ffff800010a7a208 x20: 00000000009b0404
    [ 0.000000] x19: ffff80001124dad0 x18: 0000000000000010
    [ 0.000000] x17: 000000004d8d492b x16: 00000000f67eb9af
    [ 0.000000] x15: ffffffffffffffff x14: ffff800011249908
    [ 0.000000] x13: ffff800091243ae7 x12: ffff800011243af4
    [ 0.000000] x11: ffff80001126e000 x10: ffff800011243a70
    [ 0.000000] x9 : 00000000ffffffd0 x8 : ffff80001069c828
    [ 0.000000] x7 : 0000000000000059 x6 : ffff8000113fb4d1
    [ 0.000000] x5 : 0000000000000001 x4 : 0000000000000000
    [ 0.000000] x3 : 0000000000000000 x2 : 0000000000000000
    [ 0.000000] x1 : 0000000000000000 x0 : ffff8000116f000c
    [ 0.000000] Call trace:
    [ 0.000000] __raw_readl+0x0/0x8
    [ 0.000000] gic_of_init+0x188/0x224
    [ 0.000000] of_irq_init+0x200/0x3cc
    [ 0.000000] irqchip_init+0x1c/0x40
    [ 0.000000] init_IRQ+0x160/0x1d0
    [ 0.000000] start_kernel+0x2ec/0x4b8
    [ 0.000000] Code: a8c47bfd d65f03c0 d538d080 d65f03c0 (b9400000)

    when reading the GICv4.1 GICD_TYPER2 register, which is unexpected...

    Work around it by adding a new quirk for the following variants:

    ThunderX: CN88xx
    OCTEON TX: CN83xx, CN81xx
    OCTEON TX2: CN93xx, CN96xx, CN98xx, CNF95xx*

    and use this flag to avoid accessing GICD_TYPER2. Note that all
    reserved registers (including redistributors and ITS) are impacted
    by this erratum, but that only GICD_TYPER2 has to be worked around
    so far.

    Signed-off-by: Marc Zyngier
    Tested-by: Robert Richter
    Tested-by: Mark Salter
    Tested-by: Tim Harvey
    Acked-by: Catalin Marinas
    Acked-by: Robert Richter
    Link: https://lore.kernel.org/r/20191027144234.8395-11-maz@kernel.org
    Link: https://lore.kernel.org/r/20200311115649.26060-1-maz@kernel.org

    Marc Zyngier
     

07 Mar, 2020

1 commit

  • The activity monitors extension is an optional extension introduced
    by the ARMv8.4 CPU architecture.

    Add initial documentation for the AMUv1 extension:
    - arm64/amu.txt: AMUv1 documentation
    - arm64/booting.txt: system registers initialisation

    Signed-off-by: Ionela Voinescu
    Reviewed-by: Valentin Schneider
    Cc: Jonathan Corbet
    Cc: Will Deacon
    Cc: Catalin Marinas
    Signed-off-by: Catalin Marinas

    Ionela Voinescu
     

20 Feb, 2020

2 commits

  • Currently the arm64 kernel ignores the top address byte passed to brk(),
    mmap() and mremap(). When the user is not aware of the 56-bit address
    limit or relies on the kernel to return an error, untagging such
    pointers has the potential to create address aliases in user-space.
    Passing a tagged address to munmap(), madvise() is permitted since the
    tagged pointer is expected to be inside an existing mapping.

    The current behaviour breaks the existing glibc malloc() implementation
    which relies on brk() with an address beyond 56-bit to be rejected by
    the kernel.

    Remove untagging in the above functions by partially reverting commit
    ce18d171cb73 ("mm: untag user pointers in mmap/munmap/mremap/brk"). In
    addition, update the arm64 tagged-address-abi.rst document accordingly.

    Link: https://bugzilla.redhat.com/1797052
    Fixes: ce18d171cb73 ("mm: untag user pointers in mmap/munmap/mremap/brk")
    Cc: # 5.4.x-
    Cc: Florian Weimer
    Reviewed-by: Andrew Morton
    Reported-by: Victor Stinner
    Acked-by: Will Deacon
    Acked-by: Andrey Konovalov
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon

    Catalin Marinas
     
  • Fix trivial spelling error enought to enough in memory.rst.

    Cc: trivial@kernel.org
    Signed-off-by: Scott Branden
    Signed-off-by: Will Deacon

    Scott Branden
     

22 Jan, 2020

2 commits