Commit Graph

1997 Commits

Author SHA1 Message Date
Monika Singh 265e1a22ad ARM: dts: msm: Untrusted pointer dereference
To avoid access of variable after being freed, using
list_first_entry_safe function to iterate over list
of given type, safe against removal of list entry.

Change-Id: I70611fddf3e9b80b1affa3e5235be24eac0d0a58
Signed-off-by: Monika Singh <monising@codeaurora.org>
CVE-2018-11988
2020-07-11 12:50:34 +02:00
jitendrathakare 9b32c32588 qseecom : Clear client handle after unmap the resources
When unloading the app, reset all client members to NULL
to protect from accessing the memory after being freed.

Change-Id: I573b9c6fde03539522d2b04724a2246660c62518
Signed-off-by: jitendra thakare <jitendrathakare@codeaurora.org>
2020-07-11 12:28:35 +02:00
Greg Kroah-Hartman e22655317e uid_sys_stats: make hash_table static
Having a global variabled called "hash_table" is not a good idea, it
should be static, so mark it as such.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-08-26 17:12:24 +02:00
Jin Qian 851c999279 ANDROID: uid_sys_stats: defer io stats calulation for dead tasks
Store sum of dead task io stats in uid_entry and defer uid io
calulation until next uid proc stat change or dumpsys.

Bug: 37754877
Change-Id: I970f010a4c841c5ca26d0efc7e027414c3c952e0
Signed-off-by: Jin Qian <jinqian@google.com>
2019-08-26 17:12:24 +02:00
Ganesh Mahendran 8a14652b7a ANDROID: uid_sys_stats: fix access of task_uid(task)
struct task_struct *task should be proteced by tasklist_lock.

Change-Id: Iefcd13442a9b9d855a2bbcde9fd838a4132fee58
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
(cherry picked from commit 90d78776c4a0e13fb7ee5bd0787f04a1730631a6)
2019-08-26 17:12:23 +02:00
Jin Qian 820c025be9 ANDROID: uid_sys_stats: reduce update_io_stats overhead
Replaced read_lock with rcu_read_lock to reduce time that preemption
is disabled.

Added a function to update io stats for specific uid and moved
hash table lookup, user_namespace out of loops.

Bug: 37319300
Change-Id: I2b81b5cd3b6399b40d08c3c14b42cad044556970
Signed-off-by: Jin Qian <jinqian@google.com>
2019-08-26 17:12:23 +02:00
Jin Qian d31b2d168c ANDROID: uid_sys_stats: fix typo in init
Change-Id: I8a41b331c973898015d11d2018257727083f7910
Signed-off-by: Jin Qian <jinqian@google.com>
2019-08-26 17:12:22 +02:00
Wei Wang e97d4797d1 ANDROID: uid_sys_stats: change to use rt_mutex
We see this happens multiple times in heavy workload in systrace
and AMS stuck in uid_lock.

Running process:        Process 953
Running thread: android.ui
State:  Uninterruptible Sleep
Start:
1,025.628 ms
Duration:
27,955.949 ms
On CPU:
Running instead:        system_server
Args:
{kernel callsite when blocked:: "uid_procstat_write+0xb8/0x144"}

Changing to rt_mutex can mitigate the priority inversion

Bug: 34991231
Bug: 34193533
Change-Id: I481baad840b7bc2dfa9b9a59b4dff93cafb90077
Test: on marlin
Signed-off-by: Wei Wang <wvw@google.com>
2019-08-26 17:12:22 +02:00
Jin Qian 3a3330d616 ANDROID: uid_sys_stats: account for fsync syscalls
Change-Id: Ie888d8a0f4ec7a27dea86dc4afba8e6fd4203488
Signed-off-by: Jin Qian <jinqian@google.com>
2019-08-26 17:12:21 +02:00
Jin Qian ee1ba6d2f9 ANDROID: uid_sys_stats: fix negative write bytes.
A task can cancel writes made by other tasks. In rare cases,
cancelled_write_bytes is larger than write_bytes if the task
itself didn't make any write. This doesn't affect total size
but may cause confusion when looking at IO usage on individual
tasks.

Bug: 35851986
Change-Id: If6cb549aeef9e248e18d804293401bb2b91918ca
Signed-off-by: Jin Qian <jinqian@google.com>
2019-08-26 17:12:20 +02:00
Jin Qian aad84f7cc2 ANDROID: uid_sys_stats: remove unnecessary code in procstat switch
No need to aggregate the switched uid separately since
update_io_stats_locked covers all uids.

Bug: 34198239
Change-Id: Ifed347264b910de02e3f3c8dec95d1a2dbde58c0
Signed-off-by: Jin Qian <jinqian@google.com>
2019-08-26 17:12:20 +02:00
Jin Qian e3a11b22a8 ANDROID: uid_sys_stats: return full size when state is not changed.
Userspace keeps retrying when it sees nothing is written.

Bug: 34364961
Change-Id: Ie288c90c6a206fb863dcad010094fcd1373767aa
2019-08-26 17:12:19 +02:00
Jin Qian f198d67c29 ANDROID: uid_sys_stats: allow writing same state
Signed-off-by: Jin Qian <jinqian@google.com>
Bug: 34360629
Change-Id: Ia748351e07910b1febe54f0484ca1be58c4eb9c7
2019-08-26 17:12:19 +02:00
Nathan Chancellor aa4551d954 misc: kconfig: Update UID_SYS_STATS to depend on TASKSTATS
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2019-08-26 17:12:18 +02:00
Jin Qian e737fb0b4d ANDROID: uid_sys_stats: rename uid_cputime.c to uid_sys_stats.c
This module tracks cputime and io stats.

Signed-off-by: Jin Qian <jinqian@google.com>
Bug: 34198239
Change-Id: I9ee7d9e915431e0bb714b36b5a2282e1fdcc7342
2019-08-26 17:12:02 +02:00
Jin Qian 67db9f4868 ANDROID: uid_cputime: add per-uid IO usage accounting
IO usages are accounted in foreground and background buckets.
For each uid, io usage is calculated in two steps.

delta = current total of all uid tasks - previus total
current bucket += delta

Bucket is determined by current uid stat. Userspace writes to
/proc/uid_procstat/set <uid> <stat> when uid stat is updated.

/proc/uid_io/stats shows IO usage in this format.
<uid> <foreground IO> <background IO>

Signed-off-by: Jin Qian <jinqian@google.com>
Bug: 34198239
Change-Id: I3369e59e063b1e5ee0dfe3804c711d93cb937c0c
2019-08-26 17:07:12 +02:00
Dorimanx 830c241e82 kernel: Convert a few critical drivers to use jiffies
Needed for easy switching to 300HZ kernel. some drivers need there 100HZ.

[CertifiedBlyndGuy]:
* Also convert a couple to a 1000HZ basis. 3.18 uses higher calculations
  in some cases that might prove beneficial

Signed-off-by: Joe Maples <joe@frap129.org>
2019-08-26 15:21:32 +02:00
Joe Maples 353f0539b5 micro-optimization: Use DSTRLEN to remove incorrect strlen uses
strlen is often used incorectly to get the length of strings
defined at compile time. In these cases, the behavior can be
replicated with sizeof(X) - 1, which is calculated at compile
time rather than runtime, reducing overhead. I've created a
simple macro to replace these instances and applied it to all
the files compiled into the angler kernel.

Signed-off-by: Joe Maples <joe@frap129.org>
2019-08-26 13:31:43 +02:00
Nathan Chancellor 60d69b24b0 Android 8.1.0 Release 0.53 (OPM4.171019.016.A1,bullhead)
-----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCWvDR2QAKCRDorT+BmrEO
 eOqWAKCGUTiqryJJ2OXdC6U2te09FUz2BwCeNufH5WgVIQ1qp8goaKRa9g84HmI=
 =Kwnk
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEJDfLduVEy2qz2d/TmXOSYMtstxYFAlrw04gACgkQmXOSYMts
 txb+ag//fA6h2OtpBGqthtb05ohJl3YunWQa8blVrepphXn9ZF7Ackrgbf9dz+2z
 5nAW3bujdNYNPMkQ/bJ+y4WptQr/IYQG6+IlKXQx4CejBb/h21xBVyfX1OSw9u/q
 cXFfwVx74B2K6nfRkM5IUvzt5JwugCRDPZVKsphU5aW7I7FUPt0s2qJGTBhoPdn+
 hhilVk3VVtgkc81t7TGFdmCn/nZvc8sHfa4+LUXhw5g2tDI7/m/AASZrcT55wZ0Z
 Cyqg6swJA4fbdrt72x3NbMUEMSZXRHaQwf2pcSwqhW8MsvX6mPKQlT9d5WV9NPsw
 wDULHlcA5aARDOoGk8GA/zpLgWA7AKSgYuGXgLMYYpWfOsOv03XuVE+zxjc5Grbm
 +1vCPgb/zOGNKsrST0ssNXcuQxlJKD7nuPivjy8X6FnXa5O6JY4VZGU8bBd1N5d/
 gyI/e3G4tEe9rdbf9Fp1xduvyKWG8ccdkOtX73ULHOz1M+n7MsTI7ZMKHuJRsh3L
 s+bHvIRBgt0twvZvP9gmwFHsDnXxKwMWgSML+txvFbrq8T6D0J6eb765YcWzMUSV
 QBDw3lAFrRXf696yec1GYYPhbmXpYAQK8CgxOpl32PXzseWGXF4Gcu5bwvk9B3BG
 Eq1R941GEhcNkxDqJn5KuhrbVGTxMpOFeQfHsa1rPIhGwzrgz4g=
 =Vl6W
 -----END PGP SIGNATURE-----

