Skip to content
Permalink
Maciej-W-Rozyc…
Switch branches/tags

Commits on Feb 12, 2022

  1. serial: 8250: Report which option to enable for blacklisted PCI devices

    Provide information in the kernel log as to what configuration option to
    enable for PCI UART devices that have been blacklisted in the generic
    PCI 8250 UART driver and which have a dedicated driver available to
    handle that has been disabled.  The rationale is there is no easy way
    for the user to map a specific PCI vendor:device pair to an individual
    dedicated driver while the generic driver has this information readily
    available and it will likely be confusing that the generic driver does
    not register such a port.
    
    A message is then printed like:
    
    serial 0000:04:00.3: ignoring port, enable SERIAL_8250_PERICOM to handle
    
    when an affected device is encountered and the generic driver rejects it.
    
    Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
    Maciej W. Rozycki authored and intel-lab-lkp committed Feb 12, 2022
  2. serial: 8250: Correct Kconfig help text for blacklisted PCI devices

    Correct the Kconfig help text for SERIAL_8250_LPSS, SERIAL_8250_MID and
    SERIAL_8250_PERICOM configuration options for dedicated PCI UART drivers
    that have been blacklisted in the generic PCI 8250 UART driver and as
    from commit a13e19c ("serial: 8250_lpss: split LPSS driver to
    separate module"), commit d9eda9b ("serial: 8250_pci: Intel MID
    UART support to its own driver"), and commit fcfd3c0 ("serial:
    8250_pci: Split out Pericom driver") respectively are not handled by
    said driver anymore (rather than for extra features only, as the current
    text indicates), and therefore require the respective dedicated drivers
    to work at all.
    
    Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
    Maciej W. Rozycki authored and intel-lab-lkp committed Feb 12, 2022

Commits on Feb 11, 2022

  1. dt-bindings: serial: fsl-lpuart: Remove i.MX8QM from enum

    i.MX8QM lpuart is backwards compatible with i.MX8QXP, so lets remove
    the single match from enum. This will force nodes to have both compatible
    strings, since there is already an 'items' entry for that.
    
    Reviewed-by: Peng Fan <peng.fan@nxp.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
    Link: https://lore.kernel.org/r/20220210201407.567860-2-abel.vesa@nxp.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    abelvesa authored and gregkh committed Feb 11, 2022
  2. dt-bindings: serial: fsl-lpuart: Drop i.MX8QXP backwards compatibility

    Drop the i.MX8QXP backwards compatibility with i.MX7ULP since they
    differ from clocks handling point of view.
    
    Acked-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
    Link: https://lore.kernel.org/r/20220210201407.567860-1-abel.vesa@nxp.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    abelvesa authored and gregkh committed Feb 11, 2022
  3. tty: serial: imx: Add fast path when rs485 delays are 0

    Right now, even when `delay_rts_before_send` and `delay_rts_after_send`
    are 0, the hrtimer is triggered (with timeout 0) which can introduce a
    few 100us of additional overhead on slower i.MX platforms.
    
    Implement a fast path when the delays are 0, where the RTS signal is
    toggled immediately instead of going through an hrtimer.  This fast path
    behaves identical to the code before delay support was implemented.
    
    Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Harald Seiler <hws@denx.de>
    Link: https://lore.kernel.org/r/20220119145204.238767-1-hws@denx.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Rahix authored and gregkh committed Feb 11, 2022

Commits on Feb 8, 2022

  1. serial: 8250_bcm2835aux: Add ACPI support

    Add ACPI support to 8250_bcm2835aux driver. This makes it possible to
    use the miniuart on the Raspberry Pi with the tianocore/edk2 UEFI
    firmware.
    
    Tested-by: Jeremy Linton <jeremy.linton@arm.com>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: Adrien Thierry <athierry@redhat.com>
    Link: https://lore.kernel.org/r/20220207232129.402882-1-athierry@redhat.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    athierry1 authored and gregkh committed Feb 8, 2022
  2. dt-bindings: serial: renesas,sci: Document RZ/G2UL SoC

    Add SCI binding documentation for Renesas RZ/G2UL SoC. No driver changes
    are required as generic compatible string "renesas,sci" will be used as
    a fallback.
    
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Link: https://lore.kernel.org/r/20220207142213.19552-3-biju.das.jz@bp.renesas.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Biju Das authored and gregkh committed Feb 8, 2022
  3. dt-bindings: serial: renesas,scif: Document RZ/G2UL SoC

    Add SCIF binding documentation for Renesas RZ/G2UL SoC. SCIF block on
    RZ/G2UL is identical to one found on the RZ/G2L SoC. No driver changes
    are required as RZ/G2L compatible string "renesas,scif-r9a07g044" will
    be used as a fallback.
    
    Whilst dropped the comments after RZ/G2{L,LC} fallback as to
    avoid updating the comment over and over again when a new IP
    is added
    
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Link: https://lore.kernel.org/r/20220207142213.19552-2-biju.das.jz@bp.renesas.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Biju Das authored and gregkh committed Feb 8, 2022
  4. dt-bindings: serial: renesas,scif: Remove redundant renesas,scif-r9a0…

    …7g054
    
    This patch removes redundant "renesas,scif-r9a07g054" from binding
    documentation as it uses renesas,scif-r9a07g044 fallback.
    
    Whilst remove the additional renesas,scif-r9a07g054 from Items.
    
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Link: https://lore.kernel.org/r/20220207142213.19552-1-biju.das.jz@bp.renesas.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Biju Das authored and gregkh committed Feb 8, 2022
  5. dt-bindings: serial: fsl-lpuart: Add i.MX8DXL compatible

    Add i.MX8DXL lpuart compatible to the bindings documentation.
    
    Reviewed-by: Peng Fan <peng.fan@nxp.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
    Link: https://lore.kernel.org/r/20220118131715.2051965-1-abel.vesa@nxp.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    abelvesa authored and gregkh committed Feb 8, 2022
  6. serial: stm32: enable / disable wake irqs for mcrtl_gpio wakeup sources

    Enable mctrl_gpio wake_irq if device_may_wakeup when usart is suspended,
    and disable mctrl_gpios wake_irq if device_may_wakeup when usart is
    resumed.
    
    Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
    Link: https://lore.kernel.org/r/20220203171644.12231-3-erwan.leray@foss.st.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Erwan Le Ray authored and gregkh committed Feb 8, 2022
  7. serial: mctrl_gpio: add a new API to enable / disable wake_irq

    Add a new API to enable / disable wake_irq in order to enable gpio irqs as
    wakeup irqs for the uart port.
    
    Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
    Link: https://lore.kernel.org/r/20220203171644.12231-2-erwan.leray@foss.st.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Erwan Le Ray authored and gregkh committed Feb 8, 2022

Commits on Feb 4, 2022

  1. serial: core: Drop duplicate NULL check in uart_*shutdown()

    The free_page(addr), which becomes free_pages(addr, 0) checks addr
    against 0. No need to repeat this check in the callers.
    
    Acked-by: Jiri Slaby <jirislaby@kernel.org>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20220204152808.10808-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    andy-shev authored and gregkh committed Feb 4, 2022
  2. tty: Drop duplicate NULL check in TTY port functions

    The free_page(addr), which becomes free_pages(addr, 0) checks addr against 0.
    No need to repeat this check in the callers, i.e.  tty_port_free_xmit_buf()
    and tty_port_destructor().
    
    Note, INIT_KFIFO() is safe without that check, because it operates on
    a separate member and doesn't rely on the FIFO itself to be allocated.
    
    Acked-by: Jiri Slaby <jirislaby@kernel.org>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20220204153253.11006-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    andy-shev authored and gregkh committed Feb 4, 2022
  3. serial: core: Fix the definition name in the comment of UPF_* flags

    From day 1 the UPF_LAST_USER wasn't defined, a specific number of
    the last bit for userspace. Instead the code always relies on
    ASYNCB_LAST_USER. Fix comment accordingly.
    
    Fixes: 904326e ("tty,serial: Unify UPF_* and ASYNC_* flag definitions")
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20220203144521.16457-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    andy-shev authored and gregkh committed Feb 4, 2022
  4. amiserial: Drop duplicate NULL check in shutdown()

    The free_page(addr), which becomes free_pages(addr, 0) checks addr
    against 0. No need to repeat this check in the caller.
    
    Acked-by: Jiri Slaby <jirislaby@kernel.org>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20220202165655.5647-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    andy-shev authored and gregkh committed Feb 4, 2022
  5. dt-bindings: serial: samsung_uart: Document Exynos5433 compatible

    Document the Exynos5433 UART compatible, supported since commit
    31ec77a ("serial: samsung: Add the support for Exynos5433 SoC").
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
    Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Link: https://lore.kernel.org/r/20220202151310.285561-2-krzysztof.kozlowski@canonical.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    krzk authored and gregkh committed Feb 4, 2022

Commits on Jan 31, 2022

  1. dt-bindings: serial: Add compatible for Mediatek MT8186

    This commit adds dt-binding documentation of uart for Mediatek MT8186 SoC
    Platform.
    
    Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
    Link: https://lore.kernel.org/r/20220128062050.23978-3-allen-kh.cheng@mediatek.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    kuanhsuncheng authored and gregkh committed Jan 31, 2022
  2. serial: 8250_exar: derive nr_ports from PCI ID for Acces I/O cards

    In the similar way how it's done in 8250_pericom, derive the number of
    the UART ports from PCI ID for Acces I/O cards.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20220127180608.71509-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    andy-shev authored and gregkh committed Jan 31, 2022
  3. tty: Replace acpi_bus_get_device()

    Replace acpi_bus_get_device() that is going to be dropped with
    acpi_fetch_acpi_dev().
    
    No intentional functional impact.
    
    Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Link: https://lore.kernel.org/r/7355105.EvYhyI6sBW@kreacher
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    rafaeljw authored and gregkh committed Jan 31, 2022

Commits on Jan 30, 2022

  1. Merge tag 'v5.17-rc2' into tty-next

    We need the tty/serial fixes in here as well.
    
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    gregkh committed Jan 30, 2022
  2. Linux 5.17-rc2

    torvalds committed Jan 30, 2022
  3. Merge tag 'irq_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/s…

    …cm/linux/kernel/git/tip/tip
    
    Pull irq fixes from Borislav Petkov:
    
     - Drop an unused private data field in the AIC driver
    
     - Various fixes to the realtek-rtl driver
    
     - Make the GICv3 ITS driver compile again in !SMP configurations
    
     - Force reset of the GICv3 ITSs at probe time to avoid issues during kexec
    
     - Yet another kfree/bitmap_free conversion
    
     - Various DT updates (Renesas, SiFive)
    
    * tag 'irq_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples
      dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts
      dt-bindings: irqchip: renesas-irqc: Add R-Car V3U support
      irqchip/gic-v3-its: Reset each ITS's BASERn register before probe
      irqchip/gic-v3-its: Fix build for !SMP
      irqchip/loongson-pch-ms: Use bitmap_free() to free bitmap
      irqchip/realtek-rtl: Service all pending interrupts
      irqchip/realtek-rtl: Fix off-by-one in routing
      irqchip/realtek-rtl: Map control data to virq
      irqchip/apple-aic: Drop unused ipi_hwirq field
    torvalds committed Jan 30, 2022
  4. Merge tag 'perf_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/…

    …scm/linux/kernel/git/tip/tip
    
    Pull perf fixes from Borislav Petkov:
    
     - Prevent accesses to the per-CPU cgroup context list from another CPU
       except the one it belongs to, to avoid list corruption
    
     - Make sure parent events are always woken up to avoid indefinite hangs
       in the traced workload
    
    * tag 'perf_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      perf/core: Fix cgroup event list management
      perf: Always wake the parent event
    torvalds committed Jan 30, 2022
  5. Merge tag 'sched_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub…

    …/scm/linux/kernel/git/tip/tip
    
    Pull scheduler fix from Borislav Petkov:
     "Make sure the membarrier-rseq fence commands are part of the reported
      set when querying membarrier(2) commands through MEMBARRIER_CMD_QUERY"
    
    * tag 'sched_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      sched/membarrier: Fix membarrier-rseq fence command missing from query bitmask
    torvalds committed Jan 30, 2022
  6. Merge tag 'x86_urgent_for_v5.17_rc2' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/tip/tip
    
    Pull x86 fixes from Borislav Petkov:
    
     - Add another Intel CPU model to the list of CPUs supporting the
       processor inventory unique number
    
     - Allow writing to MCE thresholding sysfs files again - a previous
       change had accidentally disabled it and no one noticed. Goes to show
       how much is this stuff used
    
    * tag 'x86_urgent_for_v5.17_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      x86/cpu: Add Xeon Icelake-D to list of CPUs that support PPIN
      x86/MCE/AMD: Allow thresholding interface updates after init
    torvalds committed Jan 30, 2022
  7. Merge branch 'akpm' (patches from Andrew)

    Merge misc fixes from Andrew Morton:
     "12 patches.
    
      Subsystems affected by this patch series: sysctl, binfmt, ia64, mm
      (memory-failure, folios, kasan, and psi), selftests, and ocfs2"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
      ocfs2: fix a deadlock when commit trans
      jbd2: export jbd2_journal_[grab|put]_journal_head
      psi: fix "defined but not used" warnings when CONFIG_PROC_FS=n
      psi: fix "no previous prototype" warnings when CONFIG_CGROUPS=n
      mm, kasan: use compare-exchange operation to set KASAN page tag
      kasan: test: fix compatibility with FORTIFY_SOURCE
      tools/testing/scatterlist: add missing defines
      mm: page->mapping folio->mapping should have the same offset
      memory-failure: fetch compound_head after pgmap_pfn_valid()
      ia64: make IA64_MCA_RECOVERY bool instead of tristate
      binfmt_misc: fix crash when load/unload module
      include/linux/sysctl.h: fix register_sysctl_mount_point() return type
    torvalds committed Jan 30, 2022
  8. ocfs2: fix a deadlock when commit trans

    commit 6f1b228 introduces a regression which can deadlock as
    follows:
    
      Task1:                              Task2:
      jbd2_journal_commit_transaction     ocfs2_test_bg_bit_allocatable
      spin_lock(&jh->b_state_lock)        jbd_lock_bh_journal_head
      __jbd2_journal_remove_checkpoint    spin_lock(&jh->b_state_lock)
      jbd2_journal_put_journal_head
      jbd_lock_bh_journal_head
    
    Task1 and Task2 lock bh->b_state and jh->b_state_lock in different
    order, which finally result in a deadlock.
    
    So use jbd2_journal_[grab|put]_journal_head instead in
    ocfs2_test_bg_bit_allocatable() to fix it.
    
    Link: https://lkml.kernel.org/r/20220121071205.100648-3-joseph.qi@linux.alibaba.com
    Fixes: 6f1b228 ("ocfs2: fix race between searching chunks and release journal_head from buffer_head")
    Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Reported-by: Gautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
    Tested-by: Gautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
    Reported-by: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
    Cc: "Theodore Ts'o" <tytso@mit.edu>
    Cc: Andreas Dilger <adilger.kernel@dilger.ca>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Gang He <ghe@suse.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    josephhz authored and torvalds committed Jan 30, 2022
  9. jbd2: export jbd2_journal_[grab|put]_journal_head

    Patch series "ocfs2: fix a deadlock case".
    
    This fixes a deadlock case in ocfs2.  We firstly export jbd2 symbols
    jbd2_journal_[grab|put]_journal_head as preparation and later use them
    in ocfs2 insread of jbd_[lock|unlock]_bh_journal_head to fix the
    deadlock.
    
    This patch (of 2):
    
    This exports symbols jbd2_journal_[grab|put]_journal_head, which will be
    used outside modules, e.g.  ocfs2.
    
    Link: https://lkml.kernel.org/r/20220121071205.100648-2-joseph.qi@linux.alibaba.com
    Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Gang He <ghe@suse.com>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: Andreas Dilger <adilger.kernel@dilger.ca>
    Cc: Gautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
    Cc: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
    Cc: "Theodore Ts'o" <tytso@mit.edu>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    josephhz authored and torvalds committed Jan 30, 2022
  10. psi: fix "defined but not used" warnings when CONFIG_PROC_FS=n

    When CONFIG_PROC_FS is disabled psi code generates the following
    warnings:
    
      kernel/sched/psi.c:1364:30: warning: 'psi_cpu_proc_ops' defined but not used [-Wunused-const-variable=]
          1364 | static const struct proc_ops psi_cpu_proc_ops = {
               |                              ^~~~~~~~~~~~~~~~
      kernel/sched/psi.c:1355:30: warning: 'psi_memory_proc_ops' defined but not used [-Wunused-const-variable=]
          1355 | static const struct proc_ops psi_memory_proc_ops = {
               |                              ^~~~~~~~~~~~~~~~~~~
      kernel/sched/psi.c:1346:30: warning: 'psi_io_proc_ops' defined but not used [-Wunused-const-variable=]
          1346 | static const struct proc_ops psi_io_proc_ops = {
               |                              ^~~~~~~~~~~~~~~
    
    Make definitions of these structures and related functions conditional
    on CONFIG_PROC_FS config.
    
    Link: https://lkml.kernel.org/r/20220119223940.787748-3-surenb@google.com
    Fixes: 0e94682 ("psi: introduce psi monitor")
    Signed-off-by: Suren Baghdasaryan <surenb@google.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    surenbaghdasaryan authored and torvalds committed Jan 30, 2022
  11. psi: fix "no previous prototype" warnings when CONFIG_CGROUPS=n

    When CONFIG_CGROUPS is disabled psi code generates the following
    warnings:
    
      kernel/sched/psi.c:1112:21: warning: no previous prototype for 'psi_trigger_create' [-Wmissing-prototypes]
          1112 | struct psi_trigger *psi_trigger_create(struct psi_group *group,
               |                     ^~~~~~~~~~~~~~~~~~
      kernel/sched/psi.c:1182:6: warning: no previous prototype for 'psi_trigger_destroy' [-Wmissing-prototypes]
          1182 | void psi_trigger_destroy(struct psi_trigger *t)
               |      ^~~~~~~~~~~~~~~~~~~
      kernel/sched/psi.c:1249:10: warning: no previous prototype for 'psi_trigger_poll' [-Wmissing-prototypes]
          1249 | __poll_t psi_trigger_poll(void **trigger_ptr,
               |          ^~~~~~~~~~~~~~~~
    
    Change the declarations of these functions in the header to provide the
    prototypes even when they are unused.
    
    Link: https://lkml.kernel.org/r/20220119223940.787748-2-surenb@google.com
    Fixes: 0e94682 ("psi: introduce psi monitor")
    Signed-off-by: Suren Baghdasaryan <surenb@google.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    surenbaghdasaryan authored and torvalds committed Jan 30, 2022
  12. mm, kasan: use compare-exchange operation to set KASAN page tag

    It has been reported that the tag setting operation on newly-allocated
    pages can cause the page flags to be corrupted when performed
    concurrently with other flag updates as a result of the use of
    non-atomic operations.
    
    Fix the problem by using a compare-exchange loop to update the tag.
    
    Link: https://lkml.kernel.org/r/20220120020148.1632253-1-pcc@google.com
    Link: https://linux-review.googlesource.com/id/I456b24a2b9067d93968d43b4bb3351c0cec63101
    Fixes: 2813b9c ("kasan, mm, arm64: tag non slab memory allocated via pagealloc")
    Signed-off-by: Peter Collingbourne <pcc@google.com>
    Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    pcc authored and torvalds committed Jan 30, 2022
  13. kasan: test: fix compatibility with FORTIFY_SOURCE

    With CONFIG_FORTIFY_SOURCE enabled, string functions will also perform
    dynamic checks using __builtin_object_size(ptr), which when failed will
    panic the kernel.
    
    Because the KASAN test deliberately performs out-of-bounds operations,
    the kernel panics with FORTIFY_SOURCE, for example:
    
     | kernel BUG at lib/string_helpers.c:910!
     | invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
     | CPU: 1 PID: 137 Comm: kunit_try_catch Tainted: G    B             5.16.0-rc3+ #3
     | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
     | RIP: 0010:fortify_panic+0x19/0x1b
     | ...
     | Call Trace:
     |  kmalloc_oob_in_memset.cold+0x16/0x16
     |  ...
    
    Fix it by also hiding `ptr` from the optimizer, which will ensure that
    __builtin_object_size() does not return a valid size, preventing
    fortified string functions from panicking.
    
    Link: https://lkml.kernel.org/r/20220124160744.1244685-1-elver@google.com
    Signed-off-by: Marco Elver <elver@google.com>
    Reported-by: Nico Pache <npache@redhat.com>
    Reviewed-by: Nico Pache <npache@redhat.com>
    Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Brendan Higgins <brendanhiggins@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    melver authored and torvalds committed Jan 30, 2022
  14. tools/testing/scatterlist: add missing defines

    The cited commits replaced preemptible with pagefault_disabled and
    flush_kernel_dcache_page with flush_dcache_page respectively, hence need
    to update the corresponding defines in the test.
    
      scatterlist.c: In function ‘sg_miter_stop’:
      scatterlist.c:919:4: warning: implicit declaration of function ‘flush_dcache_page’ [-Wimplicit-function-declaration]
          flush_dcache_page(miter->page);
          ^~~~~~~~~~~~~~~~~
      In file included from linux/scatterlist.h:8:0,
                       from scatterlist.c:9:
      scatterlist.c:922:18: warning: implicit declaration of function ‘pagefault_disabled’ [-Wimplicit-function-declaration]
          WARN_ON_ONCE(!pagefault_disabled());
                        ^
      linux/mm.h:23:25: note: in definition of macro ‘WARN_ON_ONCE’
        int __ret_warn_on = !!(condition);                      \
                               ^~~~~~~~~
    
    Link: https://lkml.kernel.org/r/20220118082105.1737320-1-maorg@nvidia.com
    Fixes: 723aca2 ("mm/scatterlist: replace the !preemptible warning in sg_miter_stop()")
    Fixes: 0e84f5d ("scatterlist: replace flush_kernel_dcache_page with flush_dcache_page")
    Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
    Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    maorgottlieb authored and torvalds committed Jan 30, 2022
  15. mm: page->mapping folio->mapping should have the same offset

    As with the other members of folio, the offset of page->mapping and
    folio->mapping must be the same.  The compile-time check was
    inadvertently removed during development.  Add it back.
    
    [willy@infradead.org: changelog redo]
    
    Link: https://lkml.kernel.org/r/20220104011734.21714-1-richard.weiyang@gmail.com
    Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
    Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    RichardWeiYang authored and torvalds committed Jan 30, 2022
Older