<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/hwmon/occ/common.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/hwmon/occ/common.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/hwmon/occ/common.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2019-07-22T02:18:45Z</updated>
<entry>
<title>hwmon: (occ) Fix division by zero issue</title>
<updated>2019-07-22T02:18:45Z</updated>
<author>
<name>Lei YU</name>
<email>mine260309@gmail.com</email>
</author>
<published>2019-07-11T02:44:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=211186cae14de09573b062e478eb9fe215aed8d9'/>
<id>urn:sha1:211186cae14de09573b062e478eb9fe215aed8d9</id>
<content type='text'>
The code in occ_get_powr_avg() invokes div64_u64() without checking the
divisor. In case the divisor is zero, kernel gets an "Division by zero
in kernel" error.

Check the divisor and make it return 0 if the divisor is 0.

Fixes: c10e753d43eb ("hwmon (occ): Add sensor types and versions")
Signed-off-by: Lei YU &lt;mine260309@gmail.com&gt;
Reviewed-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/1562813088-23708-1-git-send-email-mine260309@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>Merge tag 'char-misc-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2019-07-11T22:34:05Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-11T22:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=97ff4ca46d3279134cec49752de8c5a62dc68460'/>
<id>urn:sha1:97ff4ca46d3279134cec49752de8c5a62dc68460</id>
<content type='text'>
Pull char / misc driver updates from Greg KH:
 "Here is the "large" pull request for char and misc and other assorted
  smaller driver subsystems for 5.3-rc1.

  It seems that this tree is becoming the funnel point of lots of
  smaller driver subsystems, which is fine for me, but that's why it is
  getting larger over time and does not just contain stuff under
  drivers/char/ and drivers/misc.

  Lots of small updates all over the place here from different driver
  subsystems:
   - habana driver updates
   - coresight driver updates
   - documentation file movements and updates
   - Android binder fixes and updates
   - extcon driver updates
   - google firmware driver updates
   - fsi driver updates
   - smaller misc and char driver updates
   - soundwire driver updates
   - nvmem driver updates
   - w1 driver fixes

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (188 commits)
  coresight: Do not default to CPU0 for missing CPU phandle
  dt-bindings: coresight: Change CPU phandle to required property
  ocxl: Allow contexts to be attached with a NULL mm
  fsi: sbefifo: Don't fail operations when in SBE IPL state
  coresight: tmc: Smatch: Fix potential NULL pointer dereference
  coresight: etm3x: Smatch: Fix potential NULL pointer dereference
  coresight: Potential uninitialized variable in probe()
  coresight: etb10: Do not call smp_processor_id from preemptible
  coresight: tmc-etf: Do not call smp_processor_id from preemptible
  coresight: tmc-etr: alloc_perf_buf: Do not call smp_processor_id from preemptible
  coresight: tmc-etr: Do not call smp_processor_id() from preemptible
  docs: misc-devices: convert files without extension to ReST
  fpga: dfl: fme: align PR buffer size per PR datawidth
  fpga: dfl: fme: remove copy_to_user() in ioctl for PR
  fpga: dfl-fme-mgr: fix FME_PR_INTFC_ID register address.
  intel_th: msu: Start read iterator from a non-empty window
  intel_th: msu: Split sgt array and pointer in multiwindow mode
  intel_th: msu: Support multipage blocks
  intel_th: pci: Add Ice Lake NNPI support
  intel_th: msu: Fix single mode with disabled IOMMU
  ...
</content>
</entry>
<entry>
<title>OCC: FSI and hwmon: Add sequence numbering</title>
<updated>2019-07-03T01:11:22Z</updated>
<author>
<name>Eddie James</name>
<email>eajames@linux.ibm.com</email>
</author>
<published>2019-07-02T15:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=afd26118f0dcf29db031a213f6f95c46ff3bdcbe'/>
<id>urn:sha1:afd26118f0dcf29db031a213f6f95c46ff3bdcbe</id>
<content type='text'>
Sequence numbering of the commands submitted to the OCC is required by
the OCC interface specification. Add sequence numbering and check for
the correct sequence number on the response.

Signed-off-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Lei YU &lt;mine260309@gmail.com&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>hwmon: (occ) Add temp sensor value check</title>
<updated>2019-06-24T01:33:01Z</updated>
<author>
<name>Alexander Soldatov</name>
<email>a.soldatov@yadro.com</email>
</author>
<published>2019-04-17T18:03:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8083034251f1e21271d3849feb0fd74380819f58'/>
<id>urn:sha1:8083034251f1e21271d3849feb0fd74380819f58</id>
<content type='text'>
The occ driver supports two formats for the temp sensor value.

The OCC firmware for P8 supports only the first format, for which
no range checking or error processing is performed in the driver.
Inspecting the OCC sources for P8 reveals that OCC may send
a special value 0xFFFF to indicate that a sensor read timeout
has occurred, see

https://github.com/open-power/occ/blob/master_p8/src/occ/cmdh/cmdh_fsp_cmds.c#L395

