<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pci/switch, branch v4.14.85</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.85</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.85'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-09-19T20:43:37+00:00</updated>
<entry>
<title>switchtec: Fix Spectre v1 vulnerability</title>
<updated>2018-09-19T20:43:37+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-08-16T19:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0fad94cf10165084189bc160cc48f8004ea11ee8'/>
<id>urn:sha1:0fad94cf10165084189bc160cc48f8004ea11ee8</id>
<content type='text'>
commit 46feb6b495f7628a6dbf36c4e6d80faf378372d4 upstream.

p.port can is indirectly controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

  drivers/pci/switch/switchtec.c:912 ioctl_port_to_pff() warn: potential spectre issue 'pcfg-&gt;dsp_pff_inst_id' [r]

Fix this by sanitizing p.port before using it to index
pcfg-&gt;dsp_pff_inst_id

Notice that given that speculation windows are large, the policy is to kill
the speculation on the first load and not worry if it can be completed with
a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&amp;m=152449131114778&amp;w=2

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branch 'pci/switchtec' into next</title>
<updated>2017-07-02T23:51:10+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2017-07-02T23:51:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c781f85bc1958391e2d305fe6f52c90de0adb92e'/>
<id>urn:sha1:c781f85bc1958391e2d305fe6f52c90de0adb92e</id>
<content type='text'>
* pci/switchtec:
  switchtec: Add device IDs for additional Switchtec products
  switchtec: Add "running" status flag to fw partition info ioctl
</content>
</entry>
<entry>
<title>switchtec: Add device IDs for additional Switchtec products</title>
<updated>2017-06-27T23:25:06+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-06-15T20:12:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=393958d0d9ba2b9fd77e39ce764aa10b2e56b701'/>
<id>urn:sha1:393958d0d9ba2b9fd77e39ce764aa10b2e56b701</id>
<content type='text'>
The switchtec driver also supports the PAX, PFXL and PFXI products which
have the same management interface.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Kurt Schwemmer &lt;kurt.schwemmer@microsemi.com&gt;</content>
</entry>
<entry>
<title>switchtec: Add "running" status flag to fw partition info ioctl</title>
<updated>2017-06-27T23:23:14+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-06-15T20:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=079e3bc588465f6216bfc5ad61540b5db4616598'/>
<id>urn:sha1:079e3bc588465f6216bfc5ad61540b5db4616598</id>
<content type='text'>
This flag lets userspace know which firmware partitions are currently in
use as opposed to just active.  "Active" means they will be in use for the
next reboot, whereas "running" means they are currently in use.

If an old kernel is in use, or the firmware doesn't support these fields,
the new flag will not be set in the output.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Kurt Schwemmer &lt;kurt.schwemmer@microsemi.com&gt;</content>
</entry>
<entry>
<title>switchtec: Fix minor bug with partition ID register</title>
<updated>2017-05-22T21:52:30+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-05-22T21:52:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9871e9bb5cf6ff0b51457ca74c270c5c5230b224'/>
<id>urn:sha1:9871e9bb5cf6ff0b51457ca74c270c5c5230b224</id>
<content type='text'>
When a switch endpoint is configured without NTB, the mmio_ntb registers
will read all zeros.  However, in corner case configurations where the
partition ID is not zero and NTB is not enabled, the code will have the
wrong partition ID and this causes the driver to use the wrong set of
drivers.  To fix this we simply take the partition ID from the system info
region.

Reported-by: Dingbao Chen &lt;dingbao.chen@microsemi.com&gt;
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>switchtec: Use new cdev_device_add() helper function</title>
<updated>2017-05-22T21:52:24+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-05-22T21:52:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e40cf640b8f632091a30ef0b030c83546f07c902'/>
<id>urn:sha1:e40cf640b8f632091a30ef0b030c83546f07c902</id>
<content type='text'>
Convert from "cdev_add() + device_add()" to cdev_device_add(), and from
"device_del() + cdev_del()" to cdev_device_del().

[bhelgaas: changelog]
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>switchtec: Add IOCTLs to the Switchtec driver</title>
<updated>2017-04-12T17:23:37+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-03-02T23:24:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52eabba5bcdb2853dec6ef007ba427b092034738'/>
<id>urn:sha1:52eabba5bcdb2853dec6ef007ba427b092034738</id>
<content type='text'>
Add a couple of special IOCTLs to:

* Inform userspace of firmware partition locations
* Pass event counts and allow userspace to wait on events
* Translate PFF numbers used by the switch to port numbers

[Dan Carpenter &lt;dan.carpenter@oracle.com&gt;: fix off-by-one in
ioctl_event_ctl()]
Tested-by: Krishna Dhulipala &lt;krishnad@fb.com&gt;
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Stephen Bates &lt;stephen.bates@microsemi.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Wei Zhang &lt;wzhang@fb.com&gt;
Reviewed-by: Jens Axboe &lt;axboe@fb.com&gt;</content>
</entry>
<entry>
<title>switchtec: Add sysfs attributes to the Switchtec driver</title>
<updated>2017-04-12T17:23:37+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-03-02T23:24:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5d8e1881f431cf470170813eb048e6a384340904'/>
<id>urn:sha1:5d8e1881f431cf470170813eb048e6a384340904</id>
<content type='text'>
Add a few read-only sysfs attributes which provide some device information
that is exposed from the devices, primarily component and device names and
versions.

These are documented in Documentation/ABI/testing/sysfs-class-switchtec.

Tested-by: Krishna Dhulipala &lt;krishnad@fb.com&gt;
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Stephen Bates &lt;stephen.bates@microsemi.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Wei Zhang &lt;wzhang@fb.com&gt;
Reviewed-by: Jens Axboe &lt;axboe@fb.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;</content>
</entry>
<entry>
<title>MicroSemi Switchtec management interface driver</title>
<updated>2017-03-07T00:33:34+00:00</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-03-07T00:30:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=080b47def5e5e28b2509c5bb92160d1df730f27b'/>
<id>urn:sha1:080b47def5e5e28b2509c5bb92160d1df730f27b</id>
<content type='text'>
Microsemi's "Switchtec" line of PCI switch devices is already well
supported by the kernel with standard PCI switch drivers.  However, the
Switchtec device advertises a special management endpoint with a separate
PCI function address and class code.  This endpoint enables some additional
functionality which includes:

 * Packet and Byte Counters
 * Switch Firmware Upgrades
 * Event and Error logs
 * Querying port link status
 * Custom user firmware commands

Add a switchtec kernel module which provides PCI driver that exposes a char
device.  The char device provides userspace access to this interface
through read, write and (optionally) poll calls.

A userspace tool and library which utilizes this interface is available
at [1].  This tool takes inspiration (and borrows some code) from
nvme-cli [2].  The tool is largely complete at this time but additional
features may be added in the future.

[1] https://github.com/sbates130272/switchtec-user
[2] https://github.com/linux-nvme/nvme-cli

[Dan Carpenter &lt;dan.carpenter@oracle.com&gt;: don't invert error codes]
[Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;: fix
switchtec_dev_open() error handling]
Tested-by: Krishna Dhulipala &lt;krishnad@fb.com&gt;
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Stephen Bates &lt;stephen.bates@microsemi.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Wei Zhang &lt;wzhang@fb.com&gt;
Reviewed-by: Jens Axboe &lt;axboe@fb.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;</content>
</entry>
</feed>
