Re: [patch 07/11] x86/perf/uncore: Track packages not per cpu data

From: Thomas Gleixner
Date: Fri Feb 19 2016 - 03:41:23 EST


On Thu, 18 Feb 2016, Thomas Gleixner wrote:
> So there is a limitation to BIOS creativity and all we need is to maintain a
> logical package id.

Just for the record. This driver would fall apart today if the socket ids
would be > 7. The uncore extra PCI devs assume a fixed mapping between the
physid in their config space and the physid of the socket. If the pci config
space id would be > 8 then the storage space is exceeded.

#define UNCORE_SOCKET_MAX 8
struct pci_dev *uncore_extra_pci_dev[UNCORE_SOCKET_MAX][UNCORE_EXTRA_PCI_DEV_MAX];

Of course there is no range check for this either. uncore_pci_probe() sticks
it blindly into the array....

Thanks,

tglx