summaryrefslogtreecommitdiff
path: root/MAINTAINERS
AgeCommit message (Collapse)Author
2020-12-31UPSTREAM: net: WireGuard secure network tunnelJason A. Donenfeld
WireGuard is a layer 3 secure networking tunnel made specifically for the kernel, that aims to be much simpler and easier to audit than IPsec. Extensive documentation and description of the protocol and considerations, along with formal proofs of the cryptography, are available at: * https://www.wireguard.com/ * https://www.wireguard.com/papers/wireguard.pdf This commit implements WireGuard as a simple network device driver, accessible in the usual RTNL way used by virtual network drivers. It makes use of the udp_tunnel APIs, GRO, GSO, NAPI, and the usual set of networking subsystem APIs. It has a somewhat novel multicore queueing system designed for maximum throughput and minimal latency of encryption operations, but it is implemented modestly using workqueues and NAPI. Configuration is done via generic Netlink, and following a review from the Netlink maintainer a year ago, several high profile userspace tools have already implemented the API. This commit also comes with several different tests, both in-kernel tests and out-of-kernel tests based on network namespaces, taking profit of the fact that sockets used by WireGuard intentionally stay in the namespace the WireGuard interface was originally created, exactly like the semantics of userspace tun devices. See wireguard.com/netns/ for pictures and examples. The source code is fairly short, but rather than combining everything into a single file, WireGuard is developed as cleanly separable files, making auditing and comprehension easier. Things are laid out as follows: * noise.[ch], cookie.[ch], messages.h: These implement the bulk of the cryptographic aspects of the protocol, and are mostly data-only in nature, taking in buffers of bytes and spitting out buffers of bytes. They also handle reference counting for their various shared pieces of data, like keys and key lists. * ratelimiter.[ch]: Used as an integral part of cookie.[ch] for ratelimiting certain types of cryptographic operations in accordance with particular WireGuard semantics. * allowedips.[ch], peerlookup.[ch]: The main lookup structures of WireGuard, the former being trie-like with particular semantics, an integral part of the design of the protocol, and the latter just being nice helper functions around the various hashtables we use. * device.[ch]: Implementation of functions for the netdevice and for rtnl, responsible for maintaining the life of a given interface and wiring it up to the rest of WireGuard. * peer.[ch]: Each interface has a list of peers, with helper functions available here for creation, destruction, and reference counting. * socket.[ch]: Implementation of functions related to udp_socket and the general set of kernel socket APIs, for sending and receiving ciphertext UDP packets, and taking care of WireGuard-specific sticky socket routing semantics for the automatic roaming. * netlink.[ch]: Userspace API entry point for configuring WireGuard peers and devices. The API has been implemented by several userspace tools and network management utility, and the WireGuard project distributes the basic wg(8) tool. * queueing.[ch]: Shared function on the rx and tx path for handling the various queues used in the multicore algorithms. * send.c: Handles encrypting outgoing packets in parallel on multiple cores, before sending them in order on a single core, via workqueues and ring buffers. Also handles sending handshake and cookie messages as part of the protocol, in parallel. * receive.c: Handles decrypting incoming packets in parallel on multiple cores, before passing them off in order to be ingested via the rest of the networking subsystem with GRO via the typical NAPI poll function. Also handles receiving handshake and cookie messages as part of the protocol, in parallel. * timers.[ch]: Uses the timer wheel to implement protocol particular event timeouts, and gives a set of very simple event-driven entry point functions for callers. * main.c, version.h: Initialization and deinitialization of the module. * selftest/*.h: Runtime unit tests for some of the most security sensitive functions. * tools/testing/selftests/wireguard/netns.sh: Aforementioned testing script using network namespaces. This commit aims to be as self-contained as possible, implementing WireGuard as a standalone module not needing much special handling or coordination from the network subsystem. I expect for future optimizations to the network stack to positively improve WireGuard, and vice-versa, but for the time being, this exists as intentionally standalone. We introduce a menu option for CONFIG_WIREGUARD, as well as providing a verbose debug log and self-tests via CONFIG_WIREGUARD_DEBUG. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Cc: David Miller <davem@davemloft.net> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net> [Jason: ported to 4.19 by doing the following: - wg_get_device_start uses genl_family_attrbuf - skb_probe_transport_header has an extra argument - NLA_EXACT/MIN_LEN is not there yet - nla policy is per verb not family - totalram_pages isn't a function] - __kernel_timespec -> __uapi_kernel_timespec] (cherry picked from commit e7096c131e5161fa3b8e52a650d7719d2857adfd) Bug: 152722841 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I04cd661a4cfec9b9fa64c3ab0ea39e4e2352fa13
2020-03-08Merge branch 'android-4.4-p' of ↵Michael Bestas
https://android.googlesource.com/kernel/common into lineage-17.1-caf-msm8998 This brings LA.UM.8.4.r1-05200-8x98.0 up to date with https://android.googlesource.com/kernel/common/ android-4.4-p at commit: 4db1ebdd40ec0 FROMLIST: HID: nintendo: add nintendo switch controller driver Conflicts: arch/arm64/boot/Makefile arch/arm64/kernel/psci.c arch/x86/configs/x86_64_cuttlefish_defconfig drivers/md/dm.c drivers/of/Kconfig drivers/thermal/thermal_core.c fs/proc/meminfo.c kernel/locking/spinlock_debug.c kernel/time/hrtimer.c net/wireless/util.c Change-Id: I5b5163497b7c6ab8487ffbb2d036e4cda01ed670
2020-02-28FROMLIST: HID: nintendo: add nintendo switch controller driverDaniel J. Ogorchock
The hid-nintendo driver supports the Nintendo Switch Pro Controllers and the Joy-Cons. The Pro Controllers can be used over USB or Bluetooth. The Joy-Cons each create their own, independent input devices, so it is up to userspace to combine them if desired. Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com> Test: tested via custom test app Test: atest NintendoSwitchProTest Bug: 135136477 Link: https://patchwork.kernel.org/patch/11312547/ Link: https://lore.kernel.org/linux-input/20191230012720.2368987-2-djogorchock@gmail.com/ Change-Id: I179da1092faedc2ad25336224cf5ec8ff00e0d3f Signed-off-by: Siarhei Vishniakou <svv@google.com>
2019-10-30Merge android-4.4-p.197 (93ec8fb) into msm-4.4Srinivasarao P
* refs/heads/tmp-93ec8fb Linux 4.4.197 xfs: clear sb->s_fs_info on mount failure x86/asm: Fix MWAITX C-state hint value tracing: Get trace_array reference for available_tracers files media: stkwebcam: fix runtime PM after driver unbind CIFS: Force revalidate inode when dentry is stale cifs: Check uniqueid for SMB2+ and return -ESTALE if necessary Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc arm64: Rename cpuid_feature field extract routines arm64: capabilities: Handle sign of the feature bit kernel/sysctl.c: do not override max_threads provided by userspace CIFS: Force reval dentry if LOOKUP_REVAL flag is set CIFS: Gracefully handle QueryInfo errors during open perf llvm: Don't access out-of-scope array iio: light: opt3001: fix mutex unlock race iio: adc: ad799x: fix probe error handling staging: vt6655: Fix memory leak in vt6655_probe USB: legousbtower: fix use-after-free on release USB: legousbtower: fix open after failed reset request USB: legousbtower: fix potential NULL-deref on disconnect USB: legousbtower: fix deadlock on disconnect USB: legousbtower: fix slab info leak at probe usb: renesas_usbhs: gadget: Fix usb_ep_set_{halt,wedge}() behavior usb: renesas_usbhs: gadget: Do not discard queues in usb_ep_set_{halt,wedge}() USB: dummy-hcd: fix power budget for SuperSpeed mode USB: microtek: fix info-leak at probe USB: usblcd: fix I/O after disconnect USB: serial: fix runtime PM after driver unbind USB: serial: option: add support for Cinterion CLS8 devices USB: serial: option: add Telit FN980 compositions USB: serial: ftdi_sio: add device IDs for Sienna and Echelon PL-20 USB: serial: keyspan: fix NULL-derefs on open() and write() serial: uartlite: fix exit path null pointer USB: ldusb: fix NULL-derefs on driver unbind USB: chaoskey: fix use-after-free on release USB: usblp: fix runtime PM after driver unbind USB: iowarrior: fix use-after-free after driver unbind USB: iowarrior: fix use-after-free on release USB: iowarrior: fix use-after-free on disconnect USB: adutux: fix use-after-free on release USB: adutux: fix NULL-derefs on disconnect USB: adutux: fix use-after-free on disconnect USB: adutux: remove redundant variable minor xhci: Increase STS_SAVE timeout in xhci_suspend() usb: xhci: wait for CNR controller not ready bit in xhci resume xhci: Check all endpoints for LPM timeout xhci: Prevent device initiated U1/U2 link pm if exit latency is too long USB: usb-skeleton: fix NULL-deref on disconnect USB: usb-skeleton: fix runtime PM after driver unbind USB: yurex: fix NULL-derefs on disconnect USB: yurex: Don't retry on unexpected errors USB: rio500: Remove Rio 500 kernel driver panic: ensure preemption is disabled during panic() ASoC: sgtl5000: Improve VAG power and mute control nl80211: validate beacon head cfg80211: Use const more consistently in for_each_element macros cfg80211: add and use strongly typed element iteration macros crypto: caam - fix concurrency issue in givencrypt descriptor perf stat: Fix a segmentation fault when using repeat forever tools lib traceevent: Do not free tep->cmdlines in add_new_comm() on failure kernel/elfcore.c: include proper prototypes fuse: fix memleak in cuse_channel_open thermal: Fix use-after-free when unregistering thermal zone device drm/amdgpu: Check for valid number of registers to read ceph: fix directories inode i_blkbits initialization xen/pci: reserve MCFG areas earlier 9p: avoid attaching writeback_fid on mmap with type PRIVATE fs: nfs: Fix possible null-pointer dereferences in encode_attrs() ima: always return negative code for error cfg80211: initialize on-stack chandefs ieee802154: atusb: fix use-after-free at disconnect crypto: qat - Silence smp_processor_id() warning can: mcp251x: mcp251x_hw_reset(): allow more time after a reset powerpc/powernv: Restrict OPAL symbol map to only be readable by root ASoC: Define a set of DAPM pre/post-up events KVM: nVMX: handle page fault in vmread fix s390/cio: exclude subchannels with no parent from pseudo check s390/cio: avoid calling strlen on null pointer s390/topology: avoid firing events before kobjs are created KVM: s390: Test for bad access register and size at the start of S390_MEM_OP Change-Id: I948ef653eafcff32197e1886e13548b32be2d0ad Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-10-17Merge 4.4.197 into android-4.4-pGreg Kroah-Hartman
Changes in 4.4.197 KVM: s390: Test for bad access register and size at the start of S390_MEM_OP s390/topology: avoid firing events before kobjs are created s390/cio: avoid calling strlen on null pointer s390/cio: exclude subchannels with no parent from pseudo check KVM: nVMX: handle page fault in vmread fix ASoC: Define a set of DAPM pre/post-up events powerpc/powernv: Restrict OPAL symbol map to only be readable by root can: mcp251x: mcp251x_hw_reset(): allow more time after a reset crypto: qat - Silence smp_processor_id() warning ieee802154: atusb: fix use-after-free at disconnect cfg80211: initialize on-stack chandefs ima: always return negative code for error fs: nfs: Fix possible null-pointer dereferences in encode_attrs() 9p: avoid attaching writeback_fid on mmap with type PRIVATE xen/pci: reserve MCFG areas earlier ceph: fix directories inode i_blkbits initialization drm/amdgpu: Check for valid number of registers to read thermal: Fix use-after-free when unregistering thermal zone device fuse: fix memleak in cuse_channel_open kernel/elfcore.c: include proper prototypes tools lib traceevent: Do not free tep->cmdlines in add_new_comm() on failure perf stat: Fix a segmentation fault when using repeat forever crypto: caam - fix concurrency issue in givencrypt descriptor cfg80211: add and use strongly typed element iteration macros cfg80211: Use const more consistently in for_each_element macros nl80211: validate beacon head ASoC: sgtl5000: Improve VAG power and mute control panic: ensure preemption is disabled during panic() USB: rio500: Remove Rio 500 kernel driver USB: yurex: Don't retry on unexpected errors USB: yurex: fix NULL-derefs on disconnect USB: usb-skeleton: fix runtime PM after driver unbind USB: usb-skeleton: fix NULL-deref on disconnect xhci: Prevent device initiated U1/U2 link pm if exit latency is too long xhci: Check all endpoints for LPM timeout usb: xhci: wait for CNR controller not ready bit in xhci resume xhci: Increase STS_SAVE timeout in xhci_suspend() USB: adutux: remove redundant variable minor USB: adutux: fix use-after-free on disconnect USB: adutux: fix NULL-derefs on disconnect USB: adutux: fix use-after-free on release USB: iowarrior: fix use-after-free on disconnect USB: iowarrior: fix use-after-free on release USB: iowarrior: fix use-after-free after driver unbind USB: usblp: fix runtime PM after driver unbind USB: chaoskey: fix use-after-free on release USB: ldusb: fix NULL-derefs on driver unbind serial: uartlite: fix exit path null pointer USB: serial: keyspan: fix NULL-derefs on open() and write() USB: serial: ftdi_sio: add device IDs for Sienna and Echelon PL-20 USB: serial: option: add Telit FN980 compositions USB: serial: option: add support for Cinterion CLS8 devices USB: serial: fix runtime PM after driver unbind USB: usblcd: fix I/O after disconnect USB: microtek: fix info-leak at probe USB: dummy-hcd: fix power budget for SuperSpeed mode usb: renesas_usbhs: gadget: Do not discard queues in usb_ep_set_{halt,wedge}() usb: renesas_usbhs: gadget: Fix usb_ep_set_{halt,wedge}() behavior USB: legousbtower: fix slab info leak at probe USB: legousbtower: fix deadlock on disconnect USB: legousbtower: fix potential NULL-deref on disconnect USB: legousbtower: fix open after failed reset request USB: legousbtower: fix use-after-free on release staging: vt6655: Fix memory leak in vt6655_probe iio: adc: ad799x: fix probe error handling iio: light: opt3001: fix mutex unlock race perf llvm: Don't access out-of-scope array CIFS: Gracefully handle QueryInfo errors during open CIFS: Force reval dentry if LOOKUP_REVAL flag is set kernel/sysctl.c: do not override max_threads provided by userspace arm64: capabilities: Handle sign of the feature bit arm64: Rename cpuid_feature field extract routines Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc cifs: Check uniqueid for SMB2+ and return -ESTALE if necessary CIFS: Force revalidate inode when dentry is stale media: stkwebcam: fix runtime PM after driver unbind tracing: Get trace_array reference for available_tracers files x86/asm: Fix MWAITX C-state hint value xfs: clear sb->s_fs_info on mount failure Linux 4.4.197 Change-Id: I0879b08629040431c71dae0d8b5474863d5e0391 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-10-17USB: rio500: Remove Rio 500 kernel driverBastien Nocera
commit 015664d15270a112c2371d812f03f7c579b35a73 upstream. The Rio500 kernel driver has not been used by Rio500 owners since 2001 not long after the rio500 project added support for a user-space USB stack through the very first versions of usbdevfs and then libusb. Support for the kernel driver was removed from the upstream utilities in 2008: https://gitlab.freedesktop.org/hadess/rio500/commit/943f624ab721eb8281c287650fcc9e2026f6f5db Cc: Cesar Miquel <miquel@df.uba.ar> Signed-off-by: Bastien Nocera <hadess@hadess.net> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/6251c17584d220472ce882a3d9c199c401a51a71.camel@hadess.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-09Merge android-4.4.191 (6da3fbc) into msm-4.4Srinivasarao P
* refs/heads/tmp-6da3fbc Linux 4.4.191 x86/ptrace: fix up botched merge of spectrev1 fix mac80211: fix possible sta leak Revert "cfg80211: fix processing world regdomain when non modular" VMCI: Release resource if the work is already queued stm class: Fix a double free of stm_source_device mmc: core: Fix init of SD cards reporting an invalid VDD range mmc: sdhci-of-at91: add quirk for broken HS200 uprobes/x86: Fix detection of 32-bit user mode ptrace,x86: Make user_64bit_mode() available to 32-bit builds USB: storage: ums-realtek: Whitelist auto-delink support USB: storage: ums-realtek: Update module parameter description for auto_delink_en usb: host: ohci: fix a race condition between shutdown and irq USB: cdc-wdm: fix race between write and disconnect due to flag abuse usb-storage: Add new JMS567 revision to unusual_devs x86/apic: Include the LDR when clearing out APIC registers x86/apic: Do not initialize LDR and DFR for bigsmp KVM: x86: Don't update RIP or do single-step on faulting emulation ALSA: seq: Fix potential concurrent access to the deleted pool tcp: make sure EPOLLOUT wont be missed ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue watchdog: bcm2835_wdt: Fix module autoload tools: hv: fix KVP and VSS daemons exit code usb: host: fotg2: restart hcd after port reset usb: gadget: composite: Clear "suspended" on reset/disconnect dmaengine: ste_dma40: fix unneeded variable warning scsi: ufs: Fix NULL pointer dereference in ufshcd_config_vreg_hpm() x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume Revert "perf test 6: Fix missing kvm module load for s390" netfilter: conntrack: Use consistent ct id hash calculation netfilter: ctnetlink: don't use conntrack/expect object addresses as id inet: switch IP ID generator to siphash siphash: implement HalfSipHash1-3 for hash tables siphash: add cryptographically secure PRF vhost: scsi: add weight support vhost_net: fix possible infinite loop vhost: introduce vhost_exceeds_weight() vhost_net: introduce vhost_exceeds_weight() vhost_net: use packet weight for rx handler, too vhost-net: set packet weight of tx polling to 2 * vq size net: arc_emac: fix koops caused by sk_buff free GFS2: don't set rgrp gl_object until it's inserted into rgrp tree cgroup: Disable IRQs while holding css_set_lock dm table: fix invalid memory accesses with too high sector number dm space map metadata: fix missing store of apply_bops() return value dm btree: fix order of block initialization in btree_split_beneath x86/boot: Fix boot regression caused by bootparam sanitizing x86/boot: Save fields explicitly, zero out everything else x86/apic: Handle missing global clockevent gracefully x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386 userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx Revert "dm bufio: fix deadlock with loop device" HID: wacom: correct misreported EKR ring values selftests: kvm: Adding config fragments libata: add SG safety checks in SFF pio transfers net: hisilicon: Fix dma_map_single failed on arm64 net: hisilicon: fix hip04-xmit never return TX_BUSY net: hisilicon: make hip04_tx_reclaim non-reentrant net: cxgb3_main: Fix a resource leak in a error path in 'init_one()' NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim() can: peak_usb: force the string buffer NULL-terminated can: sja1000: force the string buffer NULL-terminated perf bench numa: Fix cpu0 binding isdn: hfcsusb: Fix mISDN driver crash caused by transfer buffer on the stack isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in start_isoc_chain() net: usb: qmi_wwan: Add the BroadMobi BM818 card ASoC: ti: davinci-mcasp: Correct slot_width posed constraint st_nci_hci_connectivity_event_received: null check the allocation st21nfca_connectivity_event_received: null check the allocation can: dev: call netif_carrier_off() in register_candev() bonding: Force slave speed check after link state recovery for 802.3ad netfilter: ebtables: fix a memory leak bug in compat MIPS: kernel: only use i8253 clocksource with periodic clockevent HID: Add 044f:b320 ThrustMaster, Inc. 2 in 1 DT ANDROID: sched: Disallow WALT with CFS bandwidth control ANDROID: fiq_debugger: remove ANDROID: Add a tracepoint for mapping inode to full path Conflicts: drivers/scsi/ufs/ufshcd.c drivers/staging/android/fiq_debugger/fiq_debugger.c sound/usb/mixer.c Change-Id: I95d42e2ce37dd5d32e1737f701976079c43b7501 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-09-06Merge 4.4.191 into android-4.4-pGreg Kroah-Hartman
Changes in 4.4.191 HID: Add 044f:b320 ThrustMaster, Inc. 2 in 1 DT MIPS: kernel: only use i8253 clocksource with periodic clockevent netfilter: ebtables: fix a memory leak bug in compat bonding: Force slave speed check after link state recovery for 802.3ad can: dev: call netif_carrier_off() in register_candev() st21nfca_connectivity_event_received: null check the allocation st_nci_hci_connectivity_event_received: null check the allocation ASoC: ti: davinci-mcasp: Correct slot_width posed constraint net: usb: qmi_wwan: Add the BroadMobi BM818 card isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in start_isoc_chain() isdn: hfcsusb: Fix mISDN driver crash caused by transfer buffer on the stack perf bench numa: Fix cpu0 binding can: sja1000: force the string buffer NULL-terminated can: peak_usb: force the string buffer NULL-terminated NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim() net: cxgb3_main: Fix a resource leak in a error path in 'init_one()' net: hisilicon: make hip04_tx_reclaim non-reentrant net: hisilicon: fix hip04-xmit never return TX_BUSY net: hisilicon: Fix dma_map_single failed on arm64 libata: add SG safety checks in SFF pio transfers selftests: kvm: Adding config fragments HID: wacom: correct misreported EKR ring values Revert "dm bufio: fix deadlock with loop device" userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386 x86/apic: Handle missing global clockevent gracefully x86/boot: Save fields explicitly, zero out everything else x86/boot: Fix boot regression caused by bootparam sanitizing dm btree: fix order of block initialization in btree_split_beneath dm space map metadata: fix missing store of apply_bops() return value dm table: fix invalid memory accesses with too high sector number cgroup: Disable IRQs while holding css_set_lock GFS2: don't set rgrp gl_object until it's inserted into rgrp tree net: arc_emac: fix koops caused by sk_buff free vhost-net: set packet weight of tx polling to 2 * vq size vhost_net: use packet weight for rx handler, too vhost_net: introduce vhost_exceeds_weight() vhost: introduce vhost_exceeds_weight() vhost_net: fix possible infinite loop vhost: scsi: add weight support siphash: add cryptographically secure PRF siphash: implement HalfSipHash1-3 for hash tables inet: switch IP ID generator to siphash netfilter: ctnetlink: don't use conntrack/expect object addresses as id netfilter: conntrack: Use consistent ct id hash calculation Revert "perf test 6: Fix missing kvm module load for s390" x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h scsi: ufs: Fix NULL pointer dereference in ufshcd_config_vreg_hpm() dmaengine: ste_dma40: fix unneeded variable warning usb: gadget: composite: Clear "suspended" on reset/disconnect usb: host: fotg2: restart hcd after port reset tools: hv: fix KVP and VSS daemons exit code watchdog: bcm2835_wdt: Fix module autoload tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit tcp: make sure EPOLLOUT wont be missed ALSA: seq: Fix potential concurrent access to the deleted pool KVM: x86: Don't update RIP or do single-step on faulting emulation x86/apic: Do not initialize LDR and DFR for bigsmp x86/apic: Include the LDR when clearing out APIC registers usb-storage: Add new JMS567 revision to unusual_devs USB: cdc-wdm: fix race between write and disconnect due to flag abuse usb: host: ohci: fix a race condition between shutdown and irq USB: storage: ums-realtek: Update module parameter description for auto_delink_en USB: storage: ums-realtek: Whitelist auto-delink support ptrace,x86: Make user_64bit_mode() available to 32-bit builds uprobes/x86: Fix detection of 32-bit user mode mmc: sdhci-of-at91: add quirk for broken HS200 mmc: core: Fix init of SD cards reporting an invalid VDD range stm class: Fix a double free of stm_source_device VMCI: Release resource if the work is already queued Revert "cfg80211: fix processing world regdomain when non modular" mac80211: fix possible sta leak x86/ptrace: fix up botched merge of spectrev1 fix Linux 4.4.191 Change-Id: Ic9a2554d2ba45f9c17478f1dfb5115e1a3bc3bd7 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-09-06Merge 4.4.191 into android-4.4Greg Kroah-Hartman
Changes in 4.4.191 HID: Add 044f:b320 ThrustMaster, Inc. 2 in 1 DT MIPS: kernel: only use i8253 clocksource with periodic clockevent netfilter: ebtables: fix a memory leak bug in compat bonding: Force slave speed check after link state recovery for 802.3ad can: dev: call netif_carrier_off() in register_candev() st21nfca_connectivity_event_received: null check the allocation st_nci_hci_connectivity_event_received: null check the allocation ASoC: ti: davinci-mcasp: Correct slot_width posed constraint net: usb: qmi_wwan: Add the BroadMobi BM818 card isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in start_isoc_chain() isdn: hfcsusb: Fix mISDN driver crash caused by transfer buffer on the stack perf bench numa: Fix cpu0 binding can: sja1000: force the string buffer NULL-terminated can: peak_usb: force the string buffer NULL-terminated NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim() net: cxgb3_main: Fix a resource leak in a error path in 'init_one()' net: hisilicon: make hip04_tx_reclaim non-reentrant net: hisilicon: fix hip04-xmit never return TX_BUSY net: hisilicon: Fix dma_map_single failed on arm64 libata: add SG safety checks in SFF pio transfers selftests: kvm: Adding config fragments HID: wacom: correct misreported EKR ring values Revert "dm bufio: fix deadlock with loop device" userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386 x86/apic: Handle missing global clockevent gracefully x86/boot: Save fields explicitly, zero out everything else x86/boot: Fix boot regression caused by bootparam sanitizing dm btree: fix order of block initialization in btree_split_beneath dm space map metadata: fix missing store of apply_bops() return value dm table: fix invalid memory accesses with too high sector number cgroup: Disable IRQs while holding css_set_lock GFS2: don't set rgrp gl_object until it's inserted into rgrp tree net: arc_emac: fix koops caused by sk_buff free vhost-net: set packet weight of tx polling to 2 * vq size vhost_net: use packet weight for rx handler, too vhost_net: introduce vhost_exceeds_weight() vhost: introduce vhost_exceeds_weight() vhost_net: fix possible infinite loop vhost: scsi: add weight support siphash: add cryptographically secure PRF siphash: implement HalfSipHash1-3 for hash tables inet: switch IP ID generator to siphash netfilter: ctnetlink: don't use conntrack/expect object addresses as id netfilter: conntrack: Use consistent ct id hash calculation Revert "perf test 6: Fix missing kvm module load for s390" x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h scsi: ufs: Fix NULL pointer dereference in ufshcd_config_vreg_hpm() dmaengine: ste_dma40: fix unneeded variable warning usb: gadget: composite: Clear "suspended" on reset/disconnect usb: host: fotg2: restart hcd after port reset tools: hv: fix KVP and VSS daemons exit code watchdog: bcm2835_wdt: Fix module autoload tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit tcp: make sure EPOLLOUT wont be missed ALSA: seq: Fix potential concurrent access to the deleted pool KVM: x86: Don't update RIP or do single-step on faulting emulation x86/apic: Do not initialize LDR and DFR for bigsmp x86/apic: Include the LDR when clearing out APIC registers usb-storage: Add new JMS567 revision to unusual_devs USB: cdc-wdm: fix race between write and disconnect due to flag abuse usb: host: ohci: fix a race condition between shutdown and irq USB: storage: ums-realtek: Update module parameter description for auto_delink_en USB: storage: ums-realtek: Whitelist auto-delink support ptrace,x86: Make user_64bit_mode() available to 32-bit builds uprobes/x86: Fix detection of 32-bit user mode mmc: sdhci-of-at91: add quirk for broken HS200 mmc: core: Fix init of SD cards reporting an invalid VDD range stm class: Fix a double free of stm_source_device VMCI: Release resource if the work is already queued Revert "cfg80211: fix processing world regdomain when non modular" mac80211: fix possible sta leak x86/ptrace: fix up botched merge of spectrev1 fix Linux 4.4.191 Change-Id: I9c9b3ec748ba2977b818fd569d1788ed5da295b2 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-09-06siphash: add cryptographically secure PRFJason A. Donenfeld
commit 2c956a60778cbb6a27e0c7a8a52a91378c90e1d1 upstream. SipHash is a 64-bit keyed hash function that is actually a cryptographically secure PRF, like HMAC. Except SipHash is super fast, and is meant to be used as a hashtable keyed lookup function, or as a general PRF for short input use cases, such as sequence numbers or RNG chaining. For the first usage: There are a variety of attacks known as "hashtable poisoning" in which an attacker forms some data such that the hash of that data will be the same, and then preceeds to fill up all entries of a hashbucket. This is a realistic and well-known denial-of-service vector. Currently hashtables use jhash, which is fast but not secure, and some kind of rotating key scheme (or none at all, which isn't good). SipHash is meant as a replacement for jhash in these cases. There are a modicum of places in the kernel that are vulnerable to hashtable poisoning attacks, either via userspace vectors or network vectors, and there's not a reliable mechanism inside the kernel at the moment to fix it. The first step toward fixing these issues is actually getting a secure primitive into the kernel for developers to use. Then we can, bit by bit, port things over to it as deemed appropriate. While SipHash is extremely fast for a cryptographically secure function, it is likely a bit slower than the insecure jhash, and so replacements will be evaluated on a case-by-case basis based on whether or not the difference in speed is negligible and whether or not the current jhash usage poses a real security risk. For the second usage: A few places in the kernel are using MD5 or SHA1 for creating secure sequence numbers, syn cookies, port numbers, or fast random numbers. SipHash is a faster and more fitting, and more secure replacement for MD5 in those situations. Replacing MD5 and SHA1 with SipHash for these uses is obvious and straight-forward, and so is submitted along with this patch series. There shouldn't be much of a debate over its efficacy. Dozens of languages are already using this internally for their hash tables and PRFs. Some of the BSDs already use this in their kernels. SipHash is a widely known high-speed solution to a widely known set of problems, and it's time we catch-up. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Eric Biggers <ebiggers3@gmail.com> Cc: David Laight <David.Laight@aculab.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 4.4 as dependency of commits df453700e8d8 "inet: switch IP ID generator to siphash" and 3c79107631db "netfilter: ctnetlink: don't use conntrack/expect object addresses as id": - Adjust context] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-14UPSTREAM: VSOCK: Introduce vhost_vsock.koAsias He
VM sockets vhost transport implementation. This driver runs on the host. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 433fc58e6bf2c8bd97e57153ed28e64fd78207b8) Bug: 121166534 Test: Ran cuttlefish with android-4.4 + VSOCKETS, VMWARE_VMCI_VSOCKETS Signed-off-by: Cody Schuffelen <schuffelen@google.com> Change-Id: Id90d852ffd498a7d89075cddb6d8ed0b9af5e69f
2019-05-14UPSTREAM: VSOCK: Introduce virtio_transport.koAsias He
VM sockets virtio transport implementation. This driver runs in the guest. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 0ea9e1d3a9e3ef7d2a1462d3de6b95131dc7d872) Bug: 121166534 Test: Ran cuttlefish with android-4.4 + VSOCKETS, VMWARE_VMCI_VSOCKETS Signed-off-by: Cody Schuffelen <schuffelen@google.com> Change-Id: Ib12e1e4d21183ac3d917316566694758717596bd
2019-05-14BACKPORT: VSOCK: Introduce virtio_vsock_common.koAsias He
This module contains the common code and header files for the following virtio_transporto and vhost_vsock kernel modules. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 06a8fc78367d070720af960dcecec917d3ae5f3b) [astrachan: Backported around stable backport 62209d1 ("vsock: split dwork to avoid reinitializations")] Bug: 121166534 Test: Ran cuttlefish with android-4.4 + VSOCKETS, VMWARE_VMCI_VSOCKETS Signed-off-by: Cody Schuffelen <schuffelen@google.com> Change-Id: I723c073db804663ad4bf83b657c72b16cbdb220a
2019-01-29Merge android-4.4.171 (b355d4f) into msm-4.4Srinivasarao P
* refs/heads/tmp-b355d4f Linux 4.4.171 sunrpc: use-after-free in svc_process_common() ext4: fix a potential fiemap/page fault deadlock w/ inline_data crypto: cts - fix crash on short inputs i2c: dev: prevent adapter retries and timeout being set as minus value ACPI: power: Skip duplicate power resource references in _PRx PCI: altera: Move retrain from fixup to altera_pcie_host_init() PCI: altera: Rework config accessors for use without a struct pci_bus PCI: altera: Poll for link training status after retraining the link PCI: altera: Poll for link up status after retraining the link PCI: altera: Check link status before retrain link PCI: altera: Reorder read/write functions PCI: altera: Fix altera_pcie_link_is_up() slab: alien caches must not be initialized if the allocation of the alien cache failed USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB USB: storage: add quirk for SMI SM3350 USB: storage: don't insert sane sense for SPC3+ when bad sense specified usb: cdc-acm: send ZLP for Telit 3G Intel based modems cifs: Fix potential OOB access of lock element array CIFS: Do not hide EINTR after sending network packets btrfs: tree-checker: Fix misleading group system information btrfs: tree-checker: Check level for leaves and nodes btrfs: Verify that every chunk has corresponding block group at mount time btrfs: Check that each block group has corresponding chunk at mount time btrfs: validate type when reading a chunk btrfs: tree-checker: Detect invalid and empty essential trees btrfs: tree-checker: Verify block_group_item btrfs: tree-check: reduce stack consumption in check_dir_item btrfs: tree-checker: use %zu format string for size_t btrfs: tree-checker: Add checker for dir item btrfs: tree-checker: Fix false panic for sanity test btrfs: tree-checker: Enhance btrfs_check_node output btrfs: Move leaf and node validation checker to tree-checker.c btrfs: Add checker for EXTENT_CSUM btrfs: Add sanity check for EXTENT_DATA when reading out leaf btrfs: Check if item pointer overlaps with the item itself btrfs: Refactor check_leaf function for later expansion btrfs: struct-funcs, constify readers Btrfs: fix emptiness check for dirtied extent buffers at check_leaf() Btrfs: memset to avoid stale content in btree leaf Btrfs: kill BUG_ON in run_delayed_tree_ref Btrfs: improve check_node to avoid reading corrupted nodes Btrfs: memset to avoid stale content in btree node block Btrfs: fix BUG_ON in btrfs_mark_buffer_dirty Btrfs: check btree node's nritems Btrfs: detect corruption when non-root leaf has zero item Btrfs: fix em leak in find_first_block_group Btrfs: check inconsistence between chunk and block group Btrfs: add validadtion checks for chunk loading btrfs: Enhance chunk validation check btrfs: cleanup, stop casting for extent_map->lookup everywhere ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225 UPSTREAM: virtio: new feature to detect IOMMU device quirk UPSTREAM: vring: Use the DMA API on Xen UPSTREAM: virtio_ring: Support DMA APIs UPSTREAM: vring: Introduce vring_use_dma_api() ANDROID: cuttlefish_defconfig: Enable vsock options UPSTREAM: vhost/vsock: fix reset orphans race with close timeout UPSTREAM: vhost/vsock: fix use-after-free in network stack callers UPSTREAM: vhost: correctly check the iova range when waking virtqueue UPSTREAM: vhost: synchronize IOTLB message with dev cleanup UPSTREAM: vhost: fix info leak due to uninitialized memory UPSTREAM: vhost: fix vhost_vq_access_ok() log check UPSTREAM: vhost: validate log when IOTLB is enabled UPSTREAM: vhost_net: add missing lock nesting notation UPSTREAM: vhost: use mutex_lock_nested() in vhost_dev_lock_vqs() UPSTREAM: vhost/vsock: fix uninitialized vhost_vsock->guest_cid UPSTREAM: vhost_net: correctly check tx avail during rx busy polling UPSTREAM: vsock: use new wait API for vsock_stream_sendmsg() UPSTREAM: vsock: cancel packets when failing to connect UPSTREAM: vhost-vsock: add pkt cancel capability UPSTREAM: vsock: track pkt owner vsock UPSTREAM: vhost: fix initialization for vq->is_le UPSTREAM: vhost/vsock: handle vhost_vq_init_access() error UPSTREAM: vsock: lookup and setup guest_cid inside vhost_vsock_lock UPSTREAM: vhost-vsock: fix orphan connection reset UPSTREAM: vsock/virtio: fix src/dst cid format UPSTREAM: VSOCK: Don't dec ack backlog twice for rejected connections UPSTREAM: vhost/vsock: drop space available check for TX vq UPSTREAM: virtio-vsock: fix include guard typo UPSTREAM: vhost/vsock: fix vhost virtio_vsock_pkt use-after-free UPSTREAM: VSOCK: Use kvfree() BACKPORT: vhost: split out vringh Kconfig UPSTREAM: vhost: drop vringh dependency UPSTREAM: vhost: drop vringh dependency UPSTREAM: vhost: detect 32 bit integer wrap around UPSTREAM: VSOCK: Add Makefile and Kconfig UPSTREAM: VSOCK: Introduce vhost_vsock.ko UPSTREAM: VSOCK: Introduce virtio_transport.ko BACKPORT: VSOCK: Introduce virtio_vsock_common.ko UPSTREAM: VSOCK: defer sock removal to transports UPSTREAM: VSOCK: transport-specific vsock_transport functions UPSTREAM: vsock: make listener child lock ordering explicit UPSTREAM: vhost: new device IOTLB API BACKPORT: vhost: convert pre sorted vhost memory array to interval tree UPSTREAM: vhost: introduce vhost memory accessors UPSTREAM: vhost_net: stop polling socket during rx processing UPSTREAM: VSOCK: constify vsock_transport structure UPSTREAM: vhost: lockless enqueuing UPSTREAM: vhost: simplify work flushing UPSTREAM: VSOCK: Only check error on skb_recv_datagram when skb is NULL BACKPORT: AF_VSOCK: Shrink the area influenced by prepare_to_wait UPSTREAM: vhost_net: basic polling support UPSTREAM: vhost: introduce vhost_vq_avail_empty() UPSTREAM: vhost: introduce vhost_has_work() UPSTREAM: vhost: rename vhost_init_used() UPSTREAM: vhost: rename cross-endian helpers UPSTREAM: vhost: fix error path in vhost_init_used() UPSTREAM: virtio: make find_vqs() checkpatch.pl-friendly UPSTREAM: net: move napi_hash[] into read mostly section ANDROID: cuttlefish_defconfig: remove DM_VERITY_HASH_PREFETCH_MIN_SIZE Revert "ANDROID: dm verity: add minimum prefetch size" ANDROID: f2fs: Complement "android_fs" tracepoint of read path Removed config DM_VERITY_HASH_PREFETCH_MIN_SIZE in defconfig files as this feature got reverted. Change-Id: I9117e3080eaf0e0c99888468037855fc7713ff88 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-01-15UPSTREAM: VSOCK: Introduce vhost_vsock.koAsias He
VM sockets vhost transport implementation. This driver runs on the host. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 433fc58e6bf2c8bd97e57153ed28e64fd78207b8) Bug: 121166534 Test: Ran cuttlefish with android-4.4 + VSOCKETS, VMWARE_VMCI_VSOCKETS Signed-off-by: Cody Schuffelen <schuffelen@google.com> Change-Id: Id90d852ffd498a7d89075cddb6d8ed0b9af5e69f
2019-01-15UPSTREAM: VSOCK: Introduce virtio_transport.koAsias He
VM sockets virtio transport implementation. This driver runs in the guest. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 0ea9e1d3a9e3ef7d2a1462d3de6b95131dc7d872) Bug: 121166534 Test: Ran cuttlefish with android-4.4 + VSOCKETS, VMWARE_VMCI_VSOCKETS Signed-off-by: Cody Schuffelen <schuffelen@google.com> Change-Id: Ib12e1e4d21183ac3d917316566694758717596bd
2019-01-15BACKPORT: VSOCK: Introduce virtio_vsock_common.koAsias He
This module contains the common code and header files for the following virtio_transporto and vhost_vsock kernel modules. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 06a8fc78367d070720af960dcecec917d3ae5f3b) [astrachan: Backported around stable backport 62209d1 ("vsock: split dwork to avoid reinitializations")] Bug: 121166534 Test: Ran cuttlefish with android-4.4 + VSOCKETS, VMWARE_VMCI_VSOCKETS Signed-off-by: Cody Schuffelen <schuffelen@google.com> Change-Id: I723c073db804663ad4bf83b657c72b16cbdb220a
2018-12-03Merge android-4.4.166 (4c4bedf) into msm-4.4Srinivasarao P
* refs/heads/tmp-4c4bedf Linux 4.4.166 drm/ast: Remove existing framebuffers before loading driver s390/mm: Check for valid vma before zapping in gmap_discard namei: allow restricted O_CREAT of FIFOs and regular files sched/core: Allow __sched_setscheduler() in interrupts when PI is not used btrfs: Ensure btrfs_trim_fs can trim the whole filesystem usb: xhci: fix uninitialized completion when USB3 port got wrong status tty: wipe buffer if not echoing data tty: wipe buffer. iwlwifi: mvm: fix regulatory domain update when the firmware starts scsi: qla2xxx: do not queue commands when unloading scsi: ufshcd: release resources if probe fails scsi: ufs: fix race between clock gating and devfreq scaling work scsi: ufshcd: Fix race between clk scaling and ungate work scsi: ufs: fix bugs related to null pointer access and array size netfilter: nf_tables: fix oops when inserting an element into a verdict map mwifiex: fix p2p device doesn't find in scan problem mwifiex: Fix NULL pointer dereference in skb_dequeue() cw1200: Don't leak memory if krealloc failes Input: xpad - add support for Xbox1 PDP Camo series gamepad Input: xpad - fix GPD Win 2 controller name Input: xpad - add GPD Win 2 Controller USB IDs Input: xpad - avoid using __set_bit() for capabilities Input: xpad - fix some coding style issues Input: xpad - add PDP device id 0x02a4 Input: xpad - add support for PDP Xbox One controllers Input: xpad - validate USB endpoint type during probe Input: xpad - fix PowerA init quirk for some gamepad models Input: xpad - constify usb_device_id Input: xpad - sync supported devices with XBCD Input: xpad - sync supported devices with 360Controller Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth Input: xpad - sync supported devices with xboxdrv Input: xpad - sort supported devices by USB ID Input: xpad - support some quirky Xbox One pads Input: xpad - restore LED state after device resume Input: xpad - fix stuck mode button on Xbox One S pad Input: xpad - don't depend on endpoint order Input: xpad - simplify error condition in init_output Input: xpad - move reporting xbox one home button to common function Input: xpad - correctly sort vendor id's Input: xpad - fix Xbox One rumble stopping after 2.5 secs Input: xpad - add product ID for Xbox One S pad Input: xpad - power off wireless 360 controllers on suspend Input: xpad - fix rumble on Xbox One controllers with 2015 firmware Input: xpad - xbox one elite controller support Input: xpad - add more third-party controllers Input: xpad - prevent spurious input from wired Xbox 360 controllers Input: xpad - add Mad Catz FightStick TE 2 VID/PID Input: xpad - remove unused function Input: xpad - correct xbox one pad device name Input: xpad - use LED API when identifying wireless controllers Input: xpad - workaround dead irq_out after suspend/ resume Input: xpad - update Xbox One Force Feedback Support Input: xpad - handle "present" and "gone" correctly Input: xpad - remove spurious events of wireless xpad 360 controller ath10k: fix kernel panic due to race in accessing arvif list arm64: remove no-op -p linker flag x86/entry/64: Remove %ebx handling from error_entry/exit x86/entry: spell EBX register correctly in documentation net: bcmgenet: fix OF child-node lookup NFC: nfcmrvl_uart: fix OF child-node lookup of: add helper to lookup compatible child node tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset powerpc/numa: Suppress "VPHN is not supported" messages kdb: Use strscpy with destination buffer size SUNRPC: Fix a bogus get/put in generic_key_to_expire() cpufreq: imx6q: add return value check for voltage scale KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE usb: xhci: Prevent bus suspend if a port connect change or polling state is detected can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb() drm/ast: fixed cursor may disappear sometimes drm/ast: change resolution may cause screen blurred llc: do not use sk_eat_skb() gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer bfs: add sanity check at bfs_fill_super() v9fs_dir_readdir: fix double-free on p9stat_read error iwlwifi: mvm: support sta_statistics() even on older firmware MAINTAINERS: Add Sasha as a stable branch maintainer usb: xhci: fix timeout for transition from RExit to U0 usb: core: Fix hub port connection events lost ANDROID: arm64 defconfig / build config for cuttlefish ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" ANDROID: sdcardfs: Add option to not link obb ANDROID: sdcardfs: Add sandbox UPSTREAM: seccomp: Fix tracer exit notifications during fatal signals UPSTREAM: arm64/ptrace: run seccomp after ptrace UPSTREAM: arm/ptrace: run seccomp after ptrace BACKPORT: x86/ptrace: run seccomp after ptrace UPSTREAM: seccomp: recheck the syscall after RET_TRACE UPSTREAM: seccomp: remove 2-phase API BACKPORT: x86/entry: Get rid of two-phase syscall entry work BACKPORT: seccomp: Add a seccomp_data parameter secure_computing() BACKPORT: x86/entry/64: Always run ptregs-using syscalls on the slow path UPSTREAM: x86/syscalls: Add syscall entry qualifiers UPSTREAM: x86/syscalls: Move compat syscall entry handling into syscalltbl.sh UPSTREAM: x86/syscalls: Remove __SYSCALL_COMMON and __SYSCALL_X32 UPSTREAM: x86/syscalls: Refactor syscalltbl.sh Makefile: Tidy up 4.4.165 merge Conflicts: drivers/scsi/ufs/ufshcd.c Change-Id: I18bf85f3f24b37e8bb0839bd43eba65cc7eafc64 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-12-01Merge 4.4.166 into android-4.4-pGreg Kroah-Hartman
Changes in 4.4.166 usb: core: Fix hub port connection events lost usb: xhci: fix timeout for transition from RExit to U0 MAINTAINERS: Add Sasha as a stable branch maintainer iwlwifi: mvm: support sta_statistics() even on older firmware v9fs_dir_readdir: fix double-free on p9stat_read error bfs: add sanity check at bfs_fill_super() sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd llc: do not use sk_eat_skb() drm/ast: change resolution may cause screen blurred drm/ast: fixed cursor may disappear sometimes can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb() can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb usb: xhci: Prevent bus suspend if a port connect change or polling state is detected KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE cpufreq: imx6q: add return value check for voltage scale SUNRPC: Fix a bogus get/put in generic_key_to_expire() kdb: Use strscpy with destination buffer size powerpc/numa: Suppress "VPHN is not supported" messages tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset of: add helper to lookup compatible child node NFC: nfcmrvl_uart: fix OF child-node lookup net: bcmgenet: fix OF child-node lookup x86/entry: spell EBX register correctly in documentation x86/entry/64: Remove %ebx handling from error_entry/exit arm64: remove no-op -p linker flag ath10k: fix kernel panic due to race in accessing arvif list Input: xpad - remove spurious events of wireless xpad 360 controller Input: xpad - handle "present" and "gone" correctly Input: xpad - update Xbox One Force Feedback Support Input: xpad - workaround dead irq_out after suspend/ resume Input: xpad - use LED API when identifying wireless controllers Input: xpad - correct xbox one pad device name Input: xpad - remove unused function Input: xpad - add Mad Catz FightStick TE 2 VID/PID Input: xpad - prevent spurious input from wired Xbox 360 controllers Input: xpad - add more third-party controllers Input: xpad - xbox one elite controller support Input: xpad - fix rumble on Xbox One controllers with 2015 firmware Input: xpad - power off wireless 360 controllers on suspend Input: xpad - add product ID for Xbox One S pad Input: xpad - fix Xbox One rumble stopping after 2.5 secs Input: xpad - correctly sort vendor id's Input: xpad - move reporting xbox one home button to common function Input: xpad - simplify error condition in init_output Input: xpad - don't depend on endpoint order Input: xpad - fix stuck mode button on Xbox One S pad Input: xpad - restore LED state after device resume Input: xpad - support some quirky Xbox One pads Input: xpad - sort supported devices by USB ID Input: xpad - sync supported devices with xboxdrv Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth Input: xpad - sync supported devices with 360Controller Input: xpad - sync supported devices with XBCD Input: xpad - constify usb_device_id Input: xpad - fix PowerA init quirk for some gamepad models Input: xpad - validate USB endpoint type during probe Input: xpad - add support for PDP Xbox One controllers Input: xpad - add PDP device id 0x02a4 Input: xpad - fix some coding style issues Input: xpad - avoid using __set_bit() for capabilities Input: xpad - add GPD Win 2 Controller USB IDs Input: xpad - fix GPD Win 2 controller name Input: xpad - add support for Xbox1 PDP Camo series gamepad cw1200: Don't leak memory if krealloc failes mwifiex: Fix NULL pointer dereference in skb_dequeue() mwifiex: fix p2p device doesn't find in scan problem netfilter: nf_tables: fix oops when inserting an element into a verdict map scsi: ufs: fix bugs related to null pointer access and array size scsi: ufshcd: Fix race between clk scaling and ungate work scsi: ufs: fix race between clock gating and devfreq scaling work scsi: ufshcd: release resources if probe fails scsi: qla2xxx: do not queue commands when unloading iwlwifi: mvm: fix regulatory domain update when the firmware starts tty: wipe buffer. tty: wipe buffer if not echoing data usb: xhci: fix uninitialized completion when USB3 port got wrong status btrfs: Ensure btrfs_trim_fs can trim the whole filesystem sched/core: Allow __sched_setscheduler() in interrupts when PI is not used namei: allow restricted O_CREAT of FIFOs and regular files s390/mm: Check for valid vma before zapping in gmap_discard drm/ast: Remove existing framebuffers before loading driver Linux 4.4.166 Change-Id: I27e4a45948cb7b5f9b6c44756dab9f56add70a43 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-12-01Merge 4.4.166 into android-4.4Greg Kroah-Hartman
Changes in 4.4.166 usb: core: Fix hub port connection events lost usb: xhci: fix timeout for transition from RExit to U0 MAINTAINERS: Add Sasha as a stable branch maintainer iwlwifi: mvm: support sta_statistics() even on older firmware v9fs_dir_readdir: fix double-free on p9stat_read error bfs: add sanity check at bfs_fill_super() sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd llc: do not use sk_eat_skb() drm/ast: change resolution may cause screen blurred drm/ast: fixed cursor may disappear sometimes can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb() can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb usb: xhci: Prevent bus suspend if a port connect change or polling state is detected KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE cpufreq: imx6q: add return value check for voltage scale SUNRPC: Fix a bogus get/put in generic_key_to_expire() kdb: Use strscpy with destination buffer size powerpc/numa: Suppress "VPHN is not supported" messages tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset of: add helper to lookup compatible child node NFC: nfcmrvl_uart: fix OF child-node lookup net: bcmgenet: fix OF child-node lookup x86/entry: spell EBX register correctly in documentation x86/entry/64: Remove %ebx handling from error_entry/exit arm64: remove no-op -p linker flag ath10k: fix kernel panic due to race in accessing arvif list Input: xpad - remove spurious events of wireless xpad 360 controller Input: xpad - handle "present" and "gone" correctly Input: xpad - update Xbox One Force Feedback Support Input: xpad - workaround dead irq_out after suspend/ resume Input: xpad - use LED API when identifying wireless controllers Input: xpad - correct xbox one pad device name Input: xpad - remove unused function Input: xpad - add Mad Catz FightStick TE 2 VID/PID Input: xpad - prevent spurious input from wired Xbox 360 controllers Input: xpad - add more third-party controllers Input: xpad - xbox one elite controller support Input: xpad - fix rumble on Xbox One controllers with 2015 firmware Input: xpad - power off wireless 360 controllers on suspend Input: xpad - add product ID for Xbox One S pad Input: xpad - fix Xbox One rumble stopping after 2.5 secs Input: xpad - correctly sort vendor id's Input: xpad - move reporting xbox one home button to common function Input: xpad - simplify error condition in init_output Input: xpad - don't depend on endpoint order Input: xpad - fix stuck mode button on Xbox One S pad Input: xpad - restore LED state after device resume Input: xpad - support some quirky Xbox One pads Input: xpad - sort supported devices by USB ID Input: xpad - sync supported devices with xboxdrv Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth Input: xpad - sync supported devices with 360Controller Input: xpad - sync supported devices with XBCD Input: xpad - constify usb_device_id Input: xpad - fix PowerA init quirk for some gamepad models Input: xpad - validate USB endpoint type during probe Input: xpad - add support for PDP Xbox One controllers Input: xpad - add PDP device id 0x02a4 Input: xpad - fix some coding style issues Input: xpad - avoid using __set_bit() for capabilities Input: xpad - add GPD Win 2 Controller USB IDs Input: xpad - fix GPD Win 2 controller name Input: xpad - add support for Xbox1 PDP Camo series gamepad cw1200: Don't leak memory if krealloc failes mwifiex: Fix NULL pointer dereference in skb_dequeue() mwifiex: fix p2p device doesn't find in scan problem netfilter: nf_tables: fix oops when inserting an element into a verdict map scsi: ufs: fix bugs related to null pointer access and array size scsi: ufshcd: Fix race between clk scaling and ungate work scsi: ufs: fix race between clock gating and devfreq scaling work scsi: ufshcd: release resources if probe fails scsi: qla2xxx: do not queue commands when unloading iwlwifi: mvm: fix regulatory domain update when the firmware starts tty: wipe buffer. tty: wipe buffer if not echoing data usb: xhci: fix uninitialized completion when USB3 port got wrong status btrfs: Ensure btrfs_trim_fs can trim the whole filesystem sched/core: Allow __sched_setscheduler() in interrupts when PI is not used namei: allow restricted O_CREAT of FIFOs and regular files s390/mm: Check for valid vma before zapping in gmap_discard drm/ast: Remove existing framebuffers before loading driver Linux 4.4.166 Change-Id: Iba8f0b45bc490f291b504ebb12590b2b01d4f075 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-12-01MAINTAINERS: Add Sasha as a stable branch maintainerGreg Kroah-Hartman
commit cb5d21946d2a2f4687c482ab4604af1d29dac35a upstream. Sasha has somehow been convinced into helping me with the stable kernel maintenance. Codify this slip in good judgement before he realizes what he really signed up for :) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-01Merge android-4.4.116 (20ddb25) into msm-4.4Srinivasarao P
* refs/heads/tmp-20ddb25 Linux 4.4.116 ftrace: Remove incorrect setting of glob search field mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy ovl: fix failure to fsync lower dir ACPI: sbshc: remove raw pointer from printk() message nvme: Fix managing degraded controllers btrfs: Handle btrfs_set_extent_delalloc failure in fixup worker pktcdvd: Fix pkt_setup_dev() error path EDAC, octeon: Fix an uninitialized variable warning xtensa: fix futex_atomic_cmpxchg_inatomic alpha: fix reboot on Avanti platform alpha: fix crash if pthread_create races with signal delivery signal/sh: Ensure si_signo is initialized in do_divide_error signal/openrisc: Fix do_unaligned_access to send the proper signal Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version Revert "Bluetooth: btusb: fix QCA Rome suspend/resume" Bluetooth: btsdio: Do not bind to non-removable BCM43341 HID: quirks: Fix keyboard + touchpad on Toshiba Click Mini not working kernel/async.c: revert "async: simplify lowest_in_progress()" media: cxusb, dib0700: ignore XC2028_I2C_FLUSH media: ts2020: avoid integer overflows on 32 bit machines watchdog: imx2_wdt: restore previous timeout after suspend+resume KVM: nVMX: Fix races when sending nested PI while dest enters/leaves L2 arm: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls crypto: caam - fix endless loop when DECO acquire fails media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32 media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32 media: v4l2-compat-ioctl32.c: avoid sizeof(type) media: v4l2-compat-ioctl32.c: move 'helper' functions to __get/put_v4l2_format32 media: v4l2-compat-ioctl32.c: fix the indentation media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF vb2: V4L2_BUF_FLAG_DONE is set after DQBUF media: v4l2-ioctl.c: don't copy back the result for -ENOTTY nsfs: mark dentry with DCACHE_RCUACCESS crypto: poly1305 - remove ->setkey() method crypto: cryptd - pass through absence of ->setkey() crypto: hash - introduce crypto_hash_alg_has_setkey() ahci: Add Intel Cannon Lake PCH-H PCI ID ahci: Add PCI ids for Intel Bay Trail, Cherry Trail and Apollo Lake AHCI ahci: Annotate PCI ids for mobile Intel chipsets as such kernfs: fix regression in kernfs_fop_write caused by wrong type NFS: reject request for id_legacy key without auxdata NFS: commit direct writes even if they fail partially NFS: Add a cond_resched() to nfs_commit_release_pages() nfs/pnfs: fix nfs_direct_req ref leak when i/o falls back to the mds ubi: block: Fix locking for idr_alloc/idr_remove mtd: nand: sunxi: Fix ECC strength choice mtd: nand: Fix nand_do_read_oob() return value mtd: nand: brcmnand: Disable prefetch by default mtd: cfi: convert inline functions to macros media: dvb-usb-v2: lmedm04: move ts2020 attach to dm04_lme2510_tuner media: dvb-usb-v2: lmedm04: Improve logic checking of warm start dccp: CVE-2017-8824: use-after-free in DCCP code sched/rt: Up the root domain ref count when passing it around via IPIs sched/rt: Use container_of() to get root domain in rto_push_irq_work_func() usb: gadget: uvc: Missing files for configfs interface posix-timer: Properly check sigevent->sigev_notify netfilter: nf_queue: Make the queue_handler pernet kaiser: fix compile error without vsyscall x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER dmaengine: dmatest: fix container_of member in dmatest_callback CIFS: zero sensitive data when freeing cifs: Fix autonegotiate security settings mismatch cifs: Fix missing put_xid in cifs_file_strict_mmap powerpc/pseries: include linux/types.h in asm/hvcall.h x86/microcode: Do the family check first x86/microcode/AMD: Do not load when running on a hypervisor crypto: tcrypt - fix S/G table for test_aead_speed() don't put symlink bodies in pagecache into highmem KEYS: encrypted: fix buffer overread in valid_master_desc() media: soc_camera: soc_scale_crop: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE vhost_net: stop device during reset owner tcp: release sk_frag.page in tcp_disconnect r8169: fix RTL8168EP take too long to complete driver initialization. qlcnic: fix deadlock bug net: igmp: add a missing rcu locking section ip6mr: fix stale iterator x86/asm: Fix inline asm call constraints for GCC 4.4 drm: rcar-du: Fix race condition when disabling planes at CRTC stop drm: rcar-du: Use the VBK interrupt for vblank events ASoC: rsnd: avoid duplicate free_irq() ASoC: rsnd: don't call free_irq() on Parent SSI ASoC: simple-card: Fix misleading error message net: cdc_ncm: initialize drvflags before usage usbip: fix 3eee23c3ec14 tcp_socket address still in the status file usbip: vhci_hcd: clear just the USB_PORT_STAT_POWER bit ASoC: pcm512x: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE powerpc/64s: Allow control of RFI flush via debugfs powerpc/64s: Wire up cpu_show_meltdown() powerpc/powernv: Check device-tree for RFI flush settings powerpc/pseries: Query hypervisor for RFI flush settings powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti powerpc/64s: Add support for RFI flush of L1-D cache powerpc/64s: Convert slb_miss_common to use RFI_TO_USER/KERNEL powerpc/64: Convert the syscall exit path to use RFI_TO_USER/KERNEL powerpc/64: Convert fast_exception_return to use RFI_TO_USER/KERNEL powerpc/64s: Simple RFI macro conversions powerpc/64: Add macros for annotating the destination of rfid/hrfid powerpc/pseries: Add H_GET_CPU_CHARACTERISTICS flags & wrapper powerpc: Simplify module TOC handling powerpc: Fix VSX enabling/flushing to also test MSR_FP and MSR_VEC powerpc/64: Fix flush_(d|i)cache_range() called from modules powerpc/bpf/jit: Disable classic BPF JIT on ppc64le BACKPORT: xfrm: Fix return value check of copy_sec_ctx. time: Fix ktime_get_raw() incorrect base accumulation sched/fair: prevent possible infinite loop in sched_group_energy UPSTREAM: MIPS: Fix build of compressed image ANDROID: qtaguid: Fix the UAF probelm with tag_ref_tree UPSTREAM: ANDROID: binder: remove waitqueue when thread exits. UPSTREAM: arm64/efi: Make strnlen() available to the EFI namespace UPSTREAM: ARM: boot: Add an implementation of strnlen for libfdt ANDROID: MIPS: Add ranchu[32r5|32r6|64]_defconfig FROMLIST: tty: goldfish: Enable 'earlycon' only if built-in FROMLIST: MIPS: ranchu: Add Ranchu as a new generic-based board FROMLIST: MIPS: Add noexec=on|off kernel parameter FROMLIST: MIPS: CPC: Map registers using DT in mips_cpc_default_phys_base() FROMLIST: dt-bindings: Document mti,mips-cpc binding FROMLIST: MIPS: math-emu: Mark fall throughs in switch statements with a comment FROMLIST: MIPS: math-emu: Avoid multiple assignment FROMLIST: MIPS: math-emu: Avoid an assignment within if statement condition FROMLIST: MIPS: math-emu: Declare function srl128() as static FROMLIST: MIPS: math-emu: Avoid definition duplication for macro DPXMULT() FROMLIST: MIPS: math-emu: Remove an unnecessary header inclusion UPSTREAM: scripts/dtc: Update to upstream version 0931cea3ba20 UPSTREAM: scripts/dtc: dt_to_config - kernel config options for a devicetree UPSTREAM: scripts/dtc: Update to upstream version 53bf130b1cdd UPSTREAM: scripts/dtc: Update to upstream commit b06e55c88b9b UPSTREAM: scripts/dtc: dtx_diff - add info to error message UPSTREAM: dtc: create tool to diff device trees UPSTREAM: config: android-base: disable CONFIG_NFSD and CONFIG_NFS_FS UPSTREAM: config: android-base: add CGROUP_BPF UPSTREAM: config: android-base: add CONFIG_MODULES option UPSTREAM: config: android-base: add CONFIG_IKCONFIG option UPSTREAM: config: android-base: disable CONFIG_USELIB and CONFIG_FHANDLE UPSTREAM: config: android-base: enable hardened usercopy and kernel ASLR UPSTREAM: config: android: enable CONFIG_SECCOMP UPSTREAM: config: android: set SELinux as default security mode UPSTREAM: config: android: move device mapper options to recommended UPSTREAM: config/android: Remove CONFIG_IPV6_PRIVACY UPSTREAM: config: add android config fragments BACKPORT: MIPS: generic: Add a MAINTAINERS entry BACKPORT: irqchip/irq-goldfish-pic: Add Goldfish PIC driver UPSTREAM: dt-bindings/goldfish-pic: Add device tree binding for Goldfish PIC driver UPSTREAM: MIPS: Allow storing pgd in C0_CONTEXT for MIPSr6 UPSTREAM: MIPS: CPS: Handle spurious VP starts more gracefully UPSTREAM: MIPS: CPS: Handle cores not powering down more gracefully UPSTREAM: MIPS: CPS: Prevent multi-core with dcache aliasing UPSTREAM: MIPS: CPS: Select CONFIG_SYS_SUPPORTS_SCHED_SMT for MIPSr6 UPSTREAM: MIPS: CM: WARN on attempt to lock invalid VP, not BUG UPSTREAM: MIPS: CM: Avoid per-core locking with CM3 & higher UPSTREAM: MIPS: smp-cps: Avoid BUG() when offlining pre-r6 CPUs UPSTREAM: MIPS: smp-cps: Add support for CPU hotplug of MIPSr6 processors UPSTREAM: MIPS: generic: Bump default NR_CPUS to 16 UPSTREAM: MIPS: pm-cps: Change FSB workaround to CPU blacklist UPSTREAM: MIPS: Fix early CM probing UPSTREAM: MIPS: smp-cps: Stop printing EJTAG exceptions to UART UPSTREAM: MIPS: smp-cps: Add nothreads kernel parameter UPSTREAM: MIPS: smp-cps: Support MIPSr6 Virtual Processors UPSTREAM: MIPS: smp-cps: Skip core setup if coherent UPSTREAM: MIPS: smp-cps: Pull boot config retrieval out of mips_cps_boot_vpes UPSTREAM: MIPS: smp-cps: Pull cache init into a function UPSTREAM: MIPS: smp-cps: Ensure our VP ident calculation is correct UPSTREAM: irqchip: mips-gic: Provide VP ID accessor UPSTREAM: irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR UPSTREAM: MIPS: CM: Fix mips_cm_max_vp_width for UP kernels UPSTREAM: MIPS: CM: Add CM GCR_BEV_BASE accessors UPSTREAM: MIPS: CPC: Add start, stop and running CM3 CPC registers UPSTREAM: MIPS: pm-cps: Avoid offset overflow on MIPSr6 UPSTREAM: MIPS: traps: Make sure secondary cores have a sane ebase register UPSTREAM: MIPS: Detect MIPSr6 Virtual Processor support UPSTREAM: Documentation: Add device tree binding for Goldfish FB driver UPSTREAM: MIPS: math-emu: Use preferred flavor of unsigned integer declarations UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.D: Fix accuracy (64-bit case) UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.S: Fix accuracy (32-bit case) UPSTREAM: MIPS: Update Goldfish RTC driver maintainer email address UPSTREAM: MIPS: Update RINT emulation maintainer email address UPSTREAM: MIPS: math-emu: do not use bools for arithmetic UPSTREAM: rtc: goldfish: Add RTC driver for Android emulator BACKPORT: dt-bindings: Add device tree binding for Goldfish RTC driver UPSTREAM: tty: goldfish: Implement support for kernel 'earlycon' parameter UPSTREAM: tty: goldfish: Use streaming DMA for r/w operations on Ranchu platforms UPSTREAM: tty: goldfish: Refactor constants to better reflect their nature UPSTREAM: MIPS: math-emu: Add FP emu debugfs stats for individual instructions UPSTREAM: MIPS: math-emu: Add FP emu debugfs clear functionality UPSTREAM: MIPS: math-emu: Add FP emu debugfs statistics for branches BACKPORT: MIPS: math-emu: CLASS.D: Zero bits 32-63 of the result BACKPORT: MIPS: math-emu: RINT.<D|S>: Fix several problems by reimplementation UPSTREAM: MIPS: math-emu: CMP.Sxxx.<D|S>: Prevent occurrences of SIGILL crashes UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Clean up "maddf_flags" enumeration UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix some cases of zero inputs UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix some cases of infinite inputs UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix NaN propagation UPSTREAM: tty: goldfish: Fix a parameter of a call to free_irq UPSTREAM: MIPS: VDSO: Fix clobber lists in fallback code paths UPSTREAM: MIPS: VDSO: Fix a mismatch between comment and preprocessor constant UPSTREAM: MIPS: VDSO: Add implementation of gettimeofday() fallback UPSTREAM: MIPS: VDSO: Add implementation of clock_gettime() fallback UPSTREAM: MIPS: VDSO: Fix conversions in do_monotonic()/do_monotonic_coarse() UPSTREAM: MIPS: unaligned: Add DSP lwx & lhx missaligned access support UPSTREAM: MIPS: build: Fix "-modd-spreg" switch usage when compiling for mips32r6 UPSTREAM: MIPS: cmdline: Add support for 'memmap' parameter UPSTREAM: MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately UPSTREAM: MIPS: Support per-device DMA coherence UPSTREAM: MIPS: dma-default: Don't check hw_coherentio if device is non-coherent UPSTREAM: MIPS: Sanitise coherentio semantics UPSTREAM: MIPS: CPC: Provide default mips_cpc_default_phys_base to ignore CPC UPSTREAM: MIPS: generic: Introduce generic DT-based board support UPSTREAM: MIPS: Support generating Flattened Image Trees (.itb) UPSTREAM: MIPS: Allow emulation for unaligned [LS]DXC1 instructions UPSTREAM: MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling UPSTREAM: MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters UPSTREAM: MIPS: r2-on-r6-emu: Fix BLEZL and BGTZL identification UPSTREAM: MIPS: remove aliasing alignment if HW has antialising support BACKPORT: MIPS: store the appended dtb address in a variable UPSTREAM: MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue UPSTREAM: MIPS: kernel: Audit and remove any unnecessary uses of module.h UPSTREAM: MIPS: c-r4k: Fix sigtramp SMP call to use kmap UPSTREAM: MIPS: c-r4k: Fix protected_writeback_scache_line for EVA UPSTREAM: MIPS: Spelling fix lets -> let's UPSTREAM: MIPS: R6: Fix typo UPSTREAM: MIPS: traps: Correct the SIGTRAP debug ABI in `do_watch' and `do_trap_or_bp' UPSTREAM: MIPS: inst.h: Rename cbcond{0,1}_op to pop{1,3}0_op UPSTREAM: MIPS: inst.h: Rename b{eq,ne}zcji[al]c_op to pop{6,7}6_op UPSTREAM: MIPS: math-emu: Fix m{add,sub}.s shifts UPSTREAM: MIPS: inst: Declare fsel_op for sel.fmt instruction UPSTREAM: MIPS: math-emu: Fix code indentation UPSTREAM: MIPS: math-emu: Fix bit-width in ieee754dp_{mul, maddf, msubf} comments UPSTREAM: MIPS: math-emu: Add z argument macros UPSTREAM: MIPS: math-emu: Unify ieee754dp_m{add,sub}f UPSTREAM: MIPS: math-emu: Unify ieee754sp_m{add,sub}f UPSTREAM: MIPS: math-emu: Emulate MIPSr6 sel.fmt instruction UPSTREAM: MIPS: math-emu: Fix BC1{EQ,NE}Z emulation UPSTREAM: MIPS: math-emu: Always propagate sNaN payload in quieting UPSTREAM: MIPS: Fix misspellings in comments. UPSTREAM: MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation UPSTREAM: MIPS: math-emu: Add IEEE Std 754-2008 ABS.fmt and NEG.fmt emulation UPSTREAM: MIPS: non-exec stack & heap when non-exec PT_GNU_STACK is present UPSTREAM: MIPS: Add IEEE Std 754 conformance mode selection UPSTREAM: MIPS: Determine the presence of IEEE Std 754-2008 features UPSTREAM: MIPS: Define the legacy-NaN and 2008-NaN features UPSTREAM: MIPS: ELF: Interpret the NAN2008 file header flag UPSTREAM: ELF: Also pass any interpreter's file header to `arch_check_elf' UPSTREAM: MIPS: Use a union to access the ELF file header UPSTREAM: MIPS: Fix delay slot emulation count in debugfs BACKPORT: exit_thread: accept a task parameter to be exited UPSTREAM: mn10300: let exit_fpu accept a task UPSTREAM: MIPS: Use per-mm page to execute branch delay slot instructions BACKPORT: s390: get rid of exit_thread() BACKPORT: exit_thread: remove empty bodies UPSTREAM: MIPS: Make flush_thread UPSTREAM: MIPS: Properly disable FPU in start_thread() UPSTREAM: MIPS: Select CONFIG_HANDLE_DOMAIN_IRQ and make it work. UPSTREAM: MIPS: math-emu: Fix typo UPSTREAM: MIPS: math-emu: dsemul: Remove an unused bit in ADDIUPC emulation UPSTREAM: MIPS: math-emu: dsemul: Reduce `get_isa16_mode' clutter UPSTREAM: MIPS: math-emu: dsemul: Correct description of the emulation frame UPSTREAM: MIPS: math-emu: Correct the emulation of microMIPS ADDIUPC instruction UPSTREAM: MIPS: math-emu: Make microMIPS branch delay slot emulation work UPSTREAM: MIPS: math-emu: dsemul: Fix ill formatting of microMIPS part UPSTREAM: MIPS: math-emu: Correctly handle NOP emulation Conflicts: drivers/irqchip/Kconfig drivers/irqchip/Makefile drivers/media/v4l2-core/v4l2-compat-ioctl32.c Change-Id: I98374358ab24ce80dba3afa2f4562c71f45b7aab Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-02-05FROMLIST: MIPS: ranchu: Add Ranchu as a new generic-based boardMiodrag Dinic
Provide amendments to the MIPS generic platform framework so that the new generic-based board Ranchu can be chosen to be built. The Ranchu board is intended to be used by Android emulator. The name "Ranchu" originates from Android development community. "Goldfish" and "Ranchu" are terms used for two generations of virtual boards used by Android emulator. The name "Ranchu" is a newer one among the two, and this patch deals with Ranchu. However, for historical reasons, some devices/drivers still contain the name "Goldfish". MIPS Ranchu machine includes a number of Goldfish devices. The support for Virtio devices is also included. Ranchu board supports up to 16 Virtio devices which can be attached using Virtio MMIO Bus. This is summarized in the following picture: ABUS ||----MIPS CPU || | IRQs ||----Goldfish PIC------------(32)-------- || | | | | | | | | | ||----Goldfish TTY------ | | | | | | | | || | | | | | | | | ||----Goldfish RTC-------- | | | | | | | || | | | | | | | ||----Goldfish FB----------- | | | | | | || | | | | | | ||----Goldfish Events--------- | | | | | || | | | | | ||----Goldfish Audio------------ | | | | || | | | | ||----Goldfish Battery------------ | | | || | | | ||----Android PIPE------------------ | | || | | ||----Virtio MMIO Bus | | || | | | | | || | | (virtio-block)--------- | || (16) | | || | (virtio-net)------------------ Device Tree is created on the QEMU side based on the information about devices IO map and IRQ numbers. Kernel will load this DTB using UHI boot protocol DTB handover mode. Signed-off-by: Miodrag Dinic <miodrag.dinic@mips.com> Signed-off-by: Goran Ferenc <goran.ferenc@mips.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com> Reviewed-by: James Hogan <jhogan@kernel.org> (cherry picked from: https://patchwork.linux-mips.org/patch/18138/) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05FROMLIST: dt-bindings: Document mti,mips-cpc bindingPaul Burton
Document a binding for the MIPS Cluster Power Controller (CPC) that allows the device tree to specify where the CPC registers are located. Signed-off-by: Paul Burton <paul.burton@mips.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com> Reviewed-by: Rob Herring <robh@kernel.org> (cherry picked from: https://patchwork.linux-mips.org/patch/18512/) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05UPSTREAM: config: add android config fragmentsRob Herring
Copy the config fragments from the AOSP common kernel android-4.4 branch. It is becoming possible to run mainline kernels with Android, but the kernel defconfigs don't work as-is and debugging missing config options is a pain. Adding the config fragments into the kernel tree, makes configuring a mainline kernel as simple as: make ARCH=arm multi_v7_defconfig android-base.config android-recommended.config The following non-upstream config options were removed: CONFIG_NETFILTER_XT_MATCH_QTAGUID CONFIG_NETFILTER_XT_MATCH_QUOTA2 CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG CONFIG_PPPOLAC CONFIG_PPPOPNS CONFIG_SECURITY_PERF_EVENTS_RESTRICT CONFIG_USB_CONFIGFS_F_MTP CONFIG_USB_CONFIGFS_F_PTP CONFIG_USB_CONFIGFS_F_ACC CONFIG_USB_CONFIGFS_F_AUDIO_SRC CONFIG_USB_CONFIGFS_UEVENT CONFIG_INPUT_KEYCHORD CONFIG_INPUT_KEYRESET Link: http://lkml.kernel.org/r/1466708235-28593-1-git-send-email-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Cc: Amit Pundir <amit.pundir@linaro.org> Cc: John Stultz <john.stultz@linaro.org> Cc: Dmitry Shmidt <dimitrysh@google.com> Cc: Rom Lemarchand <romlem@android.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 27eb6622ab67bad75814c9b7b08096cfb16be63a) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05BACKPORT: MIPS: generic: Add a MAINTAINERS entryPaul Burton
Add an entry to MAINTAINERS for the generic platform code, such that relevant people, starting with myself, can be CC'd on patches. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16186/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> (cherry picked from commit 032a469b1e6ef02209308a5b107c10beb4b12fb6) Conflicts: MAINTAINERS Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05BACKPORT: irqchip/irq-goldfish-pic: Add Goldfish PIC driverMiodrag Dinic
Add device driver for a virtual programmable interrupt controller The virtual PIC is designed as a device tree-based interrupt controller. The compatible string used by OS for binding the driver is "google,goldfish-pic". Signed-off-by: Miodrag Dinic <miodrag.dinic@mips.com> Signed-off-by: Goran Ferenc <goran.ferenc@mips.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> (cherry picked from commit 4235ff50cf98dd42ba15175687570f9f03e124a1) Conflicts: drivers/irqchip/Kconfig drivers/irqchip/Makefile drivers/irqchip/irq-goldfish-pic.c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05UPSTREAM: dt-bindings/goldfish-pic: Add device tree binding for Goldfish PIC ↵Miodrag Dinic
driver Add documentation for DT binding of Goldfish PIC driver. The compatible string used by OS for binding the driver is "google,goldfish-pic". Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Miodrag Dinic <miodrag.dinic@mips.com> Signed-off-by: Goran Ferenc <goran.ferenc@mips.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> (cherry picked from commit c2ba80af4805543ace4928191d877ffe706087e1) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05UPSTREAM: MIPS: Update Goldfish RTC driver maintainer email addressAleksandar Markovic
Change all relevant instances of miodrag.dinic@imgtec.com email address to miodrag.dinic@mips.com. Signed-off-by: Miodrag Dinic <miodrag.dinic@mips.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/17515/ [jhogan@kernel.org: Fix .mailmap direction] Signed-off-by: James Hogan <jhogan@kernel.org> (cherry picked from commit 0464a53eba0af434b8516c2e01d881aa587cd517) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05UPSTREAM: MIPS: Update RINT emulation maintainer email addressAleksandar Markovic
Change all relevant instances of aleksandar.markovic@imgtec.com email address to aleksandar.markovic@mips.com. Signed-off-by: Miodrag Dinic <miodrag.dinic@mips.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/17514/ Signed-off-by: James Hogan <jhogan@kernel.org> (cherry picked from commit 89677e44b26ef49fd57208c7885fdd729b3724e5) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05UPSTREAM: rtc: goldfish: Add RTC driver for Android emulatorMiodrag Dinic
Add device driver for a virtual RTC device in Android emulator. The compatible string used by OS for binding the driver is defined as "google,goldfish-rtc". Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com> Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> (cherry picked from commit f22d9cdcb5eb7ed1c4629a167474d68df0003a3d) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05BACKPORT: dt-bindings: Add device tree binding for Goldfish RTC driverAleksandar Markovic
Add documentation for DT binding of Goldfish RTC driver. The compatible string used by OS for binding the driver is "google,goldfish-rtc". Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com> Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> (cherry picked from commit 7a08de1d8fd27ac60ed8ce7a15efb88471014080) Conflicts: MAINTAINERS Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05BACKPORT: MIPS: math-emu: RINT.<D|S>: Fix several problems by reimplementationAleksandar Markovic
Reimplement RINT.<D|S> kernel emulation so that all RINT.<D|S> specifications are met. For the sake of simplicity, let's analyze RINT.S only. Prior to this patch, RINT.S emulation was essentially implemented as (in pseudocode) <output> = ieee754sp_flong(ieee754sp_tlong(<input>)), where ieee754sp_tlong() and ieee754sp_flong() are functions providing conversion from double to integer, and from integer to double, respectively. On surface, this implementation looks correct, but actually fails in many cases. Following problems were detected: 1. NaN and infinity cases will not be handled properly. The function ieee754sp_flong() never returns NaN nor infinity. 2. For RINT.S, for all inputs larger than LONG_MAX, and smaller than FLT_MAX, the result will be wrong, and the overflow exception will be erroneously set. A similar problem for negative inputs exists as well. 3. For some rounding modes, for some negative inputs close to zero, the return value will be zero, and should be -zero. This is because ieee754sp_flong() never returns -zero. This patch removes the problems above by implementing dedicated functions for RINT.<D|S> emulation. The core of the new function functionality is adapted version of the core of the function ieee754sp_tlong(). However, there are many details that are implemented to match RINT.<D|S> specification. It should be said that the functionality of ieee754sp_tlong() actually closely corresponds to CVT.L.S instruction, and it is used while emulating CVT.L.S. However, RINT.S and CVT.L.S instructions differ in many aspects. This patch fulfills missing support for RINT.<D|S>. Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com> Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com> Cc: David S. Miller <davem@davemloft.net> Cc: Douglas Leung <douglas.leung@imgtec.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Petar Jovanovic <petar.jovanovic@imgtec.com> Cc: Raghu Gandham <raghu.gandham@imgtec.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17141/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> (cherry picked from commit 3ec404d88cefbe42d96a46f20f554f8366d64c33) Conflicts: MAINTAINERS Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-01-18Merge android-4.4.106 (2fea039) into msm-4.4Srinivasarao P
* refs/heads/tmp-2fea039 Linux 4.4.106 usb: gadget: ffs: Forbid usb_ep_alloc_request from sleeping arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one Revert "x86/mm/pat: Ensure cpa->pfn only contains page frame numbers" Revert "x86/efi: Hoist page table switching code into efi_call_virt()" Revert "x86/efi: Build our own page table structures" net/packet: fix a race in packet_bind() and packet_notifier() packet: fix crash in fanout_demux_rollover() sit: update frag_off info rds: Fix NULL pointer dereference in __rds_rdma_map tipc: fix memory leak in tipc_accept_from_sock() more bio_map_user_iov() leak fixes s390: always save and restore all registers on context switch ipmi: Stop timers before cleaning up the module audit: ensure that 'audit=1' actually enables audit for PID 1 ipvlan: fix ipv6 outbound device afs: Connect up the CB.ProbeUuid IB/mlx5: Assign send CQ and recv CQ of UMR QP IB/mlx4: Increase maximal message size under UD QP xfrm: Copy policy family in clone_policy jump_label: Invoke jump_label_test() via early_initcall() atm: horizon: Fix irq release error sctp: use the right sk after waking up from wait_buf sleep sctp: do not free asoc when it is already dead in sctp_sendmsg sparc64/mm: set fields in deferred pages block: wake up all tasks blocked in get_request() sunrpc: Fix rpc_task_begin trace point NFS: Fix a typo in nfs_rename() dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead of 0 lib/genalloc.c: make the avail variable an atomic_long_t route: update fnhe_expires for redirect when the fnhe exists route: also update fnhe_genid when updating a route cache mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl() kbuild: pkg: use --transform option to prefix paths in tar EDAC, i5000, i5400: Fix definition of NRECMEMB register EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested drm/amd/amdgpu: fix console deadlock if late init failed axonram: Fix gendisk handling netfilter: don't track fragmented packets zram: set physical queue limits to avoid array out of bounds accesses i2c: riic: fix restart condition crypto: s5p-sss - Fix completing crypto request in IRQ handler ipv6: reorder icmpv6_init() and ip6_mr_init() bnx2x: do not rollback VF MAC/VLAN filters we did not configure bnx2x: fix possible overrun of VFPF multicast addresses array bnx2x: prevent crash when accessing PTP with interface down spi_ks8995: fix "BUG: key accdaa28 not in .data!" arm64: KVM: Survive unknown traps from guests arm: KVM: Survive unknown traps from guests KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset irqchip/crossbar: Fix incorrect type of register size scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq libata: drop WARN from protocol error in ata_sff_qc_issue() kvm: nVMX: VMCLEAR should not cause the vCPU to shut down USB: gadgetfs: Fix a potential memory leak in 'dev_config()' usb: gadget: configs: plug memory leak HID: chicony: Add support for another ASUS Zen AiO keyboard gpio: altera: Use handle_level_irq when configured as a level_high ARM: OMAP2+: Release device node after it is no longer needed. ARM: OMAP2+: Fix device node reference counts module: set __jump_table alignment to 8 selftest/powerpc: Fix false failures for skipped tests x86/hpet: Prevent might sleep splat on resume ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure vti6: Don't report path MTU below IPV6_MIN_MTU. Revert "s390/kbuild: enable modversions for symbols exported from asm" Revert "spi: SPI_FSL_DSPI should depend on HAS_DMA" Revert "drm/armada: Fix compile fail" mm: drop unused pmdp_huge_get_and_clear_notify() thp: fix MADV_DONTNEED vs. numa balancing race thp: reduce indentation level in change_huge_pmd() scsi: storvsc: Workaround for virtual DVD SCSI version ARM: avoid faulting on qemu ARM: BUG if jumping to usermode address in kernel mode arm64: fpsimd: Prevent registers leaking from dead tasks KVM: VMX: remove I/O port 0x80 bypass on Intel hosts arm64: KVM: fix VTTBR_BADDR_MASK BUG_ON off-by-one media: dvb: i2c transfers over usb cannot be done from stack drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU drm: extra printk() wrapper macros kdb: Fix handling of kallsyms_symbol_next() return value s390: fix compat system call table iommu/vt-d: Fix scatterlist offset handling ALSA: usb-audio: Add check return value for usb_string() ALSA: usb-audio: Fix out-of-bound error ALSA: seq: Remove spurious WARN_ON() at timer check ALSA: pcm: prevent UAF in snd_pcm_info x86/PCI: Make broadcom_postcore_init() check acpi_disabled X.509: reject invalid BIT STRING for subjectPublicKey ASN.1: check for error from ASN1_OP_END__ACT actions ASN.1: fix out-of-bounds read when parsing indefinite length item efi: Move some sysfs files to be read-only by root scsi: libsas: align sata_device's rps_resp on a cacheline isa: Prevent NULL dereference in isa_bus driver callbacks hv: kvp: Avoid reading past allocated blocks from KVP file virtio: release virtio index when fail to device_register can: usb_8dev: cancel urb on -EPIPE and -EPROTO can: esd_usb2: cancel urb on -EPIPE and -EPROTO can: ems_usb: cancel urb on -EPIPE and -EPROTO can: kvaser_usb: cancel urb on -EPIPE and -EPROTO can: kvaser_usb: ratelimit errors if incomplete messages are received can: kvaser_usb: Fix comparison bug in kvaser_usb_read_bulk_callback() can: kvaser_usb: free buf in error paths can: ti_hecc: Fix napi poll return value for repoll BACKPORT: irq: Make the irqentry text section unconditional UPSTREAM: arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections UPSTREAM: x86, kasan, ftrace: Put APIC interrupt handlers into .irqentry.text UPSTREAM: kasan: make get_wild_bug_type() static UPSTREAM: kasan: separate report parts by empty lines UPSTREAM: kasan: improve double-free report format UPSTREAM: kasan: print page description after stacks UPSTREAM: kasan: improve slab object description UPSTREAM: kasan: change report header UPSTREAM: kasan: simplify address description logic UPSTREAM: kasan: change allocation and freeing stack traces headers UPSTREAM: kasan: unify report headers UPSTREAM: kasan: introduce helper functions for determining bug type BACKPORT: kasan: report only the first error by default UPSTREAM: kasan: fix races in quarantine_remove_cache() UPSTREAM: kasan: resched in quarantine_remove_cache() BACKPORT: kasan, sched/headers: Uninline kasan_enable/disable_current() BACKPORT: kasan: drain quarantine of memcg slab objects UPSTREAM: kasan: eliminate long stalls during quarantine reduction UPSTREAM: kasan: support panic_on_warn UPSTREAM: x86/suspend: fix false positive KASAN warning on suspend/resume UPSTREAM: kasan: support use-after-scope detection UPSTREAM: kasan/tests: add tests for user memory access functions UPSTREAM: mm, kasan: add a ksize() test UPSTREAM: kasan: test fix: warn if the UAF could not be detected in kmalloc_uaf2 UPSTREAM: kasan: modify kmalloc_large_oob_right(), add kmalloc_pagealloc_oob_right() UPSTREAM: lib/stackdepot: export save/fetch stack for drivers UPSTREAM: lib/stackdepot.c: bump stackdepot capacity from 16MB to 128MB BACKPORT: kprobes: Unpoison stack in jprobe_return() for KASAN UPSTREAM: kasan: remove the unnecessary WARN_ONCE from quarantine.c UPSTREAM: kasan: avoid overflowing quarantine size on low memory systems UPSTREAM: kasan: improve double-free reports BACKPORT: mm: coalesce split strings BACKPORT: mm/kasan: get rid of ->state in struct kasan_alloc_meta UPSTREAM: mm/kasan: get rid of ->alloc_size in struct kasan_alloc_meta UPSTREAM: mm: kasan: remove unused 'reserved' field from struct kasan_alloc_meta UPSTREAM: mm/kasan, slub: don't disable interrupts when object leaves quarantine UPSTREAM: mm/kasan: don't reduce quarantine in atomic contexts UPSTREAM: mm/kasan: fix corruptions and false positive reports UPSTREAM: lib/stackdepot.c: use __GFP_NOWARN for stack allocations BACKPORT: mm, kasan: switch SLUB to stackdepot, enable memory quarantine for SLUB UPSTREAM: kasan/quarantine: fix bugs on qlist_move_cache() UPSTREAM: mm: mempool: kasan: don't poot mempool objects in quarantine UPSTREAM: kasan: change memory hot-add error messages to info messages BACKPORT: mm/kasan: add API to check memory regions UPSTREAM: mm/kasan: print name of mem[set,cpy,move]() caller in report UPSTREAM: mm: kasan: initial memory quarantine implementation UPSTREAM: lib/stackdepot: avoid to return 0 handle UPSTREAM: lib/stackdepot.c: allow the stack trace hash to be zero UPSTREAM: mm, kasan: fix compilation for CONFIG_SLAB BACKPORT: mm, kasan: stackdepot implementation. Enable stackdepot for SLAB BACKPORT: mm, kasan: add GFP flags to KASAN API UPSTREAM: mm, kasan: SLAB support UPSTREAM: mm/slab: align cache size first before determination of OFF_SLAB candidate UPSTREAM: mm/slab: use more appropriate condition check for debug_pagealloc UPSTREAM: mm/slab: factor out debugging initialization in cache_init_objs() UPSTREAM: mm/slab: remove object status buffer for DEBUG_SLAB_LEAK UPSTREAM: mm/slab: alternative implementation for DEBUG_SLAB_LEAK UPSTREAM: mm/slab: clean up DEBUG_PAGEALLOC processing code UPSTREAM: mm/slab: activate debug_pagealloc in SLAB when it is actually enabled sched: EAS/WALT: Don't take into account of running task's util BACKPORT: schedutil: Reset cached freq if it is not in sync with next_freq UPSTREAM: kasan: add functions to clear stack poison Conflicts: arch/arm/include/asm/kvm_arm.h arch/arm64/kernel/vmlinux.lds.S include/linux/kasan.h kernel/softirq.c lib/Kconfig lib/Kconfig.kasan lib/Makefile lib/stackdepot.c mm/kasan/kasan.c sound/usb/mixer.c Change-Id: If70ced6da5f19be3dd92d10a8d8cd4d5841e5870 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-01-02Merge android-4.4.104 (8bc4213) into msm-4.4Srinivasarao P
* refs/heads/tmp-8bc4213 Linux 4.4.104 nfsd: Fix another OPEN stateid race nfsd: Fix stateid races between OPEN and CLOSE nfsd: Make init_open_stateid() a bit more whole drm/i915: Prevent zero length "index" write drm/i915: Don't try indexed reads to alternate slave addresses NFS: revalidate "." etc correctly on "open". mtd: nand: Fix writing mtdoops to nand flash. drm/panel: simple: Add missing panel_simple_unprepare() calls drm/radeon: fix atombios on big endian Revert "drm/radeon: dont switch vt on suspend" bcache: Fix building error on MIPS eeprom: at24: check at24_read/write arguments mmc: core: Do not leave the block driver in a suspended state KVM: x86: inject exceptions produced by x86_decode_insn KVM: x86: Exit to user-mode on #UD intercept when emulator requires KVM: x86: pvclock: Handle first-time write to pvclock-page contains random junk btrfs: clear space cache inode generation always mm/madvise.c: fix madvise() infinite loop under special circumstances mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() x86/efi-bgrt: Replace early_memremap() with memremap() x86/efi-bgrt: Fix kernel panic when mapping BGRT data ARM: dts: omap3: logicpd-torpedo-37xx-devkit: Fix MMC1 cd-gpio x86/efi: Build our own page table structures x86/efi: Hoist page table switching code into efi_call_virt() x86/mm/pat: Ensure cpa->pfn only contains page frame numbers ipsec: Fix aborted xfrm policy dump crash netlink: add a start callback for starting a netlink dump Documentation: tee subsystem and op-tee driver tee: add OP-TEE driver tee: generic TEE subsystem dt/bindings: add bindings for optee kernel.h: add u64_to_user_ptr() ARM: 8481/2: drivers: psci: replace psci firmware calls ARM: 8480/2: arm64: add implementation for arm-smccc ARM: 8479/2: add implementation for arm-smccc ARM: 8478/2: arm/arm64: add arm-smccc UPSTREAM: net: xfrm: allow clearing socket xfrm policies. Conflicts: arch/arm64/kernel/arm64ksyms.c arch/arm64/kernel/asm-offsets.c arch/arm64/kvm/hyp/fpsimd.S drivers/Kconfig drivers/Makefile drivers/firmware/psci.c drivers/gpu/drm/msm/msm_gem_submit.c drivers/mmc/core/bus.c include/linux/arm-smccc.h Change-Id: Ib22051f60c49ecf3bb7e18f9940ba9a4ac5143af Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2017-12-14BACKPORT: mm/kasan: add API to check memory regionsAndrey Ryabinin
Memory access coded in an assembly won't be seen by KASAN as a compiler can instrument only C code. Add kasan_check_[read,write]() API which is going to be used to check a certain memory range. Link: http://lkml.kernel.org/r/1462538722-1574-3-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Acked-by: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Bug: 64145065 (cherry-picked from 64f8ebaf115bcddc4aaa902f981c57ba6506bc42) Change-Id: I3e75c7c22e77d390c55ca1b86ec58a6d6ea1da87 Signed-off-by: Paul Lawrence <paullawrence@google.com>
2017-12-02Documentation: tee subsystem and op-tee driverJens Wiklander
Change-Id: Ib5a195b501598bd6c7b869849938ab61797309ee Acked-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> (cherry picked from commit 6a6e77006fcdba89708214556c6d560323e850fc) Signed-off-by: Victor Chong <victor.chong@linaro.org>
2017-12-02tee: add OP-TEE driverJens Wiklander
Adds a OP-TEE driver which also can be compiled as a loadable module. * Targets ARM and ARM64 * Supports using reserved memory from OP-TEE as shared memory * Probes OP-TEE version using SMCs * Accepts requests on privileged and unprivileged device * Uses OPTEE message protocol version 2 to communicate with secure world Change-Id: Iffaf30a91fff2d29dd87e61173c564271bcc7776 Acked-by: Andreas Dannenberg <dannenberg@ti.com> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (RCAR H3) Tested-by: Scott Branden <scott.branden@broadcom.com> Reviewed-by: Javier González <javier@javigon.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> (cherry picked from commit 4fb0a5eb364d239722e745c02aef0dbd4e0f1ad2) Signed-off-by: Victor Chong <victor.chong@linaro.org>
2017-12-02tee: generic TEE subsystemJens Wiklander
Initial patch for generic TEE subsystem. This subsystem provides: * Registration/un-registration of TEE drivers. * Shared memory between normal world and secure world. * Ioctl interface for interaction with user space. * Sysfs implementation_id of TEE driver A TEE (Trusted Execution Environment) driver is a driver that interfaces with a trusted OS running in some secure environment, for example, TrustZone on ARM cpus, or a separate secure co-processor etc. The TEE subsystem can serve a TEE driver for a Global Platform compliant TEE, but it's not limited to only Global Platform TEEs. This patch builds on other similar implementations trying to solve the same problem: * "optee_linuxdriver" by among others Jean-michel DELORME<jean-michel.delorme@st.com> and Emmanuel MICHEL <emmanuel.michel@st.com> * "Generic TrustZone Driver" by Javier González <javier@javigon.com> Change-Id: I35b763e23b706383df5013c429c510c68d7f4176 Acked-by: Andreas Dannenberg <dannenberg@ti.com> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (RCAR H3) Tested-by: Scott Branden <scott.branden@broadcom.com> Reviewed-by: Javier González <javier@javigon.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> (cherry picked from commit 967c9cca2cc50569efc65945325c173cecba83bd) Signed-off-by: Victor Chong <victor.chong@linaro.org>
2017-05-25[media] cec: add HDMI CEC framework (api)Hans Verkuil
The added HDMI CEC framework provides a generic kernel interface for HDMI CEC devices. Note that the CEC framework is added to staging/media and that the cec.h and cec-funcs.h headers are not exported yet. While the kABI is mature, I would prefer to allow the uABI some more time before it is mainlined in case it needs more tweaks. This adds the cec-api.c source that deals with the public CEC API and the Kconfig/Makefile plumbing. The MAINTAINERS file is also updated. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [k.debski@samsung.com: code cleanup and fixes] Signed-off-by: Kamil Debski <kamil@wypas.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Git-commit: ca684386e6e21ba1511061f71577cdb6c3f2b3d3 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Change-Id: Ie0ac63f18e51cab0e920f9c6c618563faf57a83c Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2016-06-21Merge branch 'v4.4/topic/coresight' into linux-linaro-lsk-v4.4Alex Shi
2016-06-20perf tools: adding coresight etm PMU record capabilitiesMathieu Poirier
Coresight ETMs are IP blocks used to perform HW assisted tracing on a CPU core. This patch introduce the required auxiliary API functions allowing the perf core to interact with a tracer. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2016-06-20perf tools: making coresight PMU listableMathieu Poirier
Adding the required mechanic allowing 'perf list pmu' to discover coresight ETM/PTM tracers. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2016-06-02Merge remote-tracking branch 'v4.4/topic/coresight' into linux-linaro-lsk-v4.4Alex Shi
2016-06-01MAINTAINERS: Add a git tree for the stm classAlexander Shishkin
So that people know where their patches go. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Reviewed-by: Laurent Fert <laurent.fert@intel.com> (cherry picked from commit e787bc463cc1fe3f51b0cd7bf540236318f69cf1)
2016-05-11MAINTAINERS: Remove asterisk from EFI directory namesMatt Fleming
commit e8dfe6d8f6762d515fcd4f30577f7bfcf7659887 upstream. Mark reported that having asterisks on the end of directory names confuses get_maintainer.pl when it encounters subdirectories, and that my name does not appear when run on drivers/firmware/efi/libstub. Reported-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1462303781-8686-2-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12MAINTAINERS: Update mailing list and web page for hwmon subsystemGuenter Roeck
commit 968ce1b1f45a7d76b5471b19bd035dbecc72f32d upstream. The old web page for the hwmon subsystem is no longer operational, and the mailing list has become unreliable. Move both to kernel.org. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25MAINTAINERS: return arch/sh to maintained state, with new maintainersRich Felker
commit 114bf37e04d839b555b3dc460b5e6ce156f49cf0 upstream. Add Yoshinori Sato and Rich Felker as maintainers for arch/sh (SUPERH). Signed-off-by: Rich Felker <dalias@libc.org> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Acked-by: D. Jeff Dionne <jeff@uClinux.org> Acked-by: Rob Landley <rob@landley.net> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-19Merge tag 'pinctrl-v4.4-3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Driver fixes for Freescale i.MX7D, Intel, Broadcom 2835 - One MAINTAINERS entry * tag 'pinctrl-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: MAINTAINERS: pinctrl: Add maintainers for pinctrl-single pinctrl: bcm2835: Fix initial value for direction_output pinctrl: intel: fix offset calculation issue of register PAD_OWN pinctrl: intel: fix bug of register offset calculation pinctrl: freescale: add ZERO_OFFSET_VALID flag for vf610 pinctrl
2015-12-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
Pull networking fixes from David Miller: 1) Fix uninitialized variable warnings in nfnetlink_queue, a lot of people reported this... From Arnd Bergmann. 2) Don't init mutex twice in i40e driver, from Jesse Brandeburg. 3) Fix spurious EBUSY in rhashtable, from Herbert Xu. 4) Missing DMA unmaps in mvpp2 driver, from Marcin Wojtas. 5) Fix race with work structure access in pppoe driver causing corruptions, from Guillaume Nault. 6) Fix OOPS due to sh_eth_rx() not checking whether netdev_alloc_skb() actually succeeded or not, from Sergei Shtylyov. 7) Don't lose flags when settifn IFA_F_OPTIMISTIC in ipv6 code, from Bjørn Mork. 8) VXLAN_HD_RCO defined incorrectly, fix from Jiri Benc. 9) Fix clock source used for cookies in SCTP, from Marcelo Ricardo Leitner. 10) aurora driver needs HAS_DMA dependency, from Geert Uytterhoeven. 11) ndo_fill_metadata_dst op of vxlan has to handle ipv6 tunneling properly as well, from Jiri Benc. 12) Handle request sockets properly in xfrm layer, from Eric Dumazet. 13) Double stats update in ipv6 geneve transmit path, fix from Pravin B Shelar. 14) sk->sk_policy[] needs RCU protection, and as a result xfrm_policy_destroy() needs to free policies using an RCU grace period, from Eric Dumazet. 15) SCTP needs to clone ipv6 tx options in order to avoid use after free, from Eric Dumazet. 16) Missing kbuild export if ila.h, from Stephen Hemminger. 17) Missing mdiobus_alloc() return value checking in mdio-mux.c, from Tobias Klauser. 18) Validate protocol value range in ->create() methods, from Hannes Frederic Sowa. 19) Fix early socket demux races that result in illegal dst reuse, from Eric Dumazet. 20) Validate socket address length in pptp code, from WANG Cong. 21) skb_reorder_vlan_header() uses incorrect offset and can corrupt packets, from Vlad Yasevich. 22) Fix memory leaks in nl80211 registry code, from Ola Olsson. 23) Timeout loop count handing fixes in mISDN, xgbe, qlge, sfc, and qlcnic. From Dan Carpenter. 24) msg.msg_iocb needs to be cleared in recvfrom() otherwise, for example, AF_ALG will interpret it as an async call. From Tadeusz Struk. 25) inetpeer_set_addr_v4 forgets to initialize the 'vif' field, from Eric Dumazet. 26) rhashtable enforces the minimum table size not early enough, breaking how we calculate the per-cpu lock allocations. From Herbert Xu. 27) Fix FCC port lockup in 82xx driver, from Martin Roth. 28) FOU sockets need to be freed using RCU, from Hannes Frederic Sowa. 29) Fix out-of-bounds access in __skb_complete_tx_timestamp() and sock_setsockopt() wrt. timestamp handling. From WANG Cong. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (117 commits) net: check both type and procotol for tcp sockets drivers: net: xgene: fix Tx flow control tcp: restore fastopen with no data in SYN packet af_unix: Revert 'lock_interruptible' in stream receive code fou: clean up socket with kfree_rcu 82xx: FCC: Fixing a bug causing to FCC port lock-up gianfar: Don't enable RX Filer if not supported net: fix warnings in 'make htmldocs' by moving macro definition out of field declaration rhashtable: Fix walker list corruption rhashtable: Enforce minimum size on initial hash table inet: tcp: fix inetpeer_set_addr_v4() ipv6: automatically enable stable privacy mode if stable_secret set net: fix uninitialized variable issue bluetooth: Validate socket address length in sco_sock_bind(). net_sched: make qdisc_tree_decrease_qlen() work for non mq ser_gigaset: remove unnecessary kfree() calls from release method ser_gigaset: fix deallocation of platform device structure ser_gigaset: turn nonsense checks into WARN_ON ser_gigaset: fix up NULL checks qlcnic: fix a timeout loop ...