Merge tag 'android-8.1.0_r0.53' into android-msm-bullhead-3.10-oreo-m2

Android 8.1.0 Release 0.53 (OPM4.171019.016.A1,bullhead)

* tag 'android-8.1.0_r0.53':
  qcacld-2.0: Fix potential buffer overwrite in wma_vdev_start_rsp_ind
  qcacld-2.0: Fix potential buffer overwrite
  qcacld-2.0: Race condition while using pkt log buffer
  qcacld-2.0: Dump the txrx stat req if the queue is not empty
  qcacld-2.0: Fix memory leak for txrx_fw_stats cmd
  qcacld-2.0: Avoid possible stack overflow in hdd_ProcessGENIE API
  qcacld-2.0: Fix potential buffer overflow for TX_COMPL_IND
  qcacld-2.0: Fix Out-of-bound access in sapInterferenceRssiCount
  qcacld-2.0: Avoid buffer overflow
  drivers: qdsp6v2: Add mutex unlock to properly release lock
  msm: msm_bus: Add mutex lock for floor vote data
  qcacld-2.0: Fix buffer overwrite due to ssid_len in WMA handlers
  UPSTREAM: loop: fix concurrent lo_open/lo_release
  msm: mdss: adjust mdss_mdp_get_plane_sizes parameters init order
  Input: gtco - fix potential out-of-bound access
  msm: sensor: actuator: fix out of bound read for region params
  msm: sensor: actuator: add null pointer check for i2c array
  msm: camera: sensor: Validate destination step position
  msm: sensor: actuator: check NULL pointer for actuator ctrl
  msm: sensor: actuator: avoid accessing out of bound memory
  qcacld-2.0: Add mutex lock for proc handlers

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2018-05-07 15:30:30 -07:00
Tanya Dixit 16b0e9d6a1 drivers: qdsp6v2: Add mutex unlock to properly release lock
Add mutex unlock in function audio_effects_shared_ioctl
at appropriate place to prevent use after free.

CRs-Fixed: 2123291
Bug: 72957040
Change-Id: Ie0d321dc8cc20a295d102a44faea7e5710834932
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-03-15 11:17:26 -07:00
Nathan Chancellor ab94de8fcf This is the 3.10.108 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZ/kCIAAoJEE44bZycYXAvRXwQAIZY4bXFnlvl8qJZLd8GV6gT
 8FErDT14eHKBXZUe1a4TFFJ4FU/dVWfPEPJf2k/aotqjwEysxy5MhOApun12ZbF4
 nL6ahNemhNxdIRQFVKBw6HCLyqNwbeBSD3ycLd6FNio4Xxz+3UHO1hoVEbTPSGOf
 XD+100wsV3CHvoCnkmoGXH4PiD1zaNVPwJEh4Fu6yVJQPXDilszTNZgVv4oujhsZ
 zp7Si3SpttfojkOcWgyqrV7jg2ALZxagf4SZ0KbbpwM/5fKEpYtC3sDDE3HyvcVm
 CN0ApTIg7xnuaPsDMwHU9EGLVwlAZEAeiWtR2Byg1YoRQ7mEP9PfkP9xJv9YPxvP
 Ovy7CqezRFjjscVsvrWScFaVtsdYbnT9e5uw2N3yLimHEKy+37x333gLCpbr+/0c
 gsJMJMYTiq1MYUTpa+qf+rB0lQVo972+7FsjOs4ovdy+IJrpgMnKaL6U8drOns7t
 Nmyf1cZTC6YPELnEA8LiRCRsi26HHA6Tknu8Nu2/uOEjeYD0y9iVivptwDB2W35Q
 cECNGSJ85qCob73WDYB5ErGQCTwIm0PTdjzEvjCTxRooT164uhzfr0BdIWhIsdV5
 uPNnkTYj3PkDlMGHhjVARI32In/VQyuf7hsugpVPn4/wKZV3jGJ/rMugAR2eSfTn
 TFrKUsUdH0DYPZKgIhh8
 =wa9B
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEJDfLduVEy2qz2d/TmXOSYMtstxYFAlpqfQ0ACgkQmXOSYMts
 txZ98RAAjyab1BYfLJMVklDBqzIIWnBqniRPOCReTZ3f+4KDwFVPl5wVT89DHci/
 ooIonHqI1BKKuYDIgTL7idK6vGTFo6bTpUT8FZvsjU0V3mFYySA4Yo9aC5G6nXW9
 w/dkaOpX1jtkMTukiAqENryBDs7gYXZ0sbqxnq7pgrnnDepVUStZ7ncoWYdxOADG
 E6Mirskj5fE/MHsVAenYtVmJVFDlvj6P04MT5bGL9e5EIz5CP3ekOqasdsBWj6rE
 yg1JOaH6eOsgSCsP7M9dGxYglKH9nfkJHRnlU3HbXrRdSupTRvs8zC6u9W0DDI2g
 XlrDTIM2UAM1hhRFMhly41o+8zpGHTi8puLJsNYL6bRM33V678dNrnEr/xnzNGpR
 QwC38JWJYymGTkUtW7J1T/GVlWbsF17/fJ5EBG9hSHphrtSjP0nF1i1dAo/MI6hb
 IY+MxVzO3CTZ22Bwjg9DNz56V+RUg56xy//sHSz3GoI6kuFt4tYzwNmLf0Fkj5VJ
 lEI6vDYW/YTlWFFGdNaycvVwj+uETKepx0MIPx2Xt/mY3YNPwMUA2EBfjew+6709
 cbTkn/XxcIZTzZmqKsZ/wZkDK7hKatdlxbcqI2tzidL03MfC3nK83L3YGrJnpbXd
 TU/kR3CWWFVgG574B24ssutT4nrYeHUBp+xGDcQSnwbmihig6NU=
 =pENk
 -----END PGP SIGNATURE-----

Merge 3.10.108 into android-msm-bullhead-3.10-oreo-m5

