<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pinctrl/samsung, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-06-20T08:24:21Z</updated>
<entry>
<title>pinctrl: samsung: Save/restore eint_mask over suspend for EINT_TYPE GPIOs</title>
<updated>2020-06-20T08:24:21Z</updated>
<author>
<name>Jonathan Bakker</name>
</author>
<published>2020-04-25T23:10:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c346341a3dc5a6d5ee0174605d664976e4097393'/>
<id>urn:sha1:c346341a3dc5a6d5ee0174605d664976e4097393</id>
<content type='text'>
commit f354157a7d184db430c1a564c506434e33b1bec5 upstream.

Currently, for EINT_TYPE GPIOs, the CON and FLTCON registers
are saved and restored over a suspend/resume cycle.  However, the
EINT_MASK registers are not.

On S5PV210 at the very least, these registers are not retained over
suspend, leading to the interrupts remaining masked upon resume and
therefore no interrupts being triggered for the device.  There should
be no effect on any SoCs that do retain these registers as theoretically
we would just be re-writing what was already there.

Fixes: 7ccbc60cd9c2 ("pinctrl: exynos: Handle suspend/resume of GPIO EINT registers")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Bakker &lt;xc-racer2@live.ca&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pinctrl: samsung: Fix device node refcount leaks in S3C64xx wakeup controller init</title>
<updated>2019-12-21T09:42:15Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2019-08-05T16:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af9b59cb7013b888d005714a7ea4d21b7485939e'/>
<id>urn:sha1:af9b59cb7013b888d005714a7ea4d21b7485939e</id>
<content type='text'>
[ Upstream commit 7f028caadf6c37580d0f59c6c094ed09afc04062 ]

In s3c64xx_eint_eint0_init() the for_each_child_of_node() loop is used
with a break to find a matching child node.  Although each iteration of
for_each_child_of_node puts the previous node, but early exit from loop
misses it.  This leads to leak of device node.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 61dd72613177 ("pinctrl: Add pinctrl-s3c64xx driver")
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: samsung: Fix device node refcount leaks in init code</title>
<updated>2019-12-21T09:42:06Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2019-08-05T16:27:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be2dcc73cbaa05ed5aa883705f07528d29945b1c'/>
<id>urn:sha1:be2dcc73cbaa05ed5aa883705f07528d29945b1c</id>
<content type='text'>
commit a322b3377f4bac32aa25fb1acb9e7afbbbbd0137 upstream.

Several functions use for_each_child_of_node() loop with a break to find
a matching child node.  Although each iteration of
for_each_child_of_node puts the previous node, but early exit from loop
misses it.  This leads to leak of device node.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 9a2c1c3b91aa ("pinctrl: samsung: Allow grouping multiple pinmux/pinconf nodes")
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init</title>
<updated>2019-12-21T09:42:06Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2019-08-05T16:27:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f728c19edd9164e726b9f2bc4fb1347d2f5eee45'/>
<id>urn:sha1:f728c19edd9164e726b9f2bc4fb1347d2f5eee45</id>
<content type='text'>
commit 6fbbcb050802d6ea109f387e961b1dbcc3a80c96 upstream.

In s3c24xx_eint_init() the for_each_child_of_node() loop is used with a
break to find a matching child node.  Although each iteration of
for_each_child_of_node puts the previous node, but early exit from loop
misses it.  This leads to leak of device node.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: af99a7507469 ("pinctrl: Add pinctrl-s3c24xx driver")
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pinctrl: samsung: Remove bogus irq_[un]mask from resource management</title>
<updated>2017-08-16T20:43:23Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2017-06-29T21:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8cbc0b49ca8db1f83835f86d337195947632aa3f'/>
<id>urn:sha1:8cbc0b49ca8db1f83835f86d337195947632aa3f</id>
<content type='text'>
commit 3fa53ec2ed885b0aec3f0472e3b4a8a6f1cd748c upstream.

The irq chip callbacks irq_request/release_resources() have absolutely no
business with masking and unmasking the irq.

The core code unmasks the interrupt after complete setup and masks it
before invoking irq_release_resources().

The unmask is actually harmful as it happens before the interrupt is
completely initialized in __setup_irq().

Remove it.

