Commit Graph

650120 Commits

Author SHA1 Message Date
Kevin Kim
25a4db262e ODROID-COMMON: adjust sound card dai link for spdif_out.
hw:0,0 -> tdmc <-> internal DAC
hw:0,1 -> spdif_b <-> hdmitx
hw:0,2 -> spdif_a <-> spdif_out(GPIOA_11)

Change-Id: I2d31ec832d6cb82e2363977cbcbc5bc96fa3f993
2018-12-11 11:46:24 +09:00
Joy Cho
895b49d2e8 ODROID-N2: dts: adjust default cpu opp table
Change-Id: I42ed48f07936c6bb92416a666cb472d7da144c81
2018-12-05 09:49:32 +09:00
Kevin Kim
728ebe1676 Merge "ODROID-COMMON:Add /dev/gpiomem device for rootless user GPIO access" into odroidn2-4.9.y 2018-12-04 17:53:10 +09:00
Kevin Kim
a2b457f348 Merge "ODROID-COMMON:Add device information to /proc/cpuinfo" into odroidn2-4.9.y 2018-12-04 17:53:05 +09:00
Joy Cho
696cceea12 ODROID-N2: defconfig: add a new defconfig to support SPI bios
Change-Id: If94100b9640b9c8dd2b85d5d4ae68051a78031ea
Signed-off-by: Joy Cho <joy.cho@hardkernel.com>
2018-12-03 19:17:08 +09:00
Kevin Kim
0e2895f90d ODROID-COMMON:Add /dev/gpiomem device for rootless user GPIO access
Change-Id: I559e9155294144372d64a8b79044ea53318c4e0a
2018-11-30 11:53:49 +09:00
Kevin Kim
5f114f6c3c ODROID-COMMON:Add device information to /proc/cpuinfo
Change-Id: I1148522b11733bfa05a1f74ecb756cf78a0b4fe4
2018-11-30 10:56:04 +09:00
Mauro (mdrjr) Ribeiro
32b1292ddf ODROID-N2: Prepare defconfig for release 2018-11-29 10:29:36 +09:00
Mauro (mdrjr) Ribeiro
30d81f2f16 Merge tag 'v4.9.141' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidn2-4.9.y
This is the 4.9.141 stable release
2018-11-28 19:12:02 +09:00
Mauro (mdrjr) Ribeiro
054c344c54 Merge tag 'v4.9.140' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidn2-4.9.y
This is the 4.9.140 stable release
2018-11-28 19:11:53 +09:00
Mauro (mdrjr) Ribeiro
a688083ead Merge tag 'v4.9.139' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidn2-4.9.y
This is the 4.9.139 stable release
2018-11-28 19:11:32 +09:00
Mauro (mdrjr) Ribeiro
901d3e0e46 Merge tag 'v4.9.138' into odroidn2-4.9.y
This is the 4.9.138 stable release
2018-11-28 18:58:44 +09:00
Mauro (mdrjr) Ribeiro
a0b7895085 Merge tag 'v4.9.137' into odroidn2-4.9.y
This is the 4.9.137 stable release
2018-11-28 18:58:41 +09:00
Mauro (mdrjr) Ribeiro
b880273097 Merge tag 'v4.9.136' into odroidn2-4.9.y
This is the 4.9.136 stable release
2018-11-28 18:58:37 +09:00
Mauro (mdrjr) Ribeiro
c3aacd513b Merge tag 'v4.9.135' into odroidn2-4.9.y
This is the 4.9.135 stable release
2018-11-28 18:58:28 +09:00
Mauro (mdrjr) Ribeiro
1de3a94f7e Merge tag 'v4.9.134' into odroidn2-4.9.y
This is the 4.9.134 stable release
2018-11-28 18:50:36 +09:00
Mauro (mdrjr) Ribeiro
41af7ed3af Merge tag 'v4.9.133' into odroidn2-4.9.y
This is the 4.9.133 stable release
2018-11-28 18:46:05 +09:00
Mauro (mdrjr) Ribeiro
c4fc01bd1e Merge tag 'v4.9.132' into odroidn2-4.9.y
This is the 4.9.132 stable release
2018-11-28 18:41:25 +09:00
Mauro (mdrjr) Ribeiro
7754a78a54 Merge tag 'v4.9.131' into odroidn2-4.9.y
This is the 4.9.131 stable release
2018-11-28 18:41:20 +09:00
Mauro (mdrjr) Ribeiro
57b18be828 Merge tag 'v4.9.130' into odroidn2-4.9.y
This is the 4.9.130 stable release
2018-11-28 18:36:06 +09:00
Mauro (mdrjr) Ribeiro
cee80e1274 Merge tag 'v4.9.129' into odroidn2-4.9.y
This is the 4.9.129 stable release
2018-11-28 18:36:03 +09:00
Mauro (mdrjr) Ribeiro
2e93c47314 Merge tag 'v4.9.128' into odroidn2-4.9.y
This is the 4.9.128 stable release
2018-11-28 18:35:53 +09:00
Mauro (mdrjr) Ribeiro
878b8da2f5 Merge tag 'v4.9.127' into odroidn2-4.9.y
This is the 4.9.127 stable release
2018-11-28 18:25:24 +09:00
Mauro (mdrjr) Ribeiro
a01138426b Merge tag 'v4.9.126' into odroidn2-4.9.y
This is the 4.9.126 stable release
2018-11-28 18:24:27 +09:00
Mauro (mdrjr) Ribeiro
2b7d1a14b6 Merge tag 'v4.9.125' into odroidn2-4.9.y
This is the 4.9.125 stable release
2018-11-28 18:23:41 +09:00
Mauro (mdrjr) Ribeiro
c916134ba9 Merge tag 'v4.9.124' into odroidn2-4.9.y
This is the 4.9.124 stable release
2018-11-28 18:17:51 +09:00
Mauro (mdrjr) Ribeiro
8337485c77 Merge tag 'v4.9.123' into odroidn2-4.9.y
This is the 4.9.123 stable release
2018-11-28 18:17:34 +09:00
Mauro (mdrjr) Ribeiro
48842c21a0 Merge tag 'v4.9.122' into odroidn2-4.9.y
This is the 4.9.122 stable release
2018-11-28 18:17:31 +09:00
Mauro (mdrjr) Ribeiro
06ee7820ac Merge tag 'v4.9.121' into odroidn2-4.9.y
This is the 4.9.121 stable release
2018-11-28 18:17:28 +09:00
Mauro (mdrjr) Ribeiro
23d9d494a9 Merge tag 'v4.9.120' into odroidn2-4.9.y
This is the 4.9.120 stable release
2018-11-28 18:17:19 +09:00
Mauro (mdrjr) Ribeiro
dd6cbaa890 Merge tag 'v4.9.119' into odroidn2-4.9.y
This is the 4.9.119 stable release
2018-11-28 17:58:03 +09:00
Mauro (mdrjr) Ribeiro
402a63a3ad Merge tag 'v4.9.118' into odroidn2-4.9.y
This is the 4.9.118 stable release
2018-11-28 17:57:46 +09:00
Mauro (mdrjr) Ribeiro
2e4823bd03 Merge tag 'v4.9.117' into odroidn2-4.9.y
This is the 4.9.117 stable release
2018-11-28 17:41:55 +09:00
Mauro (mdrjr) Ribeiro
014f83d329 Merge tag 'v4.9.116' into odroidn2-4.9.y
This is the 4.9.116 stable release
2018-11-28 17:41:01 +09:00
Mauro (mdrjr) Ribeiro
08b3f99cfe Merge tag 'v4.9.115' into odroidn2-4.9.y
This is the 4.9.115 stable release
2018-11-28 17:40:58 +09:00
Mauro (mdrjr) Ribeiro
e9ea4f397d Merge tag 'v4.9.114' into odroidn2-4.9.y
This is the 4.9.114 stable release
2018-11-28 17:40:47 +09:00
Mauro (mdrjr) Ribeiro
e53c00d7c1 ODROID-COMMON: Support for Wifi Modules
Change-Id: Id44c28078722efb0cbda44f8ccb5b953572235ce
2018-11-28 17:24:17 +09:00
Mauro (mdrjr) Ribeiro
1619ed75a5 ODROID: fix amlogic driver build on GCC 7 2018-11-28 17:09:36 +09:00
Mauro (mdrjr) Ribeiro
fd9428c31f ODROID-COMMON: lock gpu frequency to its maximum
Change-Id: Ic967f79a1bff001336a5e41a2bc644d5108ecb6a
2018-11-28 16:51:50 +09:00
Mauro (mdrjr) Ribeiro
5ef121eb61 ODROID-COMMON: slipstream Amlogic drivers
Change-Id: I96b0ed0cce029e85a12c1a04327f106b68ba7f43
2018-11-28 16:51:37 +09:00
Mauro (mdrjr) Ribeiro
f64e727448 osd/fb: set default color format for Linux
Change-Id: I1d95d63215d5567673380740528eff65562bc6df
2018-11-28 16:42:21 +09:00
Mauro (mdrjr) Ribeiro
8c7979c905 ODROID: fix build on GCC 7 2018-11-28 16:36:12 +09:00
Mauro (mdrjr) Ribeiro
2017ef2b5a ODROID-N2: slipstream Mali Dvalin Kernel Driver 2018-11-28 16:16:46 +09:00
Greg Kroah-Hartman
bb2d990b6f Linux 4.9.141 2018-11-27 16:09:42 +01:00
Ilya Dryomov
c3ec4e5bda libceph: fall back to sendmsg for slab pages
commit 7e241f647d upstream.

