Commit Graph

1121394 Commits

Author SHA1 Message Date
Petr Oros 27e4be54a5 overflow: Add struct_size_t() helper
JIRA: https://issues.redhat.com/browse/RHEL-30138

Conflicts:
- removed chunk for drivers/scsi/hptiop.c due to missing c682df71996aee
  ("scsi: hptiop: Replace one-element array with flexible-array member")
  and 5b12a568cc6f69 ("scsi: hptiop: Use struct_size() helper in code
  related to struct hpt_iop_request_scsi_command"). The driver is disabled
  by config.

Upstream commit(s):
commit d67790ddf0219aa0ad3e13b53ae0a7619b3425a2
Author: Kees Cook <keescook@chromium.org>
Date:   Mon May 22 14:18:13 2023 -0700

    overflow: Add struct_size_t() helper

    While struct_size() is normally used in situations where the structure
    type already has a pointer instance, there are places where no variable
    is available. In the past, this has been worked around by using a typed
    NULL first argument, but this is a bit ugly. Add a helper to do this,
    and replace the handful of instances of the code pattern with it.

    Instances were found with this Coccinelle script:

    @struct_size_t@
    identifier STRUCT, MEMBER;
    expression COUNT;
    @@

    -       struct_size((struct STRUCT *)\(0\|NULL\),
    +       struct_size_t(struct STRUCT,
                    MEMBER, COUNT)

    Suggested-by: Christoph Hellwig <hch@infradead.org>
    Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
    Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Paolo Abeni <pabeni@redhat.com>
    Cc: James Smart <james.smart@broadcom.com>
    Cc: Keith Busch <kbusch@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Sagi Grimberg <sagi@grimberg.me>
    Cc: HighPoint Linux Team <linux@highpoint-tech.com>
    Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
    Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
    Cc: Kashyap Desai <kashyap.desai@broadcom.com>
    Cc: Sumit Saxena <sumit.saxena@broadcom.com>
    Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
    Cc: Don Brace <don.brace@microchip.com>
    Cc: "Darrick J. Wong" <djwong@kernel.org>
    Cc: Dave Chinner <dchinner@redhat.com>
    Cc: Guo Xuenan <guoxuenan@huawei.com>
    Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Cc: Daniel Latypov <dlatypov@google.com>
    Cc: kernel test robot <lkp@intel.com>
    Cc: intel-wired-lan@lists.osuosl.org
    Cc: netdev@vger.kernel.org
    Cc: linux-nvme@lists.infradead.org
    Cc: linux-scsi@vger.kernel.org
    Cc: megaraidlinux.pdl@broadcom.com
    Cc: storagedev@microchip.com
    Cc: linux-xfs@vger.kernel.org
    Cc: linux-hardening@vger.kernel.org
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
    Reviewed-by: Darrick J. Wong <djwong@kernel.org>
    Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Acked-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
    Link: https://lore.kernel.org/r/20230522211810.never.421-kees@kernel.org

Signed-off-by: Petr Oros <poros@redhat.com>
2024-03-26 21:44:33 +01:00
Scott Weaver e074fe3151 [redhat] kernel-5.14.0-433.el9
Signed-off-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 07:08:36 -04:00
Scott Weaver c93e956546 Merge: Pull up TI's devicetrees
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3740

JIRA: https://issues.redhat.com/browse/RHEL-25014

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>

Approved-by: Brian Masney <bmasney@redhat.com>
Approved-by: Mark Langsdorf <mlangsdo@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:15 -04:00
Scott Weaver 5a9267e650 Merge: Update userspace rtla and rv to the latest upstream
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3835

JIRA: https://issues.redhat.com/browse/RHEL-28660

85420b7f64 (HEAD -> RHEL-28660, jkacur/RHEL-28660) tools/rtla: Exit with EXIT_SUCCESS when help is invoked
ad4c76308b tools/rtla: Replace setting prio with nice for SCHED_OTHER
7142fca24c tools/rtla: Remove unused sched_getattr() function
cd94fc6cec tools/rtla: Fix clang warning about mount_point var size
34d1b82d52 tools/rtla: Fix uninitialized bucket/data->bucket_size warning
4d9a6266b0 tools/rtla: Fix Makefile compiler options for clang
91ad0d0363 tools/rv: Fix curr_reactor uninitialized variable
742659250f tools/rv: Fix Makefile compiler options for clang

Signed-off-by: John Kacur <jkacur@redhat.com>

Approved-by: John B. Wyatt IV <jwyatt@redhat.com>
Approved-by: Valentin Schneider <vschneid@redhat.com>
Approved-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:15 -04:00
Scott Weaver 21acdb01d1 Merge: netfs, fscache: Prevent Oops in fscache_put_cache()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3866

JIRA: https://issues.redhat.com/browse/RHEL-28890

CVE: CVE-2024-26612

Signed-off-by: Pavel Reichl <preichl@redhat.com>

Approved-by: Carlos Maiolino <cmaiolino@redhat.com>
Approved-by: John B. Wyatt IV <jwyatt@redhat.com>
Approved-by: Andrey Albershteyn <aalbersh@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:15 -04:00
Scott Weaver 753c04d7ad Merge: bnx2fc: Remove spin_lock_bh while release resources after upload.
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3893

JIRA: https://issues.redhat.com/browse/RHEL-9662
Upstream Status: RHEL only

The session resource are used by FW and driver when session is
offloaded, once session is uploaded these resources are not used.
The lock is not required as these fields won't be used any longer.

Signed-off-by: John Meneghini <jmeneghi@redhat.com>

Approved-by: Chris Leech <cleech@redhat.com>
Approved-by: Jerry Snitselaar <jsnitsel@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:15 -04:00
Scott Weaver a084b0e0ec Merge: [redhat] self-test: shellcheck: ignore rhdocs
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3891

JIRA: INTERNAL
Upstream Status: RHEL only

The documentation project has introduced a shell script that does not pass
the kernel shellcheck. Because this is a separate project, let's ignore
any scripts in the rhdocs subtree.

Signed-off-by: Scott Weaver <scweaver@redhat.com>

Approved-by: Jarod Wilson <jarod@redhat.com>
Approved-by: Herton R. Krzesinski <herton@redhat.com>
Approved-by: Jan Stancek <jstancek@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:14 -04:00
Scott Weaver f02195f593 Merge: ice: lighter locking for PTP time reading
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3855

JIRA: https://issues.redhat.com/browse/RHEL-19000
Upstream Status: Posted https://lore.kernel.org/netdev/20240307222510.53654-1-mschmidt@redhat.com/

This series removes the use of the heavy-weight PTP hardware semaphore in the gettimex64 path. Instead, serialization of access to the time
register is done using a host-side spinlock. The timer hardware is shared between PFs on the PCI adapter, so the spinlock must be shared between ice_pf instances too.

In practice, it gets rid of the frequent "PTP failed to get time" error messages that certain customers are seeing.

Although the series is not yet merged upstream, it has received favorable reviews from Intel developers. There are still some suggestions for minor improvements, but implementing them will not change the solution materially. The series targets net-next, which is closed at the moment, so I am blocked from posting an update to netdev right now. At the same time, the issue has a high impact for customers. We need to deliver the fix soon. Once the final version gets accepted by upstream, I will follow up by backporting the remaining differences and referencing the final commit IDs.

Tested:
 - I tested it myself using the additional test code that's referenced from patch 2/3 in the series.
 - A scratch build of the patchset backported to 9.2.z was tested by the reporting customer and by QE. In both cases it was confirmed that the PTP error messages went away. Obviously, because the code that prints the error message is removed by the patches. It's still good to know that the customer did not report any bad side effects.
 - It was tested by the Intel validation team and they did not find any issues with it. (Information relayed to me by Tony Nguyen.)
 - The CKI artifact (both plain & RT) has been tested by QE.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>

Approved-by: Petr Oros <poros@redhat.com>
Approved-by: Kamal Heib <kheib@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:14 -04:00
Scott Weaver 7d664a712b Merge: Disable evm on overlayfs
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3885

JIRA: https://issues.redhat.com/browse/RHEL-29566

This MR backported the patches to disable evm on overlayfs.

Signed-off-by: Coiby Xu <coxu@redhat.com>

Approved-by: Vladis Dronov <vdronov@redhat.com>
Approved-by: Jerry Snitselaar <jsnitsel@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:14 -04:00
Scott Weaver fee1e1d125 Merge: mm/mglru: fix underprotected page cache
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3850

Include the following fixes for mglru to prevent kdump from hanging on certain systems.
```
4376807bf2d5 mm/mglru: reclaim offlined memcgs harder
8aa420617918 mm/mglru: respect min_ttl_ms with memcgs
5095a2b23987 mm/mglru: try to stop at high watermarks
081488051d28 mm/mglru: fix underprotected page cache
```

`mm/mglru: skip special VMAs in lru_gen_look_around():`
- Skipping special VMAs like VM_PFNMAP to avoid unnecessary lookaround operations.

`mm/mglru: reclaim offlined memcgs harder:`
- Improving the pressure on offlined memcgs to reduce zombie memcgs.
- Addressing memory-constrained system issues by better handling offlined memcgs.

`mm/mglru: try to stop at high watermarks:`
- Adjusting reclaim behavior to stop at high watermarks, improving efficiency.
- Preventing kswapd from overshooting on large systems.

`mm/mglru: fix underprotected page cache:`
- Fixing underprotection of unmapped folios accessed through file descriptors.
- Adjusting folio placement in LRU to improve response to refault surges.

`mm: multi-gen LRU: reuse some legacy trace events:`
- Reusing legacy trace events for debugging in the multi-gen LRU subsystem.

`mm: multi-gen LRU: improve design doc:`
- Updating the design documentation with additional sections for clarity.

`mm: multi-gen LRU: clean up sysfs code:`
- Cleaning up the sysfs code for the multi-gen LRU subsystem for better readability and maintainability.

JIRA: https://issues.redhat.com/browse/RHEL-28667

Signed-off-by: Nico Pache <npache@redhat.com>

Approved-by: Aristeu Rozanski <arozansk@redhat.com>
Approved-by: Waiman Long <longman@redhat.com>
Approved-by: Donald Dutile <ddutile@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:13 -04:00
Scott Weaver 5d56071d82 Merge: printk: allow disabling printk per-console device kthreads at boot
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3868

JIRA: https://issues.redhat.com/browse/RHEL-17709
Upstream Status: RHEL only

Create the 'printk_no_perconsole_kthreads' boot parameter, allowing one to disable the
per-console device printk kthreads, which are enabled by default.

Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>

Approved-by: Derek Barbosa <debarbos@redhat.com>
Approved-by: Eder Zulian <ezulian@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:13 -04:00
Scott Weaver e72b4c02f8 Merge: Update IOMMU table for kdump over SR-IOV
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3872

Description: Update IOMMU table for kdump over SR-IOV

JIRA: https://issues.redhat.com/browse/RHEL-25055

Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=59745172

Tested: Verified Brew build test kernel RPMs and confirmed issue is resovled

Signed-off-by: Mamatha Inamdar <minamdar@redhat.com>

commit 09a3c1e46142199adcee372a420b024b4fc61051
Author: Gaurav Batra <gbatra@linux.vnet.ibm.com>
Date:   Thu Jan 25 14:30:17 2024 -0600

    powerpc/pseries/iommu: IOMMU table is not initialized for kdump over SR-IOV

    When kdump kernel tries to copy dump data over SR-IOV, LPAR panics due
    to NULL pointer exception:

      Kernel attempted to read user page (0) - exploit attempt? (uid: 0)
      BUG: Kernel NULL pointer dereference on read at 0x00000000
      Faulting instruction address: 0xc000000020847ad4
      Oops: Kernel access of bad area, sig: 11 [#1]
      LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
      Modules linked in: mlx5_core(+) vmx_crypto pseries_wdt papr_scm libnvdimm mlxfw tls psample sunrpc fuse overlay squashfs loop
      CPU: 12 PID: 315 Comm: systemd-udevd Not tainted 6.4.0-Test102+ #12
      Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_008) hv:phyp pSeries
      NIP:  c000000020847ad4 LR: c00000002083b2dc CTR: 00000000006cd18c
      REGS: c000000029162ca0 TRAP: 0300   Not tainted  (6.4.0-Test102+)
      MSR:  800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE>  CR: 48288244  XER: 00000008
      CFAR: c00000002083b2d8 DAR: 0000000000000000 DSISR: 40000000 IRQMASK: 1
      ...
      NIP _find_next_zero_bit+0x24/0x110
      LR  bitmap_find_next_zero_area_off+0x5c/0xe0
      Call Trace:
        dev_printk_emit+0x38/0x48 (unreliable)
        iommu_area_alloc+0xc4/0x180
        iommu_range_alloc+0x1e8/0x580
        iommu_alloc+0x60/0x130
        iommu_alloc_coherent+0x158/0x2b0
        dma_iommu_alloc_coherent+0x3c/0x50
        dma_alloc_attrs+0x170/0x1f0
        mlx5_cmd_init+0xc0/0x760 [mlx5_core]
        mlx5_function_setup+0xf0/0x510 [mlx5_core]
        mlx5_init_one+0x84/0x210 [mlx5_core]
        probe_one+0x118/0x2c0 [mlx5_core]
        local_pci_probe+0x68/0x110
        pci_call_probe+0x68/0x200
        pci_device_probe+0xbc/0x1a0
        really_probe+0x104/0x540
        __driver_probe_device+0xb4/0x230
        driver_probe_device+0x54/0x130
        __driver_attach+0x158/0x2b0
        bus_for_each_dev+0xa8/0x130
        driver_attach+0x34/0x50
        bus_add_driver+0x16c/0x300
        driver_register+0xa4/0x1b0
        __pci_register_driver+0x68/0x80
        mlx5_init+0xb8/0x100 [mlx5_core]
        do_one_initcall+0x60/0x300
        do_init_module+0x7c/0x2b0

    At the time of LPAR dump, before kexec hands over control to kdump
    kernel, DDWs (Dynamic DMA Windows) are scanned and added to the FDT.
    For the SR-IOV case, default DMA window "ibm,dma-window" is removed from
    the FDT and DDW added, for the device.

    Now, kexec hands over control to the kdump kernel.

    When the kdump kernel initializes, PCI busses are scanned and IOMMU
    group/tables created, in pci_dma_bus_setup_pSeriesLP(). For the SR-IOV
    case, there is no "ibm,dma-window". The original commit: b1fc44eaa9ba,
    fixes the path where memory is pre-mapped (direct mapped) to the DDW.
    When TCEs are direct mapped, there is no need to initialize IOMMU
    tables.

    iommu_table_setparms_lpar() only considers "ibm,dma-window" property
    when initiallizing IOMMU table. In the scenario where TCEs are
    dynamically allocated for SR-IOV, newly created IOMMU table is not
    initialized. Later, when the device driver tries to enter TCEs for the
    SR-IOV device, NULL pointer execption is thrown from iommu_area_alloc().

    The fix is to initialize the IOMMU table with DDW property stored in the
    FDT. There are 2 points to remember:

            1. For the dedicated adapter, kdump kernel would encounter both
               default and DDW in FDT. In this case, DDW property is used to
               initialize the IOMMU table.

            2. A DDW could be direct or dynamic mapped. kdump kernel would
               initialize IOMMU table and mark the existing DDW as
               "dynamic". This works fine since, at the time of table
               initialization, iommu_table_clear() makes some space in the
               DDW, for some predefined number of TCEs which are needed for
               kdump to succeed.

    Fixes: b1fc44eaa9ba ("pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window")
    Signed-off-by: Gaurav Batra <gbatra@linux.vnet.ibm.com>
    Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://msgid.link/20240125203017.61014-1-gbatra@linux.ibm.com

Signed-off-by: Mamatha Inamdar <minamdar@redhat.com>

Approved-by: Steve Best <sbest@redhat.com>
Approved-by: Tony Camuso <tcamuso@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:56:13 -04:00
Scott Weaver 2aba712cf4 Merge: Draft: Merge tag 'kernel-5.14.0-427.6.1.el9_4' from 9.4
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3905

Merge-up changes from kernel-5.14.0-427.6.1.el9_4

Conflicts:
  - Makefile.rhelver changes dropped
  - redhat/self-test changes dropped

Signed-off-by: Scott Weaver <scweaver@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-25 06:50:11 -04:00
Scott Weaver e58c2ef639 Merge tag 'kernel-5.14.0-427.6.1.el9_4' from 9.4
kernel-5.14.0-427.6.1.el9_4

Conflicts:
  - Makefile.rhelver changes dropped
  - redhat/self-test changes dropped

Signed-off-by: Scott Weaver <scweaver@redhat.com>
2024-03-22 10:04:03 -04:00
Scott Weaver c4c31c8e2d [redhat] kernel-5.14.0-427.6.1.el9_4
Signed-off-by: Scott Weaver <scweaver@redhat.com>
2024-03-21 11:58:14 -04:00
Scott Weaver 9da8f518f6 Merge commit '89703f4bb31f5e159836548c47b418b3b6bb8182' into 9.4 2024-03-21 11:45:56 -04:00
Scott Weaver 6d6b5ed937 Merge: IB/hfi1: Fix sdma.h tx->num_descs off-by-one error
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/1350

JIRA: https://issues.redhat.com/browse/RHEL-26063
Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=e6f57c688191

This MR is on behalf of https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3768 which did not get merged. We've got a blocker exception for 9.4 now. The commit is the same.

Signed-off-by: Daniel Vacek <neelx@redhat.com>

Approved-by: Michal Schmidt <mschmidt@redhat.com>
Approved-by: Kamal Heib <kheib@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-21 11:45:29 -04:00
Scott Weaver 19c1cc9352 Merge: ASoC: Intel: soc-acpi: rt713+rt1316, no sdw-dmic config
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/1348

Add support for new Dell hardware.

JIRA: https://issues.redhat.com/browse/RHEL-26456

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>

Approved-by: John B. Wyatt IV <jwyatt@redhat.com>
Approved-by: Tony Camuso <tcamuso@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-21 11:45:28 -04:00
Scott Weaver c9d0c20300 Merge: x86: hyperv: two more patches for netsvc hyperv driver
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/1403

This pull request contains two more patches for hyperv netsvc
driver that were recently accepted upstream

JIRA: https://issues.redhat.com/browse/RHEL-26435

Tested: smoke tested on a hyperv machine.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>

Approved-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Approved-by: John B. Wyatt IV <jwyatt@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-21 11:45:28 -04:00
Scott Weaver 11808da72f Merge: CVE-2024-26586 kernel: mlxsw: spectrum_acl_tcam: Fix stack corruption
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/1396

JIRA: https://issues.redhat.com/browse/RHEL-26463
CVE: CVE-2024-26586

Commits:
```
483ae90d8f97 ("mlxsw: spectrum_acl_tcam: Fix stack corruption")
```

Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Closes RHEL-26463

Approved-by: Michal Schmidt <mschmidt@redhat.com>
Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-21 11:45:28 -04:00
Scott Weaver 4df81f5174 Merge: [redhat] self-test: shellcheck: ignore rhdocs
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/1416

JIRA: INTERNAL
Upstream Status: RHEL only

The documentation project has introduced a shell script that does not pass
the kernel shellcheck. Because this is a separate project, let's ignore
any scripts in the rhdocs subtree.

Signed-off-by: Scott Weaver <scweaver@redhat.com>

Approved-by: Herton R. Krzesinski <herton@redhat.com>
Approved-by: Jan Stancek <jstancek@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-20 23:29:56 -04:00
Scott Weaver 3f8f53d5c3 [redhat] self-test: shellcheck: ignore rhdocs
JIRA: INTERNAL
Upstream Status: RHEL only

The documentation project has introduced a shell script that does not pass
the kernel shellcheck. Because this is a separate project, let's ignore
any scripts in the rhdocs subtree.

Signed-off-by: Scott Weaver <scweaver@redhat.com>
2024-03-20 14:37:30 -04:00
Scott Weaver adc804877f [redhat] self-test: shellcheck: ignore rhdocs
JIRA: INTERNAL
Upstream Status: RHEL only

The documentation project has introduced a shell script that does not pass
the kernel shellcheck. Because this is a separate project, let's ignore
any scripts in the rhdocs subtree.

Signed-off-by: Scott Weaver <scweaver@redhat.com>
2024-03-20 14:25:17 -04:00
John Meneghini bd05f855b1 bnx2fc: Remove spin_lock_bh while release resources after upload.
JIRA: https://issues.redhat.com/browse/RHEL-9662
Upstream Status: RHEL only

The session resource are used by FW and driver when session is
offloaded, once session is uploaded these resources are not used.
The lock is not required as these fields won't be used any longer.

Signed-off-by: John Meneghini <jmeneghi@redhat.com>
2024-03-20 14:02:33 -04:00
Lucas Zampieri 71ca90a70a [redhat] kernel-5.14.0-432.el9
Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:40:45 -03:00
Lucas Zampieri eb1e149c36 Merge commit '89703f4bb31f5e159836548c47b418b3b6bb8182' 2024-03-20 13:38:34 -03:00
Lucas Zampieri f0b3dc825d Merge: debugobjects: Don't wake up kswapd from fill_pool()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3710

JIRA: https://issues.redhat.com/browse/RHEL-24120
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3710

Commit eb799279fb1f ("debugobjects: Don't wake up kswapd from
fill_pool()") and commit 3b11edf1f239 ("mm/page_alloc: don't wake kswapd
from rmqueue() unless __GFP_KSWAPD_RECLAIM is specified") should fix
the lockdep circular locking problem reported in the Jira issue. Commit
8b64d420fe24 ("debugobjects: Recheck debug_objects_enabled before
reporting") is also included to avoid another potential debugojbects
problem.

Signed-off-by: Waiman Long <longman@redhat.com>

Approved-by: Rafael Aquini <aquini@redhat.com>
Approved-by: Herton R. Krzesinski <herton@redhat.com>
Approved-by: Wander Lairson Costa <wander@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:08 -03:00
Lucas Zampieri a450a566f2 Merge: RHEL-9 backport for siw on tun devices
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3192

JIRA: https://issues.redhat.com/browse/RHEL-12457
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=56093782
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>

Approved-by: Jeffrey Layton <jlayton@redhat.com>
Approved-by: Paulo Alcantara <paalcant@redhat.com>
Approved-by: Scott Mayhew <smayhew@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:08 -03:00
Lucas Zampieri 850ba71f47 Merge: redhat: Enable -Werror for aarch64
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3825

JIRA: https://issues.redhat.com/browse/RHEL-29316
Upstream Status: RHEL only

There are no warnings today with GCC11. So enable -Werror from now on to
catch future regressions.

Signed-off-by: Eric Chanudet <echanude@redhat.com>

Approved-by: Lucas Karpinski <lkarpins@redhat.com>
Approved-by: Andrew Halaney <ahalaney@redhat.com>
Approved-by: Brian Masney <bmasney@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:07 -03:00
Lucas Zampieri f8f29aaef9 Merge: redhat: redhat/Makefile: include the subtrees merge script in the makefiles
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3793

Upstream Status: RHEL-only

JIRA: INTERNAL

Include the subtrees merge script as a makefile target to encourage a
per-build update of the subtree (or as necessary).

Signed-off-by: Derek Barbosa <debarbos@redhat.com>

Approved-by: Lucas Zampieri <lzampier@redhat.com>
Approved-by: Jan Stancek <jstancek@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:07 -03:00
Lucas Zampieri 0c25eae9a2 Merge: crypto: dh - implement FIPS PCT and a panic on a failure
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3870

```
JIRA: https://issues.redhat.com/browse/RHEL-25845
Upstream Status: merged into the linux.git

Adjust DH algorithm implementation for FIPS certification
requirements. Add a pair-wise consistency test (PCT) per
SP800-56Arev3, 5.6.2.1.4. Add a panic on a failed test.
Add a boot-time test for the ffdhe2048(dh) template.

Signed-off-by: Vladis Dronov <vdronov@redhat.com>
```

Approved-by: Clemens Lang <cllang@redhat.com>
Approved-by: Herbert Xu <zxu@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:07 -03:00
Lucas Zampieri 773f254143 Merge: tools/resolve_btfids: Fix cross-compilation to non-host endianness
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3818

JIRA: https://issues.redhat.com/browse/RHEL-16042

The `.BTF_ids` section of vmlinux is pre-filled with zeroed BTF ID entries during the build and afterwards patched by resolve_btfids with correct values. Since resolve_btfids always writes in host-native endianness, it relies on libelf to do the translation when the target ELF is cross-compiled to a different endianness.

Unfortunately, the translation will corrupt the flags fields of SET8 entries because these were written during vmlinux compilation and are in the correct endianness already. This will lead to numerous BPF selftests failures.

The issue mainly affects CKI-compiled s390x (big-endian) kernels as these are cross-compiled on little-endian machines.

This MR backports upstream patches which resolve the problem.

Signed-off-by: Viktor Malik <vmalik@redhat.com>

Approved-by: Artem Savkov <asavkov@redhat.com>
Approved-by: Jerome Marchand <jmarchan@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:06 -03:00
Lucas Zampieri e59c994877 Merge: powerpc/mm: Fix null-pointer dereference in pgtable_cache_add
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3876

Description: powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

JIRA: https://issues.redhat.com/browse/RHEL-29120
CVE: CVE-2023-52607

Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=59823723

Tested: Verified Brew build test kernel RPMs and confirmed issue is resovled

Signed-off-by: Mamatha Inamdar <minamdar@redhat.com>

powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

commit f46c8a75263f97bda13c739ba1c90aced0d3b071
Author: Kunwu Chan <chentao@kylinos.cn>
Date:   Mon Dec 4 10:32:23 2023 +0800

    powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

    kasprintf() returns a pointer to dynamically allocated memory
    which can be NULL upon failure. Ensure the allocation was successful
    by checking the pointer validity.

    Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://msgid.link/20231204023223.2447523-1-chentao@kylinos.cn

Signed-off-by: Mamatha Inamdar <minamdar@redhat.com>

Approved-by: Steve Best <sbest@redhat.com>
Approved-by: Nico Pache <npache@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:06 -03:00
Lucas Zampieri 3af224226d Merge: gfs2: Fix invalid metadata access in punch_hole
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3842

JIRA: https://issues.redhat.com/browse/RHEL-28241

Signed-off-by: Andrew Price <anprice@redhat.com>

Approved-by: Andreas Gruenbacher <agruenba@redhat.com>
Approved-by: Abhi Das <adas@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:05 -03:00
Lucas Zampieri bec9addfa0 Merge: i2c: Fix a potential use after free
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3808

JIRA: https://issues.redhat.com/browse/RHEL-26851
CVE: CVE-2019-25162

commit e4c72c06c367758a14f227c847f9d623f1994ecf
Author: Xu Wang <vulab@iscas.ac.cn>
Date:   Fri Dec 27 09:34:32 2019 +0000

    i2c: Fix a potential use after free

    Free the adap structure only after we are done using it.
    This patch just moves the put_device() down a bit to avoid the
    use after free.

    Fixes: 611e12ea0f ("i2c: core: manage i2c bus device refcount in i2c_[get|put]_adapter")
    Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
    [wsa: added comment to the code, added Fixes tag]
    Signed-off-by: Wolfram Sang <wsa@kernel.org>

Signed-off-by: David Arcari <darcari@redhat.com>

Approved-by: Tony Camuso <tcamuso@redhat.com>
Approved-by: Steve Best <sbest@redhat.com>
Approved-by: Prarit Bhargava <prarit@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:38:05 -03:00
Lucas Zampieri 350c7e19c0 Merge: Draft: Merge tag 'kernel-5.14.0-427.5.1.el9_4' from 9.4
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3888

Merge-up changes from kernel-5.14.0-427.5.1.el9_4

Conflicts:
  - Makefile.rhelver changes dropped
  - redhat/rhdocs/ changes dropped
  - redhat/kabi/ changes dropped
  - redhat/kernel.spec.template changes dropped

Signed-off-by: Scott Weaver <scweaver@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-03-20 13:37:56 -03:00
Scott Weaver 6b97f49408 Merge tag 'kernel-5.14.0-427.5.1.el9_4' from 9.4
kernel-5.14.0-427.5.1.el9_4

Conflicts:

    Makefile.rhelver changes dropped
    redhat/rhdocs/ changes dropped
    redhat/kabi/ changes dropped
    redhat/kernel.spec.template changes dropped

Signed-off-by: Scott Weaver <scweaver@redhat.com>
2024-03-20 11:10:05 -04:00
Jiri Benc 89703f4bb3 Merge branch 'regexes' into 'main'
yaml2RHMAINTAINERS: fix includeRegexes being ignored

Closes #5

See merge request redhat/centos-stream/src/kernel/documentation!652
2024-03-20 12:37:38 +00:00
Coiby Xu 43ccfb3008 overlay: disable EVM
JIRA: https://issues.redhat.com/browse/RHEL-29566

Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Conflict: RHEL misses commit 2bc5e5e8167f ("ovl: rely on SB_I_NOUMASK").

commit c00f94b3a5be428837868c0f2cdaa3fa5b4b1995
Author: Mimi Zohar <zohar@linux.ibm.com>
Date:   Tue Dec 19 10:11:25 2023 -0500

    overlay: disable EVM

    Until a complete solution is developed, update 'sb->s_iflags' to
    disable EVM.

    Acked-by: Amir Goldstein <amir73il@gmail.com>
    Reviewed-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-03-20 16:13:21 +08:00
Coiby Xu 385c00dcab evm: add support to disable EVM on unsupported filesystems
JIRA: https://issues.redhat.com/browse/RHEL-29566

Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

commit cd708c938f055c9eb5a366ec1c8edcefa28afc28
Author: Mimi Zohar <zohar@linux.ibm.com>
Date:   Mon Dec 18 08:06:40 2023 -0500

    evm: add support to disable EVM on unsupported filesystems

    Identify EVM unsupported filesystems by defining a new flag
    SB_I_EVM_UNSUPPORTED.

    Don't verify, write, remove or update 'security.evm' on unsupported
    filesystems.

    Acked-by: Amir Goldstein <amir73il@gmail.com>
    Reviewed-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-03-20 16:13:21 +08:00
Coiby Xu 67e2fcb2f3 evm: don't copy up 'security.evm' xattr
JIRA: https://issues.redhat.com/browse/RHEL-29566

Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Conflict: RHEL misses 39f60c1ccee7 ("fs: port xattr to mnt_idmap").

commit 40ca4ee3136d2d09977d1cab8c0c0e1582c3359d
Author: Mimi Zohar <zohar@linux.ibm.com>
Date:   Tue Dec 12 06:12:43 2023 -0500

    evm: don't copy up 'security.evm' xattr

    The security.evm HMAC and the original file signatures contain
    filesystem specific data.  As a result, the HMAC and signature
    are not the same on the stacked and backing filesystems.

    Don't copy up 'security.evm'.

    Reviewed-by: Amir Goldstein <amir73il@gmail.com>
    Reviewed-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2024-03-20 16:13:20 +08:00
Scott Weaver 79dbb81500 [redhat] kernel-5.14.0-427.5.1.el9_4
Signed-off-by: Scott Weaver <scweaver@redhat.com>
2024-03-19 16:36:08 -04:00
Scott Weaver 81c01c37c9 Merge commit 'e78d2f2e6c813a03ed0af8e9670e80a2c4316d0f' into 9.4 2024-03-19 16:10:46 -04:00
Scott Weaver 5b5a1c077e Merge: i2c: i801: Fix block process call transactions
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/1356

JIRA: https://issues.redhat.com/browse/RHEL-26479
CVE: CVE-2024-26593

Signed-off-by: David Arcari <darcari@redhat.com>

Approved-by: Steve Best <sbest@redhat.com>
Approved-by: Tony Camuso <tcamuso@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-19 16:09:43 -04:00
Scott Weaver 0d0807dcca Merge: [redhat] kabi: add symbols to stablelist
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/1384

JIRA: https://issues.redhat.com/browse/RHEL-27862

Upstream Status: RHEL only

Symbol checksums taken from 5.14.0-427.2.1.el9_4.

Based on review conducted on https://dell-kbuilder-01.lab.eng.rdu2.redhat.com/graph/rhel-9.4.0/. All symbols not explcitly NACKed were added onto the list per RHEL 9 kABI policy.

Signed-off-by: Čestmír Kalina <ckalina@redhat.com>

Approved-by: Eder Zulian <ezulian@redhat.com>
Approved-by: Scott Weaver <scweaver@redhat.com>
Approved-by: Michael Petlan <mpetlan@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-19 16:09:43 -04:00
Scott Weaver 79ce8f9d2b Merge: sched/membarrier: reduce the ability to hammer on sys_membarrier
MR: https://gitlab.com/redhat/prdsc/rhel/src/kernel-private/rhel-9/-/merge_requests/37

JIRA: https://issues.redhat.com/browse/RHEL-23428

CVE: CVE-2024-26602

commit 944d5fe50f3f03daacfea16300e656a1691c4a23

Author: Linus Torvalds <torvalds@linuxfoundation.org>

Date:   Sun Feb 4 15:25:12 2024 +0000

    sched/membarrier: reduce the ability to hammer on sys_membarrier

    On some systems, sys_membarrier can be very expensive, causing overall
    slowdowns for everything.  So put a lock on the path in order to
    serialize the accesses to prevent the ability for this to be called at
    too high of a frequency and saturate the machine.

    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-and-tested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Acked-by: Borislav Petkov <bp@alien8.de>
    Fixes: 22e4ebb975 ("membarrier: Provide expedited private command")
    Fixes: c5f58bd58f ("membarrier: Provide GLOBAL_EXPEDITED command")
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: Wander Lairson Costa <wander@redhat.com>

Approved-by: Andrew Halaney <ahalaney@redhat.com>
Approved-by: Phil Auld <pauld@redhat.com>
Approved-by: Juri Lelli <juri.lelli@redhat.com>
Approved-by: Valentin Schneider <vschneid@redhat.com>
Approved-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Approved-by: John B. Wyatt IV <jwyatt@redhat.com>
Approved-by: Bruno Meneguele <bmeneg@redhat.com>

Merged-by: Scott Weaver <scweaver@redhat.com>
2024-03-19 15:45:16 -04:00
Jiri Benc c8e43a0aa1 yaml2RHMAINTAINERS: fix includeRegexes being ignored
The yaml.v2 documentations states: "Struct fields are only unmarshalled
if they are exported (have an upper case first letter), and are
unmarshalled using the field name lowercased as the default key."

For our "IncludeRegexes" field, the means the key being looked for is
"includeregexes", not "includeRegexes".

Do not rely on automatic field name but specify it explicitly. And do
that to all fields for consistency.

Resolves: #5
Signed-off-by: Jiri Benc <jbenc@redhat.com>
2024-03-19 18:34:23 +01:00
Jiri Benc e78d2f2e6c Merge branch 'detect-wrong-files' into 'main'
Delete mistakenly committed binary and prevent this from happening

See merge request redhat/centos-stream/src/kernel/documentation!651
2024-03-19 17:30:14 +00:00
Jiri Benc 07c9947503 checks: enforce owners.yaml commits do not modify anything else
Recently, a file under scripts/ was committed by mistake. Ensure this
does not happen again.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
2024-03-19 17:59:04 +01:00
Jiri Benc 508b7bc6f9 checks: improve parsing of changed files
Instead of repeatedly executing git diff, store the changed files in an
array. This is faster and will allow us to do more checks.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
2024-03-19 17:42:13 +01:00