25 Sep, 2020

1 commit


24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

07 Jun, 2020

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "Enumeration:

    - Program MPS for RCiEP devices (Ashok Raj)

    - Fix pci_register_host_bridge() device_register() error handling
    (Rob Herring)

    - Fix pci_host_bridge struct device release/free handling (Rob
    Herring)

    Resource management:

    - Allow resizing BARs for devices on root bus (Ard Biesheuvel)

    Power management:

    - Reduce Thunderbolt resume time by working around devices that don't
    support DLL Link Active reporting (Mika Westerberg)

    - Work around a Pericom USB controller OHCI/EHCI PME# defect
    (Kai-Heng Feng)

    Virtualization:

    - Add ACS quirk for Intel Root Complex Integrated Endpoints (Ashok
    Raj)

    - Avoid FLR for AMD Starship USB 3.0 (Kevin Buettner)

    - Avoid FLR for AMD Matisse HD Audio & USB 3.0 (Marcos Scriven)

    Error handling:

    - Use only _OSC (not HEST FIRMWARE_FIRST) to determine AER ownership
    (Alexandru Gagniuc, Kuppuswamy Sathyanarayanan)

    - Reduce verbosity by logging only ACPI_NOTIFY_DISCONNECT_RECOVER
    events (Kuppuswamy Sathyanarayanan)

    - Don't enable AER by default in Kconfig (Bjorn Helgaas)

    Peer-to-peer DMA:

    - Add AMD Zen Raven and Renoir Root Ports to whitelist (Alex Deucher)

    ASPM:

    - Allow ASPM on links to PCIe-to-PCI/PCI-X Bridges (Kai-Heng Feng)

    Endpoint framework:

    - Fix DMA channel release in test (Kunihiko Hayashi)

    - Add page size as argument to pci_epc_mem_init() (Lad Prabhakar)

    - Add support to handle multiple base for mapping outbound memory
    (Lad Prabhakar)

    Generic host bridge driver:

    - Support building as module (Rob Herring)

    - Eliminate pci_host_common_probe wrappers (Rob Herring)

    Amlogic Meson PCIe controller driver:

    - Don't use FAST_LINK_MODE to set up link (Marc Zyngier)

    Broadcom STB PCIe controller driver:

    - Disable ASPM L0s if 'aspm-no-l0s' in DT (Jim Quinlan)

    - Fix clk_put() error (Jim Quinlan)

    - Fix window register offset (Jim Quinlan)

    - Assert fundamental reset on initialization (Nicolas Saenz Julienne)

    - Add notify xHCI reset property (Nicolas Saenz Julienne)

    - Add init routine for Raspberry Pi 4 VL805 USB controller (Nicolas
    Saenz Julienne)

    - Sync with Raspberry Pi 4 firmware for VL805 initialization (Nicolas
    Saenz Julienne)

    Cadence PCIe controller driver:

    - Remove "cdns,max-outbound-regions" DT property (replaced by
    "ranges") (Kishon Vijay Abraham I)

    - Read 32-bit (not 16-bit) Vendor ID/Device ID property from DT
    (Kishon Vijay Abraham I)

    Marvell Aardvark PCIe controller driver:

    - Improve link training (Marek Behún)

    - Add PHY support (Marek Behún)

    - Add "phys", "max-link-speed", "reset-gpios" to dt-binding (Marek
    Behún)

    - Train link immediately after enabling training to work around
    detection issues with some cards (Pali Rohár)

    - Issue PERST via GPIO to work around detection issues (Pali Rohár)

    - Don't blindly enable ASPM L0s (Pali Rohár)

    - Replace custom macros by standard linux/pci_regs.h macros (Pali
    Rohár)

    Microsoft Hyper-V host bridge driver:

    - Fix probe failure path to release resource (Wei Hu)

    - Retry PCI bus D0 entry on invalid device state for kdump (Wei Hu)

    Renesas R-Car PCIe controller driver:

    - Fix incorrect programming of OB windows (Andrew Murray)

    - Add suspend/resume (Kazufumi Ikeda)

    - Rename pcie-rcar.c to pcie-rcar-host.c (Lad Prabhakar)

    - Add endpoint controller driver (Lad Prabhakar)

    - Fix PCIEPAMR mask calculation (Lad Prabhakar)

    - Add r8a77961 to DT binding (Yoshihiro Shimoda)

    Socionext UniPhier Pro5 controller driver:

    - Add endpoint controller driver (Kunihiko Hayashi)

    Synopsys DesignWare PCIe controller driver:

    - Program outbound ATU upper limit register (Alan Mikhak)

    - Fix inner MSI IRQ domain registration (Marc Zyngier)

    Miscellaneous:

    - Check for platform_get_irq() failure consistently (negative return
    means failure) (Aman Sharma)

    - Fix several runtime PM get/put imbalances (Dinghao Liu)

    - Use flexible-array and struct_size() helpers for code cleanup
    (Gustavo A. R. Silva)

    - Update & fix issues in bridge emulation of PCIe registers (Jon
    Derrick)

    - Add macros for bridge window names (PCI_BRIDGE_IO_WINDOW, etc)
    (Krzysztof Wilczyński)

    - Work around Intel PCH MROMs that have invalid BARs (Xiaochun Lee)"

    * tag 'pci-v5.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (100 commits)
    PCI: uniphier: Add Socionext UniPhier Pro5 PCIe endpoint controller driver
    PCI: Add ACS quirk for Intel Root Complex Integrated Endpoints
    PCI/DPC: Print IRQ number used by port
    PCI/AER: Use "aer" variable for capability offset
    PCI/AER: Remove redundant dev->aer_cap checks
    PCI/AER: Remove redundant pci_is_pcie() checks
    PCI/AER: Remove HEST/FIRMWARE_FIRST parsing for AER ownership
    PCI: tegra: Fix runtime PM imbalance on error
    PCI: vmd: Filter resource type bits from shadow register
    PCI: tegra194: Fix runtime PM imbalance on error
    dt-bindings: PCI: Add UniPhier PCIe endpoint controller description
    PCI: hv: Use struct_size() helper
    PCI: Rename _DSM constants to align with spec
    PCI: Avoid FLR for AMD Starship USB 3.0
    PCI: Avoid FLR for AMD Matisse HD Audio & USB 3.0
    x86/PCI: Drop unused xen_register_pirq() gsi_override parameter
    PCI: dwc: Use private data pointer of "struct irq_domain" to get pcie_port
    PCI: amlogic: meson: Don't use FAST_LINK_MODE to set up link
    PCI: dwc: Fix inner MSI IRQ domain registration
    PCI: dwc: pci-dra7xx: Use devm_platform_ioremap_resource_byname()
    ...

    Linus Torvalds
     