skb_can_coalesce() allows coalescing neighboring slab objects into
a single frag:

  return page == skb_frag_page(frag) &&
         off == frag->page_offset + skb_frag_size(frag);

ceph_tcp_sendpage() can be handed slab pages.  One example of this is
XFS: it passes down sector sized slab objects for its metadata I/O.  If
the kernel client is co-located on the OSD node, the skb may go through
loopback and pop on the receive side with the exact same set of frags.
When tcp_recvmsg() attempts to copy out such a frag, hardened usercopy
complains because the size exceeds the object's allocated size:

  usercopy: kernel memory exposure attempt detected from ffff9ba917f20a00 (kmalloc-512) (1024 bytes)

Although skb_can_coalesce() could be taught to return false if the
resulting frag would cross a slab object boundary, we already have
a fallback for non-refcounted pages.  Utilize it for slab pages too.

Cc: stable@vger.kernel.org # 4.8+
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:42 +01:00
Eric Biggers
ab26f7fd57 HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges
commit 8c01db7619 upstream.

When a UHID_CREATE command is written to the uhid char device, a
copy_from_user() is done from a user pointer embedded in the command.
When the address limit is KERNEL_DS, e.g. as is the case during
sys_sendfile(), this can read from kernel memory.  Alternatively,
information can be leaked from a setuid binary that is tricked to write
to the file descriptor.  Therefore, forbid UHID_CREATE in these cases.