Changes in 3.10.108: (141 commits)
        ipvs: SNAT packet replies only for NATed connections
        net: reduce skb_warn_bad_offload() noise
        net: skb_needs_check() accepts CHECKSUM_NONE for tx
        Staging: comedi: comedi_fops: Avoid orphaned proc entry
        udp: consistently apply ufo or fragmentation
        Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket
        Bluetooth: cmtp: cmtp_add_connection() should verify that it's dealing with l2cap socket
        tcp: introduce tcp_rto_delta_us() helper for xmit timer fix
        tcp: enable xmit timer fix by having TLP use time when RTO should fire
        tcp: fix xmit timer to only be reset if data ACKed/SACKed
        mm/page_alloc: Remove kernel address exposure in free_reserved_area()
        leak in O_DIRECT readv past the EOF
        usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle
        usb: renesas_usbhs: fix the sequence in xfer_work()
        usb: renesas_usbhs: Fix DMAC sequence for receiving zero-length packet
        fs/exec.c: account for argv/envp pointers
        rxrpc: Fix several cases where a padded len isn't checked in ticket decode
        xfrm: policy: check policy direction value
        nl80211: check for the required netlink attributes presence
        ALSA: seq: Fix use-after-free at creating a port
        MIPS: Send SIGILL for BPOSGE32 in `__compute_return_epc_for_insn'
        serial: ifx6x60: fix use-after-free on module unload
        KEYS: fix dereferencing NULL payload with nonzero length
        usb: chipidea: debug: check before accessing ci_role
        cpufreq: conservative: Allow down_threshold to take values from 1 to 10
        powerpc/kprobes: Pause function_graph tracing during jprobes handling
        staging: comedi: fix clean-up of comedi_class in comedi_init()
        brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx()
        vt: fix unchecked __put_user() in tioclinux ioctls
        crypto: talitos - Extend max key length for SHA384/512-HMAC and AEAD
        PM / Domains: Fix unsafe iteration over modified list of device links
        powerpc/64: Fix atomic64_inc_not_zero() to return an int
        powerpc: Fix emulation of mfocrf in emulate_step()
        powerpc/asm: Mark cr0 as clobbered in mftb()
        usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL
        MIPS: Actually decode JALX in `__compute_return_epc_for_insn'
        MIPS: Fix unaligned PC interpretation in `compute_return_epc'
        MIPS: math-emu: Prevent wrong ISA mode instruction emulation
        libata: array underflow in ata_find_dev()
        workqueue: restore WQ_UNBOUND/max_active==1 to be ordered
        ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize
        ext4: fix overflow caused by missing cast in ext4_resize_fs()
        media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl
        target: Avoid mappedlun symlink creation during lun shutdown
        fuse: initialize the flock flag in fuse_file on allocation
        scsi: zfcp: fix queuecommand for scsi_eh commands when DIX enabled
        scsi: zfcp: add handling for FCP_RESID_OVER to the fcp ingress path
        scsi: zfcp: fix missing trace records for early returns in TMF eh handlers
        scsi: zfcp: fix payload with full FCP_RSP IU in SCSI trace records
        scsi: zfcp: trace HBA FSF response by default on dismiss or timedout late response
        usb: renesas_usbhs: fix the BCLR setting condition for non-DCP pipe
        usb: renesas_usbhs: fix usbhsf_fifo_clear() for RX direction
        iommu/amd: Finish TLB flush in amd_iommu_unmap()
        direct-io: Prevent NULL pointer access in submit_page_section
        USB: serial: console: fix use-after-free after failed setup
        KEYS: don't let add_key() update an uninstantiated key
        FS-Cache: fix dereference of NULL user_key_payload
        ext4: keep existing extra fields when inode expands
        MIPS: Fix mips_atomic_set() retry condition
        KEYS: prevent creating a different user's keyrings
        KEYS: encrypted: fix dereference of NULL user_key_payload
        md/bitmap: disable bitmap_resize for file-backed bitmaps.
        lib/digsig: fix dereference of NULL user_key_payload
        netfilter: invoke synchronize_rcu after set the _hook_ to NULL
        md/raid10: submit bio directly to replacement disk
        md: fix super_offset endianness in super_1_rdev_size_change
        lib/cmdline.c: fix get_options() overflow while parsing ranges
        ext4: fix SEEK_HOLE
        net: prevent sign extension in dev_get_stats()
        kernel/extable.c: mark core_kernel_text notrace
        wext: handle NULL extra data in iwe_stream_add_point better
        netfilter: nf_ct_ext: fix possible panic after nf_ct_extend_unregister
        ext4: in ext4_seek_{hole,data}, return -ENXIO for negative offsets
        ext4: avoid deadlock when expanding inode size
        sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()
        sctp: fix the check for _sctp_walk_params and _sctp_walk_errors
        sctp: fully initialize the IPv6 address in sctp_v6_to_addr()
        sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
        tcp: disallow cwnd undo when switching congestion control
        netfilter: xt_TCPMSS: add more sanity tests on tcph->doff
        tcp: reset sk_rx_dst in tcp_disconnect()
        tcp: avoid setting cwnd to invalid ssthresh after cwnd reduction states
        tcp: when rearming RTO, if RTO time is in past then fire RTO ASAP
        tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0
        net/packet: check length in getsockopt() called with PACKET_HDRLEN
        net: Set sk_prot_creator when cloning sockets to the right proto
        net/mlx4_core: Fix VF overwrite of module param which disables DMFS on new probed PFs
        net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev
        x86/io: Add "memory" clobber to insb/insw/insl/outsb/outsw/outsl
        kvm: async_pf: fix rcu_irq_enter() with irqs enabled
        net: ping: do not abuse udp_poll()
        scsi: qla2xxx: don't disable a not previously enabled PCI device
        drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()
        net: xilinx_emaclite: fix receive buffer overflow
        serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
        x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
        mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
        pvrusb2: reduce stack usage pvr2_eeprom_analyze()
        usb: r8a66597-hcd: select a different endpoint on timeout
        usb: r8a66597-hcd: decrease timeout
        drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
        net: phy: fix marvell phy status reading
        net: korina: Fix NAPI versus resources freeing
        xfrm: NULL dereference on allocation failure
        xfrm: Oops on error in pfkey_msg2xfrm_state()
        cpufreq: s3c2416: double free on driver init error path
        KVM: x86: zero base3 of unusable segments
        KEYS: Fix an error code in request_master_key()
        ipv6: avoid unregistering inet6_dev for loopback
        cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES
        cfg80211: Check if PMKID attribute is of expected size
        mm: fix overflow check in expand_upwards()
        crypto: caam - fix signals handling
        ir-core: fix gcc-7 warning on bool arithmetic
        udf: Fix deadlock between writeback and udf_setsize()
        perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target
        net/mlx4: Remove BUG_ON from ICM allocation routine
        ipv4: initialize fib_trie prior to register_netdev_notifier call.
        workqueue: implicit ordered attribute should be overridable
        packet: fix tp_reserve race in packet_set_ring
        staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
        ALSA: core: Fix unexpected error at replacing user TLV
        ACPI / APEI: Add missing synchronize_rcu() on NOTIFY_SCI removal
        qlge: avoid memcpy buffer overflow
        ipv6: fix memory leak with multiple tables during netns destruction
        ipv6: fix typo in fib6_net_exit()
        ip6_gre: fix endianness errors in ip6gre_err
        crypto: AF_ALG - remove SGL terminator indicator when chaining
        scsi: qla2xxx: Fix an integer overflow in sysfs code
        tracing: Apply trace_clock changes to instance max buffer
        tracing: Erase irqsoff trace with empty write
        btrfs: prevent to set invalid default subvolid
        IB/ipoib: rtnl_unlock can not come after free_netdev
        team: fix memory leaks
        IB/qib: fix false-postive maybe-uninitialized warning
        KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit
        usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options
        scsi: scsi_dh_emc: return success in clariion_std_inquiry()
        can: esd_usb2: Fix can_dlc value for received RTR, frames
        x86/apic: fix build breakage caused by incomplete backport to 3.10
        Linux 3.10.108

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2018-01-25 17:57:49 -07:00
Nathan Chancellor a626beca4c This is the 3.10.105 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJYnZNdAAoJEE44bZycYXAvJv0P/jpPc+jKb+D0FVUOiYDkY5Rw
 jxsZ3oeruTIeSFAAIzusVMLm9moBJA6DThuTHU5Kt68mRaKB2lgmqwkkvQAPTSYh
 tnDQwlrF7dOSVmPczJFHalpaLpRdXdQP9r8y+38PibaFZPssKdnZr3BBfdOdi5DT
 lj029AGKfG7co6Hb/iAhsxuAFfPmvGHY4QNwJ2FRbU1m6MDtmCTbXzF0fc6X5AW1
 qrtaWwPulJtZ/5MPk7aFyNpuCpNvIaTEqNaQsZbuz3bHfzDQVLerWze98vgHC0QM
 2YOTP6TnEiHhxHGMb9SywUgSV1ylx0X542YDfxmcfyxBWRr0khlxQh1gpX+waqE3
 pqdSlvN7AFzifw6kubbG2/XjkNvFtJcDTgrL3qco4utIezSijXmoOsDpKNnJuzk/
 kSD5WYd+Q1CSHOkqZX29QPw1Dl/7Ftm7GPfxu7Pis1OBuPByqtRkEfmn9DpiKSs5
 Aja0ljZYiQ3jy3fH+WlEzo6PVSxx0ZxKg0fOShlpgjj8KjMUdGfl9cB1OZxyWnNH
 UiQ9iIWd3tJci7WbsBOfawsQpq3EIJxZKjyUmLYpBht5/YenYxOBDCr/CLJDQBGI
 IQUPAs/E1JGDxGTUY3AmsaMVrcX2yOfhLzjrsVJGqSdote0um+2PdTLZHE4MMiz2
 Dh6CbUVYWS1KNgmQ8T8L
 =k5mW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEJDfLduVEy2qz2d/TmXOSYMtstxYFAlpqeiwACgkQmXOSYMts
 txaBAQ/+KqZh90YZI+gRHGdczbo3XnlryHMdpp+DTIFtN3zU+2LM352oP+haoJfr
 YhNsixcMhW5TX0is5fg4SkIc0B3ooGKZLVKOPIRw+1NLBAVG5yVuYxW7I1faJgk6
 F37+4rvq7KAOPCNMjAEXRt7GqZ4WZjgvgKy+u5wzKh3k5kUylqDwlP2qdgx2L5Rc
 IxyxgOuaVGV6dZTyAyRlRMild5Tlz+SMY4pWoMe0sulDDXhd5/5PnGNVIgh+XqB6
 m0AGkIIzPVe+wmg6n1iYs93dQO0Jmu6DL47Zv4f3ASZNL/XVSLvU9ie63FyWGZXG
 e52qAPtztXInEOo15vPQSAAq7McZHDTzhHhsU/ZtkBT+LeSUU+rsxXddJ2EO5UgC
 O3cVm11x1FWMzbBtFNFtkqeri2Y2OxvU4O81mfNP1oOUQBTMeSHTzQ8psbCdXeEr
 ktSOtI+nakPmDE3aq4YSaz7BwSgt2tU/vZehkrTxtAQJxt0b88r2xFfThy5WScT1
 v6muoqxlprjjvFld7v99P8cXxJq4QrxKUxXtEBTdB79Q5xtCC29OAcTelpPFDCED
 /KpgZflubzH/Z872AW9Ru8OL9PYty6hBNDOP4aHLSFWfCu3KQxL6BMEeqi5qBjBX
 mJ8JT0dCQYP6xONIWq6a3fICroNMazhNFxdpPSfsQFRhujhjGPg=
 =zhKv
 -----END PGP SIGNATURE-----

Merge 3.10.105 into android-msm-bullhead-3.10-oreo-m5

Changes in 3.10.105: (315 commits)
        sched/core: Fix a race between try_to_wake_up() and a woken up task
        sched/core: Fix an SMP ordering race in try_to_wake_up() vs. schedule()
        crypto: algif_skcipher - Require setkey before accept(2)
        crypto: af_alg - Disallow bind/setkey/... after accept(2)
        crypto: af_alg - Add nokey compatibility path
        crypto: algif_skcipher - Add nokey compatibility path
        crypto: hash - Add crypto_ahash_has_setkey
        crypto: shash - Fix has_key setting
        crypto: algif_hash - Require setkey before accept(2)
        crypto: skcipher - Add crypto_skcipher_has_setkey
        crypto: algif_skcipher - Add key check exception for cipher_null
        crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path
        crypto: algif_hash - Remove custom release parent function
        crypto: algif_skcipher - Remove custom release parent function
        crypto: af_alg - Forbid bind(2) when nokey child sockets are present
        crypto: algif_hash - Fix race condition in hash_check_key
        crypto: algif_skcipher - Fix race condition in skcipher_check_key
        crypto: algif_skcipher - Load TX SG list after waiting
        crypto: cryptd - initialize child shash_desc on import
        crypto: skcipher - Fix blkcipher walk OOM crash
        crypto: gcm - Fix IV buffer size in crypto_gcm_setkey
        MIPS: KVM: Fix unused variable build warning
        KVM: MIPS: Precalculate MMIO load resume PC
        KVM: MIPS: Drop other CPU ASIDs on guest MMU changes
        KVM: nVMX: postpone VMCS changes on MSR_IA32_APICBASE write
        KVM: MIPS: Make ERET handle ERL before EXL
        KVM: x86: fix wbinvd_dirty_mask use-after-free
        KVM: x86: fix missed SRCU usage in kvm_lapic_set_vapic_addr
        KVM: Disable irq while unregistering user notifier
        PM / devfreq: Fix incorrect type issue.
        ppp: defer netns reference release for ppp channel
        x86/mm/xen: Suppress hugetlbfs in PV guests
        xen: Add RING_COPY_REQUEST()
        xen-netback: don't use last request to determine minimum Tx credit
        xen-netback: use RING_COPY_REQUEST() throughout
        xen-blkback: only read request operation from shared ring once
        xen/pciback: Save xen_pci_op commands before processing it
        xen/pciback: Save the number of MSI-X entries to be copied later.
        xen/pciback: Return error on XEN_PCI_OP_enable_msi when device has MSI or MSI-X enabled
        xen/pciback: Return error on XEN_PCI_OP_enable_msix when device has MSI or MSI-X enabled
        xen/pciback: Do not install an IRQ handler for MSI interrupts.
        xen/pciback: For XEN_PCI_OP_disable_msi[|x] only disable if device has MSI(X) enabled.
        xen/pciback: Don't allow MSI-X ops if PCI_COMMAND_MEMORY is not set.
        xen-pciback: Add name prefix to global 'permissive' variable
        x86/xen: fix upper bound of pmd loop in xen_cleanhighmap()
        x86/traps: Ignore high word of regs->cs in early_idt_handler_common
        x86/mm: Disable preemption during CR3 read+write
        x86/apic: Do not init irq remapping if ioapic is disabled
        x86/mm/pat, /dev/mem: Remove superfluous error message
        x86/paravirt: Do not trace _paravirt_ident_*() functions
        x86/build: Build compressed x86 kernels as PIE
        x86/um: reuse asm-generic/barrier.h
        iommu/amd: Update Alias-DTE in update_device_table()
        iommu/amd: Free domain id when free a domain of struct dma_ops_domain
        ARM: 8616/1: dt: Respect property size when parsing CPUs
        ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7
        ARM: sa1100: clear reset status prior to reboot
        ARM: sa1111: fix pcmcia suspend/resume
        arm64: avoid returning from bad_mode
        arm64: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
        arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
        arm64: debug: avoid resetting stepping state machine when TIF_SINGLESTEP
        MIPS: Malta: Fix IOCU disable switch read for MIPS64
        MIPS: ptrace: Fix regs_return_value for kernel context
        powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET
        powerpc/vdso64: Use double word compare on pointers
        powerpc/powernv: Use CPU-endian PEST in pnv_pci_dump_p7ioc_diag_data()
        powerpc/64: Fix incorrect return value from __copy_tofrom_user
        powerpc/nvram: Fix an incorrect partition merge
        avr32: fix copy_from_user()
        avr32: fix 'undefined reference to `___copy_from_user'
        avr32: off by one in at32_init_pio()
        s390/dasd: fix hanging device after clear subchannel
        parisc: Ensure consistent state when switching to kernel stack at syscall entry
        microblaze: fix __get_user()
        microblaze: fix copy_from_user()
        mn10300: failing __get_user() and get_user() should zero
        m32r: fix __get_user()
        sh64: failing __get_user() should zero
        score: fix __get_user/get_user
        s390: get_user() should zero on failure
        ARC: uaccess: get_user to zero out dest in cause of fault
        asm-generic: make get_user() clear the destination on errors
        frv: fix clear_user()
        cris: buggered copy_from_user/copy_to_user/clear_user
        blackfin: fix copy_from_user()
        score: fix copy_from_user() and friends
        sh: fix copy_from_user()
        hexagon: fix strncpy_from_user() error return
        mips: copy_from_user() must zero the destination on access_ok() failure
        asm-generic: make copy_from_user() zero the destination properly
        alpha: fix copy_from_user()
        metag: copy_from_user() should zero the destination on access_ok() failure
        parisc: fix copy_from_user()
        openrisc: fix copy_from_user()
        openrisc: fix the fix of copy_from_user()
        mn10300: copy_from_user() should zero on access_ok() failure...
        sparc32: fix copy_from_user()
        ppc32: fix copy_from_user()
        ia64: copy_from_user() should zero the destination on access_ok() failure
        fix fault_in_multipages_...() on architectures with no-op access_ok()
        fix memory leaks in tracing_buffers_splice_read()
        arc: don't leak bits of kernel stack into coredump
        Fix potential infoleak in older kernels
        swapfile: fix memory corruption via malformed swapfile
        coredump: fix unfreezable coredumping task
        usb: dwc3: gadget: increment request->actual once
        USB: validate wMaxPacketValue entries in endpoint descriptors
        USB: fix typo in wMaxPacketSize validation
        usb: xhci: Fix panic if disconnect
        USB: serial: fix memleak in driver-registration error path
        USB: kobil_sct: fix non-atomic allocation in write path
        USB: serial: mos7720: fix non-atomic allocation in write path
        USB: serial: mos7840: fix non-atomic allocation in write path
        usb: renesas_usbhs: fix clearing the {BRDY,BEMP}STS condition
        USB: change bInterval default to 10 ms
        usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()
        USB: serial: cp210x: fix hardware flow-control disable
        usb: misc: legousbtower: Fix NULL pointer deference
        usb: gadget: function: u_ether: don't starve tx request queue
        USB: serial: cp210x: fix tiocmget error handling
        usb: gadget: u_ether: remove interrupt throttling
        usb: chipidea: move the lock initialization to core file
        Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y
        ALSA: rawmidi: Fix possible deadlock with virmidi registration
        ALSA: timer: fix NULL pointer dereference in read()/ioctl() race
        ALSA: timer: fix division by zero after SNDRV_TIMER_IOCTL_CONTINUE
        ALSA: timer: fix NULL pointer dereference on memory allocation failure
        ALSA: ali5451: Fix out-of-bound position reporting
        ALSA: pcm : Call kill_fasync() in stream lock
        zfcp: fix fc_host port_type with NPIV
        zfcp: fix ELS/GS request&response length for hardware data router
        zfcp: close window with unblocked rport during rport gone
        zfcp: retain trace level for SCSI and HBA FSF response records
        zfcp: restore: Dont use 0 to indicate invalid LUN in rec trace
        zfcp: trace on request for open and close of WKA port
        zfcp: restore tracing of handle for port and LUN with HBA records
        zfcp: fix D_ID field with actual value on tracing SAN responses
        zfcp: fix payload trace length for SAN request&response
        zfcp: trace full payload of all SAN records (req,resp,iels)
        scsi: zfcp: spin_lock_irqsave() is not nestable
        scsi: mpt3sas: Fix secure erase premature termination
        scsi: mpt3sas: Unblock device after controller reset
        scsi: mpt3sas: fix hang on ata passthrough commands
        mpt2sas: Fix secure erase premature termination
        scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
        scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
        scsi: ibmvfc: Fix I/O hang when port is not mapped
        scsi: Fix use-after-free
        scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
        scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
        scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware
        ext4: validate that metadata blocks do not overlap superblock
        ext4: avoid modifying checksum fields directly during checksum verification
        ext4: use __GFP_NOFAIL in ext4_free_blocks()
        ext4: reinforce check of i_dtime when clearing high fields of uid and gid
        ext4: allow DAX writeback for hole punch
        ext4: sanity check the block and cluster size at mount time
        reiserfs: fix "new_insert_key may be used uninitialized ..."
        reiserfs: Unlock superblock before calling reiserfs_quota_on_mount()
        xfs: fix superblock inprogress check
        libxfs: clean up _calc_dquots_per_chunk
        btrfs: ensure that file descriptor used with subvol ioctls is a dir
        ocfs2/dlm: fix race between convert and migration
        ocfs2: fix start offset to ocfs2_zero_range_for_truncate()
        ubifs: Fix assertion in layout_in_gaps()
        ubifs: Fix xattr_names length in exit paths
        UBIFS: Fix possible memory leak in ubifs_readdir()
        ubifs: Abort readdir upon error
        ubifs: Fix regression in ubifs_readdir()
        UBI: fastmap: scrub PEB when bitflips are detected in a free PEB EC header
        NFSv4.x: Fix a refcount leak in nfs_callback_up_net
        NFSD: Using free_conn free connection
        NFS: Don't drop CB requests with invalid principals
        NFSv4: Open state recovery must account for file permission changes
        fs/seq_file: fix out-of-bounds read
        fs/super.c: fix race between freeze_super() and thaw_super()
        isofs: Do not return EACCES for unknown filesystems
        hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
        driver core: Delete an unnecessary check before the function call "put_device"
        driver core: fix race between creating/querying glue dir and its cleanup
        drm/radeon: fix radeon_move_blit on 32bit systems
        drm: Reject page_flip for !DRIVER_MODESET
        drm/radeon: Ensure vblank interrupt is enabled on DPMS transition to on
        qxl: check for kmap failures
        Input: i8042 - break load dependency between atkbd/psmouse and i8042
        Input: i8042 - set up shared ps2_cmd_mutex for AUX ports
        Input: ili210x - fix permissions on "calibrate" attribute
        hwrng: exynos - Disable runtime PM on probe failure
        hwrng: omap - Fix assumption that runtime_get_sync will always succeed
        hwrng: omap - Only fail if pm_runtime_get_sync returns < 0
        i2c-eg20t: fix race between i2c init and interrupt enable
        em28xx-i2c: rt_mutex_trylock() returns zero on failure
        i2c: core: fix NULL pointer dereference under race condition
        i2c: at91: fix write transfers by clearing pending interrupt first
        iio: accel: kxsd9: Fix raw read return
        iio: accel: kxsd9: Fix scaling bug
        thermal: hwmon: Properly report critical temperature in sysfs
        cdc-acm: fix wrong pipe type on rx interrupt xfers
        timers: Use proper base migration in add_timer_on()
        EDAC: Increment correct counter in edac_inc_ue_error()
        IB/ipoib: Fix memory corruption in ipoib cm mode connect flow
        IB/core: Fix use after free in send_leave function
        IB/ipoib: Don't allow MC joins during light MC flush
        IB/mlx4: Fix incorrect MC join state bit-masking on SR-IOV
        IB/mlx4: Fix create CQ error flow
        IB/uverbs: Fix leak of XRC target QPs
        IB/cm: Mark stale CM id's whenever the mad agent was unregistered
        mtd: blkdevs: fix potential deadlock + lockdep warnings
        mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
        mtd: nand: davinci: Reinitialize the HW ECC engine in 4bit hwctl
        perf symbols: Fixup symbol sizes before picking best ones
        perf: Tighten (and fix) the grouping condition
        tty: Prevent ldisc drivers from re-using stale tty fields
        tty: limit terminal size to 4M chars
        tty: vt, fix bogus division in csi_J
        vt: clear selection before resizing
        drivers/vfio: Rework offsetofend()
        include/stddef.h: Move offsetofend() from vfio.h to a generic kernel header
        stddef.h: move offsetofend inside #ifndef/#endif guard, neaten
        ipv6: don't call fib6_run_gc() until routing is ready
        ipv6: split duplicate address detection and router solicitation timer
        ipv6: move DAD and addrconf_verify processing to workqueue
        ipv6: addrconf: fix dev refcont leak when DAD failed
        ipv6: fix rtnl locking in setsockopt for anycast and multicast
        ip6_gre: fix flowi6_proto value in ip6gre_xmit_other()
        ipv6: correctly add local routes when lo goes up
        ipv6: dccp: fix out of bound access in dccp_v6_err()
        ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped
        ip6_tunnel: Clear IP6CB in ip6tunnel_xmit()
        ip6_tunnel: disable caching when the traffic class is inherited
        net/irda: handle iriap_register_lsap() allocation failure
        tcp: fix use after free in tcp_xmit_retransmit_queue()
        tcp: properly scale window in tcp_v[46]_reqsk_send_ack()
        tcp: fix overflow in __tcp_retransmit_skb()
        tcp: fix wrong checksum calculation on MTU probing
        tcp: take care of truncations done by sk_filter()
        bonding: Fix bonding crash
        net: ratelimit warnings about dst entry refcount underflow or overflow
        mISDN: Support DR6 indication in mISDNipac driver
        mISDN: Fixing missing validation in base_sock_bind()
        net: disable fragment reassembly if high_thresh is set to zero
        ipvs: count pre-established TCP states as active
        iwlwifi: pcie: fix access to scratch buffer
        svc: Avoid garbage replies when pc_func() returns rpc_drop_reply
        brcmsmac: Free packet if dma_mapping_error() fails in dma_rxfill
        brcmsmac: Initialize power in brcms_c_stf_ss_algo_channel_get()
        brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
        pstore: Fix buffer overflow while write offset equal to buffer size
        net/mlx4_core: Allow resetting VF admin mac to zero
        firewire: net: guard against rx buffer overflows
        firewire: net: fix fragmented datagram_size off-by-one
        netfilter: fix namespace handling in nf_log_proc_dostring
        can: bcm: fix warning in bcm_connect/proc_register
        net: fix sk_mem_reclaim_partial()
        net: avoid sk_forward_alloc overflows
        ipmr, ip6mr: fix scheduling while atomic and a deadlock with ipmr_get_route
        packet: call fanout_release, while UNREGISTERING a netdev
        net: sctp, forbid negative length
        sctp: validate chunk len before actually using it
        net: clear sk_err_soft in sk_clone_lock()
        net: mangle zero checksum in skb_checksum_help()
        dccp: do not send reset to already closed sockets
        dccp: fix out of bound access in dccp_v4_err()
        sctp: assign assoc_id earlier in __sctp_connect
        neigh: check error pointer instead of NULL for ipv4_neigh_lookup()
        ipv4: use new_gw for redirect neigh lookup
        mac80211: fix purging multicast PS buffer queue
        mac80211: discard multicast and 4-addr A-MSDUs
        cfg80211: limit scan results cache size
        mwifiex: printk() overflow with 32-byte SSIDs
        ipv4: Set skb->protocol properly for local output
        net: sky2: Fix shutdown crash
        kaweth: fix firmware download
        tracing: Move mutex to protect against resetting of seq data
        kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd
        Revert "ipc/sem.c: optimize sem_lock()"
        cfq: fix starvation of asynchronous writes
        drbd: Fix kernel_sendmsg() usage - potential NULL deref
        lib/genalloc.c: start search from start of chunk
        tools/vm/slabinfo: fix an unintentional printf
        rcu: Fix soft lockup for rcu_nocb_kthread
        ratelimit: fix bug in time interval by resetting right begin time
        mfd: core: Fix device reference leak in mfd_clone_cell
        PM / sleep: fix device reference leak in test_suspend
        mmc: mxs: Initialize the spinlock prior to using it
        mmc: block: don't use CMD23 with very old MMC cards
        pstore/core: drop cmpxchg based updates
        pstore/ram: Use memcpy_toio instead of memcpy
        pstore/ram: Use memcpy_fromio() to save old buffer
        mb86a20s: fix the locking logic
        mb86a20s: fix demod settings
        cx231xx: don't return error on success
        cx231xx: fix GPIOs for Pixelview SBTVD hybrid
        gpio: mpc8xxx: Correct irq handler function
        uio: fix dmem_region_start computation
        KEYS: Fix short sprintf buffer in /proc/keys show function
        hv: do not lose pending heartbeat vmbus packets
        staging: iio: ad5933: avoid uninitialized variable in error case
        mei: bus: fix received data size check in NFC fixup
        ACPI / APEI: Fix incorrect return value of ghes_proc()
        PCI: Handle read-only BARs on AMD CS553x devices
        tile: avoid using clocksource_cyc2ns with absolute cycle count
        dm flakey: fix reads to be issued if drop_writes configured
        mm,ksm: fix endless looping in allocating memory when ksm enable
        can: dev: fix deadlock reported after bus-off
        hwmon: (adt7411) set bit 3 in CFG1 register
        mpi: Fix NULL ptr dereference in mpi_powm() [ver #3]
        mfd: 88pm80x: Double shifting bug in suspend/resume
        ASoC: omap-mcpdm: Fix irq resource handling
        regulator: tps65910: Work around silicon erratum SWCZ010
        dm: mark request_queue dead before destroying the DM device
        fbdev/efifb: Fix 16 color palette entry calculation
        metag: Only define atomic_dec_if_positive conditionally
        Linux 3.10.105

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	arch/arm/mach-sa1100/generic.c
	arch/arm64/kernel/traps.c
	crypto/blkcipher.c
	drivers/devfreq/devfreq.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/gadget/u_ether.c
	fs/ubifs/dir.c
	include/net/if_inet6.h
	lib/genalloc.c
	net/ipv6/addrconf.c
	net/ipv6/tcp_ipv6.c
	net/wireless/scan.c
	sound/core/timer.c
2018-01-25 17:45:32 -07:00
Nathan Chancellor 459f05e480 This is the 3.10.102 stable release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXXS5iAAoJEE44bZycYXAvDj8P/jbhmGAgW6tw2cnS90QIZDqG
 M/nclEId61jICNvbfP6zsioKeWyrmzr5G7NjqTThsSNhCo/DXs3ddMqLy3pOaFdq
 mytXtHIUpwZoplEib+ODinW40CMqnu11XSWEcee2nrsPuGNsnc7BY0wmFBa6UVCV
 rOZef9SN9lJcZSYY/auvgLDXOXdQ+NMxp5hau30aF5HBO8hTDXStjPRcUwCvz7aR
 govTQJHlS4HzLH3JOYS3Dt8IYFDOrKhQIby2nFdw7eiUxHCRy2F0asabTh3DzCw1
 iLvFroozjyVXwozfWMqLCvMa+514MXJy8Nkva6xiAHraC8UrgfPtcNsTdgtkdH9T
 V2Am9b0L7yiBdG6hsZLxkU3akk7vU/0dtppwzvudANT6i2tGcDSBeaZq3T2pAv7B
 7coY53GzHZdQnbdTZbYeS1fxebxyXw50D5OJkF8DyLhoL7Uj2Dvv0QdjKv+U/e5D
 VQ+ZyGcBdCLuOzflXysI10E01y0/M3FrkubgGBM4Oh0eYKCHJaHG/NCZy5JY/qxy
 S0phem8RbeZPbcL14z+5buWIi1lUkTiCIMG8c32ZEmDh84drnICqABA0RzKmqdkj
 ucQa+PzkMQ1DyhAMUl/CwpBfSqf1Zs3agLo78Kp5MTGfeAA90m0SeVqhmDgWhwqG
 HhSlsPFfMfmJl5S0uJpQ
 =UhFl
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEJDfLduVEy2qz2d/TmXOSYMtstxYFAlpqdSoACgkQmXOSYMts
 txbb1A/6A1pJjz3//6RsYU7G2f4WgAjqCRzQDPtVtBUwpyBtj7DuAxNGeOAvw0KM
 BfOTy0fhtgHfOV6F4kynIuU6scNY8zZlZ2ZCgndhiC45dlDBSto2mYgF9DmDl7m3
 rRhiWmmSqFvJW+USxCETg8PxXVIs0Si+TU8AfBKJt3Mf25UyLsrm/hIDqg3FtkyP
 STZlpmACGQEJl6qTVTubTv6/psJc0oE7gUZ2G4TTuFxt+p3/4MPf+pnicl5jcP04
 laN1k2ce8ciV8Tc7f5zM55ArLGM+M4QQNRqO6Wrl7gQvtXpn6Efno9aY2MuaXtdm
 7sKKvQWj0QMS/9tei+wGS73gDsfIb1qrsaMWD9UF9zGb7miGkRr3wdDZPYurysWy
 5cIL1TErJDiIVlVedL/o8EYOxCYamSQPJ35WGxSgeS9kqfTlh3C1angGy9EOpv27
 ER1myFM4TUc51ziPIFlEeBu1ku4vVY7atCsZU25VqKFLAapeDG3xuK1RDmal/PTd
 d2JahllwPQ4Uh8OUNeHcN4Ptxf/fBVezSCZw1tv6vkAUdt6uXcbweutDw74cWlNJ
 KbKd5yluWVCAVsOSiVNRFX8ij/9GeJvu94eU5o7jiC578TQTRrMdKyxEqVKzz6te
 39rFoX20GZ7IosRoJDp9gsJTA7GAVsCcfU9CK/SNL3jxGLFvJbo=
 =CaKB
 -----END PGP SIGNATURE-----

Merge 3.10.102 into android-msm-bullhead-3.10-oreo-m5

Changes in 3.10.102: (144 commits)
        pipe: Fix buffer offset after partially failed read
        x86/iopl/64: Properly context-switch IOPL on Xen PV
        ext4: fix NULL pointer dereference in ext4_mark_inode_dirty()
        compiler-gcc: integrate the various compiler-gcc[345].h files
        x86: LLVMLinux: Fix "incomplete type const struct x86cpu_device_id"
        KVM: i8254: change PIT discard tick policy
        KVM: fix spin_lock_init order on x86
        EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr()
        PCI: Disable IO/MEM decoding for devices with non-compliant BARs
        linux/const.h: Add _BITUL() and _BITULL()
        x86: Rename X86_CR4_RDWRGSFS to X86_CR4_FSGSBASE
        x86, processor-flags: Fix the datatypes and add bit number defines
        x86/iopl: Fix iopl capability check on Xen PV
        sg: fix dxferp in from_to case
        aacraid: Fix memory leak in aac_fib_map_free
        be2iscsi: set the boot_kset pointer to NULL in case of failure
        usb: retry reset if a device times out
        USB: cdc-acm: more sanity checking
        USB: iowarrior: fix oops with malicious USB descriptors
        USB: usb_driver_claim_interface: add sanity checking
        USB: mct_u232: add sanity checking in probe
        USB: digi_acceleport: do sanity checking for the number of ports
        USB: cypress_m8: add endpoint sanity check
        USB: serial: cp210x: Adding GE Healthcare Device ID
        USB: option: add "D-Link DWM-221 B1" device id
        pwc: Add USB id for Philips Spc880nc webcam
        Input: powermate - fix oops with malicious USB descriptors
        net: irda: Fix use-after-free in irtty_open()
        8250: use callbacks to access UART_DLL/UART_DLM
        bttv: Width must be a multiple of 16 when capturing planar formats
        media: v4l2-compat-ioctl32: fix missing length copy in put_v4l2_buffer32
        ALSA: intel8x0: Add clock quirk entry for AD1981B on IBM ThinkPad X41.
        jbd2: fix FS corruption possibility in jbd2_journal_destroy() on umount path
        bcache: fix cache_set_flush() NULL pointer dereference on OOM
        watchdog: rc32434_wdt: fix ioctl error handling
        splice: handle zero nr_pages in splice_to_pipe()
        xtensa: ISS: don't hang if stdin EOF is reached
        xtensa: clear all DBREAKC registers on start
        md/raid5: Compare apples to apples (or sectors to sectors)
        rapidio/rionet: fix deadlock on SMP
        ipr: Fix out-of-bounds null overwrite
        ipr: Fix regression when loading firmware
        drm/radeon: Don't drop DP 2.7 Ghz link setup on some cards.
        tracing: Have preempt(irqs)off trace preempt disabled functions
        tracing: Fix crash from reading trace_pipe with sendfile
        tracing: Fix trace_printk() to print when not using bprintk()
        scripts/coccinelle: modernize &
        Input: ims-pcu - sanity check against missing interfaces
        Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
        ocfs2/dlm: fix race between convert and recovery
        ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list
        mtd: onenand: fix deadlock in onenand_block_markbad
        sched/cputime: Fix steal time accounting vs. CPU hotplug
        perf/x86/intel: Fix PEBS data source interpretation on Nehalem/Westmere
        hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated
        parisc: Avoid function pointers for kernel exception routines
        parisc: Fix kernel crash with reversed copy_from_user()
        ALSA: timer: Use mod_timer() for rearming the system timer
        net: jme: fix suspend/resume on JMC260
        sctp: lack the check for ports in sctp_v6_cmp_addr
        ipv6: re-enable fragment header matching in ipv6_find_hdr
        cdc_ncm: toggle altsetting to force reset before setup
        usbnet: cleanup after bind() in probe()
        udp6: fix UDP/IPv6 encap resubmit path
        sh_eth: fix NULL pointer dereference in sh_eth_ring_format()
        net: Fix use after free in the recvmmsg exit path
        farsync: fix off-by-one bug in fst_add_one
        ath9k: fix buffer overrun for ar9287
        qlge: Fix receive packets drop.
        ppp: take reference on channels netns
        qmi_wwan: add "D-Link DWM-221 B1" device id
        ipv4: l2tp: fix a potential issue in l2tp_ip_recv
        ipv6: l2tp: fix a potential issue in l2tp_ip6_recv
        ip6_tunnel: set rtnl_link_ops before calling register_netdevice
        usb: renesas_usbhs: avoid NULL pointer derefernce in usbhsf_pkt_handler()
        usb: renesas_usbhs: disable TX IRQ before starting TX DMAC transfer
        ext4: add lockdep annotations for i_data_sem
        HID: usbhid: fix inconsistent reset/resume/reset-resume behavior
        drm/radeon: hold reference to fences in radeon_sa_bo_new (3.17 and older)
        usbvision-video: fix memory leak of alt_max_pkt_size
        usbvision: fix leak of usb_dev on failure paths in usbvision_probe()
        usbvision: fix crash on detecting device with invalid configuration
        usb: xhci: fix wild pointers in xhci_mem_cleanup
        usb: hcd: out of bounds access in for_each_companion
        crypto: gcm - Fix rfc4543 decryption crash
        nl80211: check netlink protocol in socket release notification
        Input: gtco - fix crash on detecting device without endpoints
        i2c: cpm: Fix build break due to incompatible pointer types
        EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback
        ASoC: s3c24xx: use const snd_soc_component_driver pointer
        efi: Fix out-of-bounds read in variable_matches()
        workqueue: fix ghost PENDING flag while doing MQ IO
        USB: usbip: fix potential out-of-bounds write
        paride: make 'verbose' parameter an 'int' again
        fbdev: da8xx-fb: fix videomodes of lcd panels
        misc/bmp085: Enable building as a module
        rtc: vr41xx: Wire up alarm_irq_enable
        drivers/misc/ad525x_dpot: AD5274 fix RDAC read back errors
        include/linux/poison.h: fix LIST_POISON{1,2} offset
        Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors
        perf stat: Document --detailed option
        ARM: OMAP3: Add cpuidle parameters table for omap3430
        compiler-gcc: disable -ftracer for __noclone functions
        ipvs: correct initial offset of Call-ID header search in SIP persistence engine
        nbd: ratelimit error msgs after socket close
        clk: versatile: sp810: support reentrance
        lpfc: fix misleading indentation
        ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel
        proc: prevent accessing /proc/<PID>/environ until it's ready
        batman-adv: Fix broadcast/ogm queue limit on a removed interface
        MAINTAINERS: Remove asterisk from EFI directory names
        ACPICA: Dispatcher: Update thread ID for recursive method calls
        USB: serial: cp210x: add ID for Link ECU
        USB: serial: cp210x: add Straizona Focusers device ids
        Input: ads7846 - correct the value got from SPI
        powerpc: scan_features() updates incorrect bits for REAL_LE
        crypto: hash - Fix page length clamping in hash walk
        get_rock_ridge_filename(): handle malformed NM entries
        Input: max8997-haptic - fix NULL pointer dereference
        asmlinkage, pnp: Make variables used from assembler code visible
        ARM: OMAP3: Fix booting with thumb2 kernel
        decnet: Do not build routes to devices without decnet private data.
        route: do not cache fib route info on local routes with oif
        packet: fix heap info leak in PACKET_DIAG_MCLIST sock_diag interface
        atl2: Disable unimplemented scatter/gather feature
        net: fix infoleak in llc
        net: fix infoleak in rtnetlink
        VSOCK: do not disconnect socket when peer has shutdown SEND only
        net: bridge: fix old ioctl unlocked net device walk
        net: fix a kernel infoleak in x25 module
        fs/cifs: correctly to anonymous authentication via NTLMSSP
        ring-buffer: Use long for nr_pages to avoid overflow failures
        ring-buffer: Prevent overflow of size in ring_buffer_resize()
        mfd: omap-usb-tll: Fix scheduling while atomic BUG
        mmc: mmc: Fix partition switch timeout for some eMMCs
        mmc: longer timeout for long read time quirk
        Bluetooth: vhci: purge unhandled skbs
        USB: serial: keyspan: fix use-after-free in probe error path
        USB: serial: quatech2: fix use-after-free in probe error path
        USB: serial: io_edgeport: fix memory leaks in probe error path
        USB: serial: option: add support for Cinterion PH8 and AHxx
        tty: vt, return error when con_startup fails
        serial: samsung: Reorder the sequence of clock control when call s3c24xx_serial_set_termios()
        Linux 3.10.102

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	drivers/media/v4l2-core/v4l2-compat-ioctl32.c
	fs/pipe.c
	kernel/trace/trace_printk.c
	net/core/rtnetlink.c
	net/socket.c
2018-01-25 17:24:10 -07:00
Dan Carpenter 240607692c drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
commit 8128a31eaadbcdfa37774bbd28f3f00bac69996a upstream.

c2port_device_register() never returns NULL, it uses error pointers.

Link: http://lkml.kernel.org/r/20170412083321.GC3250@mwanda
Fixes: 65131cd52b ("c2port: add c2port support for Eurotech Duramar 2150")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Rodolfo Giometti <giometti@linux.it>
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2017-11-02 07:16:28 +01:00
Brahmaji K 0cee9126ce qseecom: Fix accessing userspace memory in kernel space
Use put_user API to write the data from kernel space to
userspace to avoid accessing userspace memory directly
in kernel space.

Bug: 65468973
Change-Id: I7bdd702225ed179af841db9a67cc7b93eadf9dcc
Signed-off-by: Brahmaji K <bkomma@codeaurora.org>
2017-10-12 19:44:05 -07:00
Jonathan Solnit 5ba94b6f74 ASoC: msm: qdspv2: add mutex to prevent access same memory simultaneously
Add mutex protection to avoid simultaneous access the
same memory by multiple threads.

Bug: 64440043
CRs-Fixed: 2013494
Change-Id: I440ea633ceb7312637c9a3b29d22236166d21a39
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
Signed-off-by: Jonathan Solnit <jsolnit@google.com>
2017-09-11 23:40:05 +00:00
Siena Richard 9ffb3cdd72 ASoC: msm: qdsp6v2: extend validation of virtual address
Validate a buffer virtual address is fully within the region before
returning the region to ensure functionality for an extended edge case.

Change-Id: Iba3e080889980f393d6a9f0afe0231408b92d654
Signed-off-by: Siena Richard <sienar@codeaurora.org>
CRs-fixed: 1108461

Bug: 38195131
Change-Id: Ib527a380a857719bff8254be514133528bd64c75
2017-07-18 21:57:18 +00:00
kunleiz e7a3029ebf ASoC: msm: qdspv2: add result check when audio process fail
A audio_process_event_req is not always to success. Therefore,
check the return value for audio_process_event_req, and
initializ usr_evt before using it.

CRs-Fixed: 2029798
Bug: 35764875
Change-Id: I4adf682575f5f9233a1a1a533f9c6361af8a5bcf
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
2017-06-07 19:36:40 +00:00
Zhen Kong b4e0e95c3f qseecom: add mutex around qseecom_set_client_mem_param
Add mutex around qseecom_set_client_mem_param to prevent an
ioctl thread modifying and corrupting data which is being
processed by another ioctl in the other thread

Bug: 34327981
Change-Id: I0cfb8afab4001c2913be693dfe44c761b9568893
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-04-10 22:53:49 +00:00
Ecco Park 0c289272eb Merge branch 'android-msm-bullhead-3.10-nyc-mr1' into android-msm-bullhead-3.10-nyc-mr2
May 2017.1

Bug: 36138302
2017-03-15 20:21:31 -07:00
Zhen Kong 73738cfa0a qseecom: improve input validatation for qseecom_send_service_cmd
Make change to improve input validation on request and response
buffers' address and length for qseecom_send_service_cmd.

Bug: 35400457
Change-Id: I047e3264333d767541e43b7dadd1727232fd48ef
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-03-16 00:54:35 +00:00
Zhen Kong 017ebf1329 qseecom: check buffer size when loading firmware images
Make change in __qseecom_load_fw() and qseecom_load_commonlib_image()
to check buffer size before copying img to buffer.

CRs-fixed: 1080290
Bug: 35399405
Change-Id: I0f48666ac948a9571e249598ae7cc19df9036b1d
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-03-16 00:54:06 +00:00
John Dias e5706784ae Merge branch 'android-msm-bullhead-3.10-nyc-mr1' into android-msm-bullhead-3.10-nyc-mr2
April 2017.1

Bug: 34977530
2017-02-15 17:05:47 -08:00
kunleiz a33fab253f FROMLIST: ASoC: msm: qdspv2: add mutex lock when access output buffer length
Add mutex protection to avoid access output_len in parallel.

CRs-Fixed: 1104067
Bug: 33353700
Change-Id: I4e17258e2abee9cd68152f4b79520b00003aa80d
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
Signed-off-by: Siqi Lin <siqilin@google.com>
(am from https://source.codeaurora.org/quic/la/kernel/msm-3.18/commit/?id=cb0701a2f99fa19f01fbd4249bda9a8eadb0241f)
2017-02-14 23:24:48 +00:00
Biswajit Paul b41c6bfa46 qseecom: whitelist support for kernel client and listener
Add whitelist support for listener to send modified resp to TZ;
also add whitelist support for kernel client; and change the method
to check whitelist feature.

Bug: 31268796
CRs-Fixed: 1021945
Change-Id: I0030b0008d6224cda3fdc1f80308a7e9bcfe4405
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
2017-02-13 14:07:35 -08:00
Biswajit Paul aa0fca3f5d qseecom: Change whitelist_support flag to false if TZ failed to check
The whitelist status is set default as true though TZ failed to check,
which in turn causing the send_command fail by passing whitelist commnd id.
So updating the support status flag to false when TZ fails to check.

Bug: 31268796
CRs-Fixed: 1021945
Change-Id: I78a7600506b4d2457bb1c38f8a39888a9cf9467c
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
2017-02-13 14:07:25 -08:00
Biswajit Paul 9776ffdfa1 qseecom: allocate sglistinfo buffer for kernel clients
To support whitelist feature, sglistinfo table should also
be allocated from qseecom kernel APIs used by kernel client.
Besides, initialize sg in __qseecom_update_cmd_buf_64 to
address a static analysis warning.

Bug: 31268796
CRs-Fixed: 1021945
Change-Id: I1f1967fd9e95444cca728f09e3e8f4914b2abb95
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
2017-02-13 14:07:15 -08:00
Biswajit Paul 903dbbabd0 qseecom: support whitelist memory for qseecom_send_modfd_cmd
qseecom_send_modfd_cmd converts ION buffer's virtual address to
scatter gather(SG) list and then sends them to TA by populating
SG list into message buffer. As the physical memory address in
SG list is used directly by TA, this allows a malicious TA to
access/corrupt arbitrary physical memory and may lead to the
process gaining kernel/root privileges. Thus, make changes to
have the QSEEComm driver passing a list of whitelist buffers
that is allowed to be mapped by TA, and the QSEE kernel, in turn,
should add checks to the register_shared_buffer syscall to make
sure the shared buffers an application is mapping falls within
one of these whitelist buffers.

Bug: 31268796
CRs-fixed: 1021945
Change-Id: I776ead0030cad167afcf41ab985db7151a42d126
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
2017-02-13 14:06:56 -08:00
Alexander Usyskin 2ef7229277 mei: bus: fix received data size check in NFC fixup
commit 582ab27a063a506ccb55fc48afcc325342a2deba upstream.

NFC version reply size checked against only header size, not against
full message size. That may lead potentially to uninitialized memory access
in version data.

That leads to warnings when version data is accessed:
drivers/misc/mei/bus-fixup.c: warning: '*((void *)&ver+11)' may be used uninitialized in this function [-Wuninitialized]:  => 212:2

Reported in
Build regressions/improvements in v4.9-rc3
https://lkml.org/lkml/2016/10/30/57

[js] the check is in 3.12 only once

Fixes: 59fcd7c63a (mei: nfc: Initial nfc implementation)
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2017-02-10 11:04:04 +01:00
Mallikarjuna Reddy Amireddy f7fdce7e4a qseecom: remove entry from qseecom_registered_app_list
In an error handling case, the QSEECOM_IOCTL_LOAD_APP_REQ ioctl
freed the entry for new TA, but didn't removed it from
qseecom_registered_app_list. Make change to remove it.

Bug: 31804432
Change-Id: Id681fbf3c923027d3db875d506cbe3f971919a8d
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
2016-12-07 07:42:32 +00:00
Patrick Tjin 01872d075e Merge branch android-msm-bullhead-3.10-security-next into android-msm-bullhead-3.10
December 2016.1
2016-10-21 15:59:23 -07:00
Haynes Mathew George 0aed34c9c5 ASoC: msm: lock read/write when add/free audio ion memory
As read/write get access to ion memory region as well, it's
necessary to lock them when ion memory is about to be added/freed
to avoid racing cases.

Bug: 31252384
CRs-Fixed: 1071809
Change-Id: I436ead23c93384961b38ca99b9312a40c50ad03a
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
2016-10-18 07:01:57 +00:00
Roopesh Rajashekharaiah Nataraja da84eb7182 qseecom: Fix ion memory issue during unload app failure
qseecom still needs to free ion memory if unload app failed.
The previous xpu violation related to unload app failure is
actually due to race condition between send command, which
is fixed and now it is safe to free ion memory in error cases.

Change-Id: I7a09c753360eb015ece15c48ae1bb34e30479560

Bug: 31220655
Signed-off-by: Roopesh Rajashekharaiah Nataraja <roopeshr@codeaurora.org>
2016-09-26 18:31:22 +00:00
Roopesh Rajashekharaiah Nataraja 3ff44bb13f qseecom: don't release ion share memory if scm_call unload TA failed
If a scm_call request to shutdown a TA fails, the TA is not shut down
and still in use, and the resources aren't necessarily leaked. Since
shared memory are still locked in this situation, ion shared memory
cannot be released, otherwise XPU violation occurs. Only need to
release shared memory if TA is unloaded success or that TA cannot
be found.

Change-Id: I971485fb541193f77960cc7ca14b5b09de938a43

Bug: 31220655
Signed-off-by: Roopesh Rajashekharaiah Nataraja <roopeshr@codeaurora.org>
2016-09-26 18:31:12 +00:00
Roopesh Rajashekharaiah Nataraja 45255af9f1 qseecom: release ION memory if qseecom failed to unload app
To avoid memory leakage, make change to release ION memory if qseecom
failed to unload TZ app, which is allocated when starting app.

CRs-Fixed: 977073
Change-Id: Ic4c9a7d7a118ff5026ce6ce7769a4c053906ed2d

Bug: 31220655
Signed-off-by: Roopesh Rajashekharaiah Nataraja <roopeshr@codeaurora.org>
2016-09-26 18:30:55 +00:00
vivek mehta eed6ef84a9 misc: qcom: qdsp6v2: initialize wma_config_32
Not all memebers of wma_config_32 are set before they are used which
might lead to invalid values being passed and used. To fix this issue
initialize all member variables of struct wma_config_32 to 0 before
assigning specific values individually.

Bug: 30593266
Change-Id: Ibb082ce691625527e9a9ffd4978dea7ba4df9e84
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Signed-off-by: vivek mehta <mvivek@codeaurora.org>
Signed-off-by: Siqi Lin <siqilin@google.com>
2016-09-17 06:58:04 +00:00
Biswajit Paul e06cd33b5e ASoC: msm: Add Buffer overflow check
The overflow check is required to ensure that user space data
in kernel may not go beyond buffer boundary.

Bug: 28751152
CRs-Fixed: 1064411
Change-Id: I54c28a8942cf1a6a47a4e8272f3159b35d753ead
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
2016-09-17 06:12:53 +00:00
Yuan Lin 93f82eb241 Revert "Asoc:msm:Added Buffer overflow check"
This patch caused a regression, replacing it with a new patch.

Bug: 28751152

This reverts commit 9a37eaf0e2d4cfde30a5733282d18928620eff71.
2016-09-17 05:55:41 +00:00
vivek mehta 57e166c205 misc: qcom: qdsp6v2: initialize config_32
Not all members of config_32 are set before they are used which
might lead to invalid values being passed and used. To fix this issue
initialize all member variables of struct config_32 to 0 before
assigning specific values individually.

Bug: 30741851
Change-Id: Ifea3a6e8bf45481c65a4455ee64318304798fee2
Signed-off-by: vivek mehta <mvivek@codeaurora.org>
2016-09-17 05:28:59 +00:00
Mallikarjuna Reddy Amireddy d471b05f0d qseecom: Change format specifier %p to %pK
Format specifier %p can leak kernel addresses while not valuing the
kptr_restrict system settings. When kptr_restrict is set to (1), kernel
pointers printed using the %pK format specifier will be replaced with 0's.
So that %pK will not leak kernel pointers to unprivileged users.
So change the format specifier from %p to %pK.

Debugging Note : &pK prints only Zeros as address. if you need actual
address information, pls echo 0 to kptr_restrict.
$ echo 0 > /proc/sys/kernel/kptr_restrict

Bug: 31498159
Change-Id: I0baf2be2d5a476e2e4267f20b99d0ddf5492469e
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
2016-09-16 18:03:30 +00:00