Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-149879

[viostor] Limit num_cpus and max_cpus to MAX_CPU

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-10.3
    • None
    • virtio-win
    • None
    • rhel-virt-windows
    • 2
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Limits the maxmimum CPU count to the global macro constant `MAX_CPU`.

      The bot has identified potential out-of-bounds memory access on systems with > 256 CPUs as `ADAPTER_EXTENSION` members `vq` and `processing_srbs` are limited to MAX_CPU (which is 256) but the `num_queues` is not.

      This was previously managed by casting `num_cpus` to `num_queues` as USHORT. PR #1502 removes this cast and reimplements `num_queues` as ULONG.

      This PR proposes an alternate solution to limit the `num_queues` member by limiting the `num_cpus` and `max_cpus` variables to MAX_CPU. This seems the appropriate place to limit CPU counts.

              yvugenfi@redhat.com Yan Vugenfirer
              yvugenfi@redhat.com Yan Vugenfirer
              Virt Windows SST Bugs Virt Windows SST Bugs
              Xiaoling Gao Xiaoling Gao
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: