<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GHES/AEPI kernel panic when a network device is detected (on rare PCIe hardware)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90262">90262</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GHES/AEPI kernel panic when a network device is detected (on rare PCIe hardware)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jason.mcmullan@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=115490" name="attach_115490" title="systemd-stable/v208 udev net_id PCIe config read patch">attachment 115490</a> <a href="attachment.cgi?id=115490&action=edit" title="systemd-stable/v208 udev net_id PCIe config read patch">[details]</a></span>
systemd-stable/v208 udev net_id PCIe config read patch

Due to fread() buffering when fetching the PCIe config space, some
rare PCIe hardware will generate a PCIe Completion Timeout when
unknown PCIe config space values are read, causing a kernel panic
on Dell r720/r730 and other systems which have AEPI/GHES reporting
enabled in the Linux kernel and motherboard BIOS.

The original code in src/udev/udev-builtin-net_id.c used fread(),
which on some libc implementations (ie glibc 2.17) would pre-read
a full 4K (PAGE_SIZE) of the PCI config space, when only 64 bytes
were requested.

I have recently come across PCIe hardware which responds with
Completion Timeouts when accesses above 256 bytes are attempted.

This can cause server systems - such as the Dell r720/r730 - that
have GHES/AEPI support to cause an immediate kernel panic due to
the failed PCI transaction.

Attached are patches against systemd-stable/v208 (the version that
I originally found the issue in) and systemd/master (head of line)
which correct this issue by using read() instead of fread().</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>