Commit Graph

650114 Commits

Author SHA1 Message Date
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
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
Nathan Chancellor
f1b4d95e4d misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data
commit 7c97301285 upstream.

After building the kernel with Clang, the following section mismatch
warning appears:

WARNING: vmlinux.o(.text+0x3bf19a6): Section mismatch in reference from
the function ssc_probe() to the function
.init.text:atmel_ssc_get_driver_data()
The function ssc_probe() references
the function __init atmel_ssc_get_driver_data().
This is often because ssc_probe lacks a __init
annotation or the annotation of atmel_ssc_get_driver_data is wrong.

Remove __init from atmel_ssc_get_driver_data to get rid of the mismatch.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
Emmanuel Pescosta
305a97a9db usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB
commit a771125776 upstream.

Following on from this patch: https://lkml.org/lkml/2017/11/3/516,
Corsair K70 LUX RGB keyboards also require the DELAY_INIT quirk to
start correctly at boot.

Dmesg output:
usb 1-6: string descriptor 0 read error: -110
usb 1-6: New USB device found, idVendor=1b1c, idProduct=1b33
usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-6: can't set config #1, error -110

Signed-off-by: Emmanuel Pescosta <emmanuelpescosta099@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
Kai-Heng Feng
148b90c112 USB: quirks: Add no-lpm quirk for Raydium touchscreens
commit deefd24228 upstream.

Raydium USB touchscreen fails to set config if LPM is enabled:
[    2.030658] usb 1-8: New USB device found, idVendor=2386, idProduct=3119
[    2.030659] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.030660] usb 1-8: Product: Raydium Touch System
[    2.030661] usb 1-8: Manufacturer: Raydium Corporation
[    7.132209] usb 1-8: can't set config #1, error -110

Same behavior can be observed on 2386:3114.

Raydium claims the touchscreen supports LPM under Windows, so I used
Microsoft USB Test Tools (MUTT) [1] to check its LPM status. MUTT shows
that the LPM doesn't work under Windows, either. So let's just disable LPM
for Raydium touchscreens.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-test-tools

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
Maarten Jacobs
9f08cfeb96 usb: cdc-acm: add entry for Hiro (Conexant) modem
commit 63529eaa61 upstream.

The cdc-acm kernel module currently does not support the Hiro (Conexant)
H05228 USB modem. The patch below adds the device specific information:
	idVendor	0x0572
	idProduct	0x1349

Signed-off-by: Maarten Jacobs <maarten256@outlook.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
Dan Carpenter
bb5f531d73 uio: Fix an Oops on load
commit 432798195b upstream.

I was trying to solve a double free but I introduced a more serious
NULL dereference bug.  The problem is that if there is an IRQ which
triggers immediately, then we need "info->uio_dev" but it's not set yet.

This patch puts the original initialization back to how it was and just
sets info->uio_dev to NULL on the error path so it should solve both
the Oops and the double free.

Fixes: f019f07ecf ("uio: potential double frees if __uio_register_device() fails")
Reported-by: Mathias Thore <Mathias.Thore@infinera.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Tested-by: Mathias Thore <Mathias.Thore@infinera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
Sakari Ailus
496f98c088 media: v4l: event: Add subscription to list before calling "add" operation
commit 92539d3eda upstream.

Patch ad608fbcf1 changed how events were subscribed to address an issue
elsewhere. As a side effect of that change, the "add" callback was called
before the event subscription was added to the list of subscribed events,
causing the first event queued by the add callback (and possibly other
events arriving soon afterwards) to be lost.

Fix this by adding the subscription to the list before calling the "add"
callback, and clean up afterwards if that fails.

Fixes: ad608fbcf1 ("media: v4l: event: Prevent freeing event subscriptions while accessed")

Reported-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org (for 4.14 and up)
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
[Sakari Ailus: Backported to v4.9 stable]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00