05 Jun, 2020

1 commit


03 Jun, 2020

1 commit

  • Factor code shared between pci_64 and electra_cf into a ioremap_pbh helper
    that follows the normal ioremap semantics, and returns a useful __iomem
    pointer. Note that it opencodes __ioremap_at as we know from the callers
    the slab is available. Switch pci_64 to also store the result as __iomem
    pointer, and unmap the result using iounmap instead of force casting and
    using vmalloc APIs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Acked-by: Peter Zijlstra (Intel)
    Cc: Christian Borntraeger
    Cc: Christophe Leroy
    Cc: Daniel Vetter
    Cc: David Airlie
    Cc: Gao Xiang
    Cc: Greg Kroah-Hartman
    Cc: Haiyang Zhang
    Cc: Johannes Weiner
    Cc: "K. Y. Srinivasan"
    Cc: Laura Abbott
    Cc: Mark Rutland
    Cc: Michael Kelley
    Cc: Minchan Kim
    Cc: Nitin Gupta
    Cc: Robin Murphy
    Cc: Sakari Ailus
    Cc: Stephen Hemminger
    Cc: Sumit Semwal
    Cc: Wei Liu
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Heiko Carstens
    Cc: Paul Mackerras
    Cc: Vasily Gorbik
    Cc: Will Deacon
    Link: http://lkml.kernel.org/r/20200414131348.444715-7-hch@lst.de
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

22 May, 2020

2 commits


18 May, 2020

1 commit


01 Apr, 2020

1 commit


28 Mar, 2020