No other commands in uhid_char_write() are affected by this bug and
UHID_CREATE is marked as "obsolete", so apply the restriction to
UHID_CREATE only rather than to uhid_char_write() entirely.

Thanks to Dmitry Vyukov for adding uhid definitions to syzkaller and to
Jann Horn for commit 9da3f2b740 ("x86/fault: BUG() when uaccess
helpers fault on kernel addresses"), allowing this bug to be found.

Reported-by: syzbot+72473edc9bf4eb1c6556@syzkaller.appspotmail.com
Fixes: d365c6cfd3 ("HID: uhid: add UHID_CREATE and UHID_DESTROY events")
Cc: <stable@vger.kernel.org> # v3.6+
Cc: Jann Horn <jannh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Jann Horn <jannh@google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:42 +01:00
Al Viro
2cf6ba5b3d new helper: uaccess_kernel()
commit db68ce10c4 upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[only take the include/linux/uaccess.h portion - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
Hans de Goede
ea41e45381 ACPI / platform: Add SMB0001 HID to forbidden_id_list
commit 2bbb5fa374 upstream.

Many HP AMD based laptops contain an SMB0001 device like this:

Device (SMBD)
{
    Name (_HID, "SMB0001")  // _HID: Hardware ID
    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
    {
        IO (Decode16,
            0x0B20,             // Range Minimum
            0x0B20,             // Range Maximum
            0x20,               // Alignment
            0x20,               // Length
            )
        IRQ (Level, ActiveLow, Shared, )
            {7}
    })
}

The legacy style IRQ resource here causes acpi_dev_get_irqresource() to
be called with legacy=true and this message to show in dmesg:
ACPI: IRQ 7 override to edge, high

This causes issues when later on the AMD0030 GPIO device gets enumerated:

Device (GPIO)
{
    Name (_HID, "AMDI0030")  // _HID: Hardware ID
    Name (_CID, "AMDI0030")  // _CID: Compatible ID
    Name (_UID, Zero)  // _UID: Unique ID
    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
    {
	Name (RBUF, ResourceTemplate ()
	{
	    Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, )
	    {
		0x00000007,
	    }
	    Memory32Fixed (ReadWrite,
		0xFED81500,         // Address Base
		0x00000400,         // Address Length
		)
	})
	Return (RBUF) /* \_SB_.GPIO._CRS.RBUF */
    }
}

