<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/base/regmap/regmap.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-05-30T06:17:44Z</updated>
<entry>
<title>regmap: Correct comparison in regmap_cached</title>
<updated>2018-05-30T06:17:44Z</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2018-02-12T18:15:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=27781e285b9a42f0cfed7aedaf17173d17048659'/>
<id>urn:sha1:27781e285b9a42f0cfed7aedaf17173d17048659</id>
<content type='text'>
[ Upstream commit 71df179363a5a733a8932e9afb869760d7559383 ]

The cache pointer points to the actual memory used by the cache, as the
comparison here is looking for the type of the cache it should check
against cache_type.

Fixes: 1ea975cf1ef5 ("regmap: Add a function to check if a regmap register is cached")
Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>regmap: Fix reversed bounds check in regmap_raw_write()</title>
<updated>2018-04-24T07:42:52Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-02-08T07:23:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=320c85dcdc350cfa1f9dc743c956afe91519973c'/>
<id>urn:sha1:320c85dcdc350cfa1f9dc743c956afe91519973c</id>
<content type='text'>
commit f00e71091ab92eba52122332586c6ecaa9cd1a56 upstream.

We're supposed to be checking that "val_len" is not too large but
instead we check if it is smaller than the max.

The only function affected would be regmap_i2c_smbus_i2c_write() in
drivers/base/regmap/regmap-i2c.c.  Strangely that function has its own
limit check which returns an error if (count &gt;= I2C_SMBUS_BLOCK_MAX) so
it doesn't look like it has ever been able to do anything except return
an error.

Fixes: c335931ed9d2 ("regmap: Add raw_write/read checks for max_raw_write/read sizes")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'regmap/topic/soundwire' and 'regmap/topic/zero' into regmap-next</title>
<updated>2018-01-12T20:04:01Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-01-12T20:04:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a75de77211842a7e120ce95ad156e4b3704dcde7'/>
<id>urn:sha1:a75de77211842a7e120ce95ad156e4b3704dcde7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'regmap/topic/const', 'regmap/topic/flat', 'regmap/topic/hwspinlock' and 'regmap/topic/nolock' into regmap-next</title>
<updated>2018-01-12T20:03:57Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-01-12T20:03:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=757b65285f366cb8d410333b03a502aab0c3689a'/>
<id>urn:sha1:757b65285f366cb8d410333b03a502aab0c3689a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regmap: Allow empty read/write_flag_mask</title>
<updated>2018-01-08T12:15:04Z</updated>
<author>
<name>Andrew F. Davis</name>
<email>afd@ti.com</email>
</author>
<published>2018-01-07T23:19:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9bf485c955bcb707a5e679bcc74075deb0bc8531'/>
<id>urn:sha1:9bf485c955bcb707a5e679bcc74075deb0bc8531</id>
<content type='text'>
All zero read and write masks in the regmap config are used to signal no
special mask is needed and the bus defaults are used. In some devices
all zero read/write masks are the special mask and bus defaults should
not be used. To signal this a new variable is added.

For example SPI often sets bit 7 in address to signal to the device a
read is requested. On TI AFE44xx parts with SPI interfaces no bit
needs to be set as registers are either read or write only and the
operation can be determined from the address only. For this case both
masks must be zero to not effect the address.

Signed-off-by: Andrew F. Davis &lt;afd@ti.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Add one flag to indicate if a hwlock should be used</title>
<updated>2017-12-27T10:37:03Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2017-12-25T06:37:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a4887813c3a9481ab87c8a71ab1de50b975cc823'/>
<id>urn:sha1:a4887813c3a9481ab87c8a71ab1de50b975cc823</id>
<content type='text'>
Since the hwlock id 0 is valid for hardware spinlock core, but now id 0
is treated as one invalid value for regmap. Thus we should add one extra
flag for regmap config to indicate if a hardware spinlock should be used,
then id 0 can be valid for regmap to request.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: use proper part of work_buf for storing val</title>
<updated>2017-12-19T10:55:40Z</updated>
<author>
<name>Krzysztof Adamski</name>
<email>krzysztof.adamski@nokia.com</email>
</author>
<published>2017-11-30T14:09:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4c90f297ffcffb84e8667e4f447aeaba52a37220'/>
<id>urn:sha1:4c90f297ffcffb84e8667e4f447aeaba52a37220</id>
<content type='text'>
The map-&gt;work_buf is a buffer preallocated in __regmap_init() with size
allowing it to store all 3 parts of a buffer - reg, pad and val. While
reg and val parts are always properly setup before each transaction, the
pad part is left at its default value (zeros). Until it is overwritten,
that is.

_regmap_bus_read(), when calling _regmap_raw_read() uses beginning of
work_buf as a place to store data read. Usually that is fine but if
val_bits &gt; reg_bits &amp;&amp; pad_bits &gt; 0, padding area of work_buf() may get
overwritten. Since padding is not zeroed before each transaction,
garbage will be used on next calls.

This patch moves the val pointer used for _regmap_raw_read() to point
to a part of work_buf intended for storing value read.

Signed-off-by: Krzysztof Adamski &lt;krzysztof.adamski@nokia.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: potentially duplicate the name string stored in regmap</title>
<updated>2017-12-13T16:46:45Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>brgl@bgdev.pl</email>
</author>
<published>2017-12-13T16:25:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8253bb3f82554cedb830a4cb65c84796df129c81'/>
<id>urn:sha1:8253bb3f82554cedb830a4cb65c84796df129c81</id>
<content type='text'>
Currently we just copy over the pointer passed to regmap_init() in
the regmap config struct. To be on the safe side: duplicate the string
with kstrdup_const() so that if an unaware user passes an address to
a stack-allocated buffer, we won't crash.

Signed-off-by: Bartosz Golaszewski &lt;brgl@bgdev.pl&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branches 'topic/hwspinlock' and 'topic/nolock' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-const</title>
<updated>2017-12-13T16:46:37Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2017-12-13T16:46:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4045559c099998642e35d1444251c3bf042c7a4f'/>
<id>urn:sha1:4045559c099998642e35d1444251c3bf042c7a4f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regmap: Disable debugfs when locking is disabled</title>
<updated>2017-12-13T16:22:31Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2017-12-12T16:56:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=72465736adf2aade263a9475a1d42007fd49e703'/>
<id>urn:sha1:72465736adf2aade263a9475a1d42007fd49e703</id>
<content type='text'>
The recently added support for disabling the regmap internal locking left
debugfs enabled for devices with the locking disabled. This is a problem
since debugfs allows userspace to do things like initiate reads from the
hardware which will use the scratch buffers protected by the regmap locking
so could cause data corruption.

For safety address this by just disabling debugfs for these devices. That
is overly conservative since some of the debugfs files just read internal
data structures but it's much simpler to implmement and less likely to
lead to problems with tooling that works with debugfs.

Reported-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