That situation wasn't handled in the driver. This patch adds invalid
temp value check for the sensor data format 1 and handles it the same
way as it is done for the format 2, where EREMOTEIO is reported for
this case.

Signed-off-by: Alexander Soldatov &lt;a.soldatov@yadro.com&gt;
Signed-off-by: Alexander Amelkin &lt;a.amelkin@yadro.com&gt;
Reviewed-by: Alexander Amelkin &lt;a.amelkin@yadro.com&gt;
Cc: Edward A. James &lt;eajames@us.ibm.com&gt;
Cc: Joel Stanley &lt;joel@jms.id.au&gt;
Reviewed-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (occ) Store error condition for rate-limited polls</title>
<updated>2019-04-16T22:12:13Z</updated>
<author>
<name>Eddie James</name>
<email>eajames@linux.ibm.com</email>
</author>
<published>2019-04-16T15:43:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b5c46a53ee6b1f97104883d93847b2b2fdddc289'/>
<id>urn:sha1:b5c46a53ee6b1f97104883d93847b2b2fdddc289</id>
<content type='text'>
The OCC driver limits the rate of sending poll commands to the OCC. If a
user reads a hwmon entry after a poll response resulted in an error and
is rate-limited, the error is invisible to the user. Fix this by storing
the last error and returning that in the rate-limited case.

Signed-off-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (occ) Move common code to a separate module</title>
<updated>2019-04-16T00:19:53Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2019-04-10T10:47:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5679ed99065372bc62c57a895950914e1c0fb9e0'/>
<id>urn:sha1:5679ed99065372bc62c57a895950914e1c0fb9e0</id>
<content type='text'>
Instead of duplicating the common code into the 2 (binary) drivers,
move the common code to a separate module. This is cleaner.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Eddie James &lt;eajames@linux.ibm.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Tested-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (occ) Fix power sensor indexing</title>
<updated>2019-03-29T16:51:44Z</updated>
<author>
<name>Eddie James</name>
<email>eajames@linux.ibm.com</email>
</author>
<published>2019-03-19T21:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8e6af454117a51dbf6c8a47c00180a0c235052fe'/>
<id>urn:sha1:8e6af454117a51dbf6c8a47c00180a0c235052fe</id>
<content type='text'>
In the case of power sensor version 0xA0, the sensor indexing overlapped
with the "caps" power sensors, resulting in probe failure and kernel
warnings. Fix this by specifying the next index for each power sensor
version.

Fixes: 54076cb3b5ff ("hwmon (occ): Add sensor attributes and register ...")
Cc: stable@vger.kernel.org
Signed-off-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Tested-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (occ) Fix license headers</title>
<updated>2019-02-18T22:23:29Z</updated>
<author>
<name>Eddie James</name>
<email>eajames@linux.ibm.com</email>
</author>
<published>2019-01-28T16:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e2f05d608653cb212edea136ad82107c6be56e1d'/>
<id>urn:sha1:e2f05d608653cb212edea136ad82107c6be56e1d</id>
<content type='text'>
Files have inconsistent license information.

Signed-off-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (occ) Fix potential integer overflow</title>
<updated>2019-01-08T05:03:59Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-01-07T18:34:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b0407d820b65272fcaa77e0dd1347dc7678d23b8'/>
<id>urn:sha1:b0407d820b65272fcaa77e0dd1347dc7678d23b8</id>
<content type='text'>
Cast get_unaligned_be32(...) to u64 in order to give the compiler
complete information about the proper arithmetic to use and avoid
a potential integer overflow.

Notice that such function call is used in contexts that expect
expressions of type u64 (64 bits, unsigned); and the following
expressions are currently being evaluated using 32-bit
arithmetic:

val = get_unaligned_be32(&amp;power-&gt;update_tag) *
                        occ-&gt;powr_sample_time_us;

val = get_unaligned_be32(&amp;power-&gt;vdn.update_tag) *
                        occ-&gt;powr_sample_time_us;

Addresses-Coverity-ID: 1442357 ("Unintentional integer overflow")
Addresses-Coverity-ID: 1442476 ("Unintentional integer overflow")
Addresses-Coverity-ID: 1442508 ("Unintentional integer overflow")
Fixes: ff692d80b2e2 ("hwmon (occ): Add sensor types and versions")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon (occ): Add sysfs attributes for additional OCC data</title>
<updated>2018-12-16T23:13:10Z</updated>
<author>
<name>Eddie James</name>
<email>eajames@linux.vnet.ibm.com</email>
</author>
<published>2018-11-08T21:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=df04ced684d48f6ec5729ccd034702952160c6b3'/>
<id>urn:sha1:df04ced684d48f6ec5729ccd034702952160c6b3</id>
<content type='text'>
The OCC provides a variety of additional information about the state of
the host processor, such as throttling, error conditions, and the number
of OCCs detected in the system. This information is essential to service
processor applications such as fan control and host management.
Therefore, export this data in the form of sysfs attributes attached to
the platform device (to which the hwmon device is also attached).

Signed-off-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
</feed>