Now acpi_dev_get_irqresource() gets called with legacy=false, but because
of the earlier override of the trigger-type acpi_register_gsi() returns
-EBUSY (because we try to register the same interrupt with a different
trigger-type) and we end up setting IORESOURCE_DISABLED in the flags.

The setting of IORESOURCE_DISABLED causes platform_get_irq() to call
acpi_irq_get() which is not implemented on x86 and returns -EINVAL.
resulting in the following in dmesg:

amd_gpio AMDI0030:00: Failed to get gpio IRQ: -22
amd_gpio: probe of AMDI0030:00 failed with error -22

The SMB0001 is a "virtual" device in the sense that the only way the OS
interacts with it is through calling a couple of methods to do SMBus
transfers. As such it is weird that it has IO and IRQ resources at all,
because the driver for it is not expected to ever access the hardware
directly.

The Linux driver for the SMB0001 device directly binds to the acpi_device
through the acpi_bus, so we do not need to instantiate a platform_device
for this ACPI device. This commit adds the SMB0001 HID to the
forbidden_id_list, avoiding the instantiating of a platform_device for it.
Not instantiating a platform_device means we will no longer call
acpi_dev_get_irqresource() for the legacy IRQ resource fixing the probe of
the AMDI0030 device failing.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1644013
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=198715
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199523
Reported-by: Lukas Kahnert <openproggerfreak@gmail.com>
Tested-by: Marc <suaefar@googlemail.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
Gustavo A. R. Silva
7810fe9f23 drivers/misc/sgi-gru: fix Spectre v1 vulnerability
commit fee05f455c upstream.

req.gid can be 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:

vers/misc/sgi-gru/grukdump.c:200 gru_dump_chiplet_request() warn:
potential spectre issue 'gru_base' [w]

Fix this by sanitizing req.gid before calling macro GID_TO_GRU, which
uses it to index gru_base.

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&m=152449131114778&w=2

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
Mattias Jacobsson
fdddfd7fbe USB: misc: appledisplay: add 20" Apple Cinema Display
commit f6501f4919 upstream.

Add another Apple Cinema Display to the list of supported displays

Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00