2 commits

  • The current codebase makes use of the zero-length array language
    extension to the C90 standard, but the preferred mechanism to declare
    variable-length types such as these ones is a flexible array member[1][2],
    introduced in C99:

    struct foo {
    int stuff;
    struct boo array[];
    };

    By making use of the mechanism above, we will get a compiler warning
    in case the flexible array does not occur last in the structure, which
    will help us prevent some kind of undefined behavior bugs from being
    inadvertently introduced[3] to the codebase from now on.

    Also, notice that, dynamic memory allocations won't be affected by
    this change:

    "Flexible array members have incomplete type, and so the sizeof operator
    may not be applied. As a quirk of the original implementation of
    zero-length arrays, sizeof evaluates to zero."[1]

    This issue was found with the help of Coccinelle.

    [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
    [2] https://github.com/KSPP/linux/issues/21
    [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Dominik Brodowski

    Gustavo A. R. Silva
     
  • The current codebase makes use of the zero-length array language
    extension to the C90 standard, but the preferred mechanism to declare
    variable-length types such as these ones is a flexible array member[1][2],
    introduced in C99:

    struct foo {
    int stuff;
    struct boo array[];
    };

    By making use of the mechanism above, we will get a compiler warning
    in case the flexible array does not occur last in the structure, which
    will help us prevent some kind of undefined behavior bugs from being
    inadvertently introduced[3] to the codebase from now on.

    Also, notice that, dynamic memory allocations won't be affected by
    this change:

    "Flexible array members have incomplete type, and so the sizeof operator
    may not be applied. As a quirk of the original implementation of
    zero-length arrays, sizeof evaluates to zero."[1]

    This issue was found with the help of Coccinelle.

    [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
    [2] https://github.com/KSPP/linux/issues/21
    [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Dominik Brodowski

    Gustavo A. R. Silva
     

14 Mar, 2020

2 commits


16 Dec, 2019

10 commits


22 Nov, 2019

3 commits


21 Nov, 2019

2 commits


28 Sep, 2019

1 commit

  • Pull kernel lockdown mode from James Morris:
    "This is the latest iteration of the kernel lockdown patchset, from
    Matthew Garrett, David Howells and others.

    From the original description:

    This patchset introduces an optional kernel lockdown feature,
    intended to strengthen the boundary between UID 0 and the kernel.
    When enabled, various pieces of kernel functionality are restricted.
    Applications that rely on low-level access to either hardware or the
    kernel may cease working as a result - therefore this should not be
    enabled without appropriate evaluation beforehand.

    The majority of mainstream distributions have been carrying variants
    of this patchset for many years now, so there's value in providing a
    doesn't meet every distribution requirement, but gets us much closer
    to not requiring external patches.

    There are two major changes since this was last proposed for mainline:

    - Separating lockdown from EFI secure boot. Background discussion is
    covered here: https://lwn.net/Articles/751061/

    - Implementation as an LSM, with a default stackable lockdown LSM
    module. This allows the lockdown feature to be policy-driven,
    rather than encoding an implicit policy within the mechanism.

    The new locked_down LSM hook is provided to allow LSMs to make a
    policy decision around whether kernel functionality that would allow
    tampering with or examining the runtime state of the kernel should be
    permitted.

    The included lockdown LSM provides an implementation with a simple
    policy intended for general purpose use. This policy provides a coarse
    level of granularity, controllable via the kernel command line:

    lockdown={integrity|confidentiality}

    Enable the kernel lockdown feature. If set to integrity, kernel features
    that allow userland to modify the running kernel are disabled. If set to
    confidentiality, kernel features that allow userland to extract
    confidential information from the kernel are also disabled.

    This may also be controlled via /sys/kernel/security/lockdown and
    overriden by kernel configuration.

    New or existing LSMs may implement finer-grained controls of the
    lockdown features. Refer to the lockdown_reason documentation in
    include/linux/security.h for details.

    The lockdown feature has had signficant design feedback and review
    across many subsystems. This code has been in linux-next for some
    weeks, with a few fixes applied along the way.

    Stephen Rothwell noted that commit 9d1f8be5cf42 ("bpf: Restrict bpf
    when kernel lockdown is in confidentiality mode") is missing a
    Signed-off-by from its author. Matthew responded that he is providing
    this under category (c) of the DCO"

    * 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (31 commits)
    kexec: Fix file verification on S390
    security: constify some arrays in lockdown LSM
    lockdown: Print current->comm in restriction messages
    efi: Restrict efivar_ssdt_load when the kernel is locked down
    tracefs: Restrict tracefs when the kernel is locked down
    debugfs: Restrict debugfs when the kernel is locked down
    kexec: Allow kexec_file() with appropriate IMA policy when locked down
    lockdown: Lock down perf when in confidentiality mode
    bpf: Restrict bpf when kernel lockdown is in confidentiality mode
    lockdown: Lock down tracing and perf kprobes when in confidentiality mode
    lockdown: Lock down /proc/kcore
    x86/mmiotrace: Lock down the testmmiotrace module
    lockdown: Lock down module params that specify hardware parameters (eg. ioport)
    lockdown: Lock down TIOCSSERIAL
    lockdown: Prohibit PCMCIA CIS storage when the kernel is locked down
    acpi: Disable ACPI table override if the kernel is locked down
    acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down
    ACPI: Limit access to custom_method when the kernel is locked down
    x86/msr: Restrict MSR access when the kernel is locked down
    x86: Lock down IO port access when the kernel is locked down
    ...

    Linus Torvalds
     

04 Sep, 2019

1 commit

  • As suggested in https://kernelnewbies.org/KernelJanitors/Todo
    this patch replaces the outdated macro of DPRINTK for dev_dbg()

    To: Dominik Brodowski
    To: Thomas Gleixner
    To: Adam Zerella
    To: linux-kernel@vger.kernel.org
    Signed-off-by: Adam Zerella
    Link: https://lore.kernel.org/r/20190825053513.13990-1-adam.zerella@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Adam Zerella
     

20 Aug, 2019

1 commit


10 Aug, 2019

1 commit

  • Mark switch cases where we are expecting to fall through.

    This patch fixes the following warnings (Building: db1xxx_defconfig mips):

    drivers/pcmcia/db1xxx_ss.c:257:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
    drivers/pcmcia/db1xxx_ss.c:269:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

    Reviewed-by: Kees Cook
    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

10 Jul, 2019

1 commit

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

15 Jun, 2019

1 commit

  • Convert the pcmcia docs to ReST format. Most of the changes here
    are trivial.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Dominik Brodowski
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    the contents of this file may be used under the terms of the gnu
    public license version 2 the gpl

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 1 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Reviewed-by: Alexios Zavras
    Reviewed-by: Steve Winslow
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190529141333.014369811@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 May, 2019

2 commits

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

1 commit