Fixes: f6a8249f9e55 ("pinctrl: exynos: Lock GPIOs as interrupts when used as EINTs")
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Cc: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Kukjin Kim &lt;kgene@kernel.org&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Acked-by: Tomasz Figa &lt;tomasz.figa@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branch 'fixes' into devel</title>
<updated>2016-09-23T15:41:40Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2016-09-23T15:41:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d0a0ac0abcdba5b5d52726055c95f1f6234e85e'/>
<id>urn:sha1:8d0a0ac0abcdba5b5d52726055c95f1f6234e85e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>pinctrl: samsung: Remove an always false dev-&gt;of_node test</title>
<updated>2016-09-12T13:45:16Z</updated>
<author>
<name>Sylwester Nawrocki</name>
</author>
<published>2016-09-01T11:59:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b09eed7f811de64f1352634baa48ca8aecddac51'/>
<id>urn:sha1:b09eed7f811de64f1352634baa48ca8aecddac51</id>
<content type='text'>
samsung_pinctrl_probe() can be called only after matching
the driver by the compatible string so this already implies
a non null dev-&gt;of_node.  Remove the always false test
and related error trace. While at it drop another error log
in case of memory allocation failure - any errors are logged
by the memory subsystem.

Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: exynos: remove duplicate calls in irq handler</title>
<updated>2016-08-22T12:06:29Z</updated>
<author>
<name>perr perr</name>
</author>
<published>2016-08-16T10:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=26fecf0b21d17d17ba98fd64e8ac5a5c87ffb0d5'/>
<id>urn:sha1:26fecf0b21d17d17ba98fd64e8ac5a5c87ffb0d5</id>
<content type='text'>
Because chained_irq_enter() has already called chip-&gt;irq_mask() and
chip-&gt;irq_ack(), also chained_irq_exit() will call chip-&gt;irq_unmask(),
so it's not necessary to call chip-&gt;irq_*() here.

Signed-off-by: Perr Zhang &lt;strongbox8@zoho.com&gt;
Acked-by: Tomasz Figa &lt;tomasz.figa@gmail.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
[Hand-edited from whitespace damaged patch]
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: samsung: Suppress unbinding to prevent theoretical attacks</title>
<updated>2016-05-30T07:41:49Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2016-05-17T06:02:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0ee2ac039c012062d91fbb324c3068c089a9380'/>
<id>urn:sha1:a0ee2ac039c012062d91fbb324c3068c089a9380</id>
<content type='text'>
Although unbinding a pinctrl driver requires root privileges but it
still might be used theoretically in certain attacks (by triggering NULL
pointer exception or memory corruption).

Samsung pincontrol drivers are essential for system operation so their
removal is not expected. They do not implement remove() driver callback
and they are not buildable as modules.

Suppression of the unbinding will prevent triggering NULL pointer
exception like this (Odroid XU3):

  $ echo 13400000.pinctrl &gt; /sys/bus/platform/drivers/samsung-pinctrl/unbind
  $ cat /sys/kernel/debug/gpio

  Unable to handle kernel NULL pointer dereference at virtual address 00000c44
  pgd = ec41c000
  [00000c44] *pgd=6d448835, *pte=00000000, *ppte=00000000
  Internal error: Oops: 17 [#1] PREEMPT SMP ARM
    (samsung_gpio_get) from [&lt;c034f9a0&gt;] (gpiolib_seq_show+0x1b0/0x26c)
    (gpiolib_seq_show) from [&lt;c01fb8c0&gt;] (seq_read+0x304/0x4b8)
    (seq_read) from [&lt;c02dbc78&gt;] (full_proxy_read+0x4c/0x64)
    (full_proxy_read) from [&lt;c01d9fb0&gt;] (__vfs_read+0x2c/0x110)
    (__vfs_read) from [&lt;c01db400&gt;] (vfs_read+0x8c/0x110)
    (vfs_read) from [&lt;c01db4c4&gt;] (SyS_read+0x40/0x8c)
    (SyS_read) from [&lt;c01078c0&gt;] (ret_fast_syscall+0x0/0x3c)

Suggested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: exynos5440: Use off-stack memory for pinctrl_gpio_range</title>
<updated>2016-04-26T13:52:46Z</updated>
<author>
<name>Andrew Jeffery</name>
</author>
<published>2016-04-20T01:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71324fdc72ef0163e57631aa814a9a81e9e4770b'/>
<id>urn:sha1:71324fdc72ef0163e57631aa814a9a81e9e4770b</id>
<content type='text'>
The range is registered into a linked list which can be referenced
throughout the lifetime of the driver. Ensure the range's memory is useful
for the same lifetime by adding it to the driver's private data structure.

The bug was introduced in the driver's initial commit, which was present in
v3.10.

Fixes: f0b9a7e521fa ("pinctrl: exynos5440: add pinctrl driver for Samsung EXYNOS5440 SoC")
Cc: stable@vger.kernel.org
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Acked-by: Tomasz Figa &lt;tomasz.figa@gmail.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
