OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
6 years agopacket: fix race condition in packet_set_ring
Srinivasa Rao Kuppala [Wed, 30 Nov 2016 22:55:36 +0000 (14:55 -0800)]
packet: fix race condition in packet_set_ring

commit 5a01eaf19858 ("packet: fix race condition
in packet_set_ring") was incorrectly resolved.
Add the missing lock_sock(sk) and release_sock(sk) calls.

Change-Id: I6565bf3e3c6a15d6f1b93cab0536424dbacb187b
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
6 years agoMerge "defconfig: msm: enable lpass resource mgr for msm8996-auto"
Linux Build Service Account [Sun, 27 May 2018 16:11:15 +0000 (09:11 -0700)]
Merge "defconfig: msm: enable lpass resource mgr for msm8996-auto"

6 years agoMerge "ARM: dts: msm: add lpass resource mgr on automotive msm8996"
Linux Build Service Account [Sun, 27 May 2018 16:11:14 +0000 (09:11 -0700)]
Merge "ARM: dts: msm: add lpass resource mgr on automotive msm8996"

6 years agoMerge "defconfig: msm: enable Sensor DSP framework"
Linux Build Service Account [Sun, 27 May 2018 16:11:12 +0000 (09:11 -0700)]
Merge "defconfig: msm: enable Sensor DSP framework"

6 years agoMerge "msm: ipa: fix to not allow NAT DMA command without device initialization"
Linux Build Service Account [Sun, 27 May 2018 09:06:58 +0000 (02:06 -0700)]
Merge "msm: ipa: fix to not allow NAT DMA command without device initialization"

6 years agoMerge "defconfig: msmcortex: Enable INET_UDP_DIAG"
Linux Build Service Account [Sat, 26 May 2018 20:26:54 +0000 (13:26 -0700)]
Merge "defconfig: msmcortex: Enable INET_UDP_DIAG"

6 years agoMerge "defconfig: sdm660: Enable INET_UDP_DIAG"
Linux Build Service Account [Sat, 26 May 2018 20:26:53 +0000 (13:26 -0700)]
Merge "defconfig: sdm660: Enable INET_UDP_DIAG"

6 years agoMerge "asoc: msm8998: Add configuration for adaptive bitrate."
Linux Build Service Account [Sat, 26 May 2018 20:26:52 +0000 (13:26 -0700)]
Merge "asoc: msm8998: Add configuration for adaptive bitrate."

6 years agomsm: ipa: fix to not allow NAT DMA command without device initialization
Mohammed Javid [Fri, 11 May 2018 08:24:54 +0000 (13:54 +0530)]
msm: ipa: fix to not allow NAT DMA command without device initialization

Without NAT device initialization sending NAT DMA
commands leads to XPU violation. Added checks to
verify device initialized or not before sending DMA
command.

Change-Id: I7440abc14a81e1621573f0e2808a410d60b2458d
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
6 years agoMerge "Merge android-4.4.132 (46155cc) into msm-4.4"
Linux Build Service Account [Fri, 25 May 2018 15:58:08 +0000 (08:58 -0700)]
Merge "Merge android-4.4.132 (46155cc) into msm-4.4"

6 years agoMerge "defconfig: msm-auto: Enable PASR driver for msm8996"
Linux Build Service Account [Fri, 25 May 2018 15:58:03 +0000 (08:58 -0700)]
Merge "defconfig: msm-auto: Enable PASR driver for msm8996"

6 years agoMerge "soc: qcom: pasr: Add MSM PASR driver"
Linux Build Service Account [Fri, 25 May 2018 15:58:02 +0000 (08:58 -0700)]
Merge "soc: qcom: pasr: Add MSM PASR driver"

6 years agoMerge "usb: Use DECLARE_USB_FUNCTION() for initializing USB QDSS function driver"
Linux Build Service Account [Fri, 25 May 2018 07:09:44 +0000 (00:09 -0700)]
Merge "usb: Use DECLARE_USB_FUNCTION() for initializing USB QDSS function driver"

6 years agoMerge "power: qpnp-fg-gen3: Restore recharge SOC only when not in JEITA"
Linux Build Service Account [Fri, 25 May 2018 07:09:42 +0000 (00:09 -0700)]
Merge "power: qpnp-fg-gen3: Restore recharge SOC only when not in JEITA"

6 years agoMerge "ARM: dts: msm: remove leakage on ldo26 for msm8996"
Linux Build Service Account [Fri, 25 May 2018 07:09:40 +0000 (00:09 -0700)]
Merge "ARM: dts: msm: remove leakage on ldo26 for msm8996"

6 years agousb: Use DECLARE_USB_FUNCTION() for initializing USB QDSS function driver
Mayank Rana [Wed, 23 May 2018 22:05:17 +0000 (15:05 -0700)]
usb: Use DECLARE_USB_FUNCTION() for initializing USB QDSS function driver

USB QDSS function driver is already registered as module and having init
and exit APIs. DECLARE_USB_FUNCTION_INIT() adds additional module entries
for USB QDSS function driver. This results into seeing error as
"usb_qdss_init: failed to register diag -17" when usb_function_register()
is called 2nd time. Hence fix this issue by using DECLARE_USB_FUNCTION()
instead of DECLARE_USB_FUNCTION_INIT() API.

Change-Id: I37da484eaa44e60e331d18fa720289a2dff8ad50
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
6 years agopower: qpnp-fg-gen3: Restore recharge SOC only when not in JEITA
Subbaraman Narayanamurthy [Fri, 27 Apr 2018 21:30:37 +0000 (14:30 -0700)]
power: qpnp-fg-gen3: Restore recharge SOC only when not in JEITA

Currently, recharge SOC is adjusted (lowered) based on the SOC
where charging terminates. It is restored back to the original
threshold when the charge termination condition goes away. This
works fine in most cases. However there are certain conditions
where the charger fluctuates between fast and taper regions along
with the charge termination status.

Handle this by checking if battery is out of JEITA as well before
restoring back the original recharge SOC threshold.

CRs-Fixed: 2213369
Change-Id: Ic64151ddbbff09c26d6ebfcd3e6d4e70e0be8c9d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
6 years agoMerge "ASoC: msm: Modify buf size check to prevent OOB error"
Linux Build Service Account [Thu, 24 May 2018 09:46:46 +0000 (02:46 -0700)]
Merge "ASoC: msm: Modify buf size check to prevent OOB error"

6 years agoMerge "drm/msm : check buffer size before writing to user buffer"
Linux Build Service Account [Thu, 24 May 2018 09:46:44 +0000 (02:46 -0700)]
Merge "drm/msm : check buffer size before writing to user buffer"

6 years agoMerge "drm/msm/sde: fix array overflow"
Linux Build Service Account [Thu, 24 May 2018 09:46:44 +0000 (02:46 -0700)]
Merge "drm/msm/sde: fix array overflow"

6 years agoMerge "fb: msm_dba: disable timing generator correctly during suspend"
Linux Build Service Account [Thu, 24 May 2018 09:46:43 +0000 (02:46 -0700)]
Merge "fb: msm_dba: disable timing generator correctly during suspend"

6 years agoMerge "ARM: dts: msm: remove modem region reserved on APQ8096 ADP"
Linux Build Service Account [Thu, 24 May 2018 09:46:41 +0000 (02:46 -0700)]
Merge "ARM: dts: msm: remove modem region reserved on APQ8096 ADP"

6 years agoMerge "msm: camera: Fix for Possible information leak issue"
Linux Build Service Account [Thu, 24 May 2018 09:46:40 +0000 (02:46 -0700)]
Merge "msm: camera: Fix for Possible information leak issue"

6 years agoMerge "ARM: dts: msm: Configure irq flag for blsp_uart2 in 8996 gvm"
Linux Build Service Account [Thu, 24 May 2018 09:46:38 +0000 (02:46 -0700)]
Merge "ARM: dts: msm: Configure irq flag for blsp_uart2 in 8996 gvm"

6 years agoMerge "power: smb-lib: Allow PD enable/disable for typeC devices only"
Linux Build Service Account [Thu, 24 May 2018 09:46:37 +0000 (02:46 -0700)]
Merge "power: smb-lib: Allow PD enable/disable for typeC devices only"

6 years agoMerge "cfg80211: Add backport flag for user cellular base hint"
Linux Build Service Account [Thu, 24 May 2018 09:46:36 +0000 (02:46 -0700)]
Merge "cfg80211: Add backport flag for user cellular base hint"

6 years agoMerge "cfg80211: Call reg_notifier for self managed hints conditionally"
Linux Build Service Account [Thu, 24 May 2018 09:46:35 +0000 (02:46 -0700)]
Merge "cfg80211: Call reg_notifier for self managed hints conditionally"

6 years agodefconfig: msm-auto: Enable PASR driver for msm8996
Arun KS [Mon, 16 Apr 2018 05:55:55 +0000 (11:25 +0530)]
defconfig: msm-auto: Enable PASR driver for msm8996

Enable DDR self-refresh vote/unvote feature for msm8996 based
auto boards.

Change-Id: I27aa6da4de6497130b6262c3bac4d5bc8f0623e8
Signed-off-by: Arun KS <arunks@codeaurora.org>
6 years agosoc: qcom: pasr: Add MSM PASR driver
Arun KS [Thu, 22 Feb 2018 13:29:19 +0000 (18:59 +0530)]
soc: qcom: pasr: Add MSM PASR driver

Partial Array Self-Refresh driver is used to interface
with rpm to vote/unvote on memory self-refresh from HLOS.

Driver listens to memory hotplug notifications and decides
to vote or unvote depending on memory online and offline.
This vote is considered by RPM to avoid self-refresh on
offlined DDR segments. And hence a reduce in power consumption.

Change-Id: Ida2b36d671c6379dc3c07258a95cf15ae07a4bc0
Signed-off-by: Arun KS <arunks@codeaurora.org>
6 years agoasoc: msm8998: Add configuration for adaptive bitrate.
Soumya Managoli [Tue, 8 May 2018 05:01:22 +0000 (10:31 +0530)]
asoc: msm8998: Add configuration for adaptive bitrate.

Add hostless front end DAI to trigger backend
configuration of BT backend dai required for
configuring BT ABR statistics. Add mixer ctrls
to independently configure TX and RX sample
rates to allow BT RX and TX backends.

Change-Id: Iac3cd5317db2653a87f106d43cfc7fe90e4f4875
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
6 years agoMerge "msm: ipa: Fix to slab out of bounds issue"
Linux Build Service Account [Thu, 24 May 2018 01:44:49 +0000 (18:44 -0700)]
Merge "msm: ipa: Fix to slab out of bounds issue"

6 years agoMerge "spmi: pmic-arb: support updating interrupt type flags"
Linux Build Service Account [Thu, 24 May 2018 01:44:47 +0000 (18:44 -0700)]
Merge "spmi: pmic-arb: support updating interrupt type flags"

6 years agoARM: dts: msm: Configure irq flag for blsp_uart2 in 8996 gvm
Vivek Kumar [Thu, 3 May 2018 08:32:43 +0000 (14:02 +0530)]
ARM: dts: msm: Configure irq flag for blsp_uart2 in 8996 gvm

Configure irq flag as level high for blsp_uart2 wake-up
interrupt in msm8996 gvm.

Change-Id: I028ea5ea36da2a97c6878b763fcde1ebbbed9847
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
6 years agoARM: dts: msm: remove leakage on ldo26 for msm8996
vkakani [Tue, 15 May 2018 08:40:39 +0000 (14:10 +0530)]
ARM: dts: msm: remove leakage on ldo26 for msm8996

ssc_sensor voting the ldo26 clock causing leak
disable ssc_sensor which is not required for auto.

Change-Id: I1bc5c3c0f091ad3f7fc0d2180e1825b5019648ec
Signed-off-by: vkakani <vkakani@codeaurora.org>
6 years agoserial: msm_serial_hs: Configure IRQ flag
Vivek Kumar [Thu, 3 May 2018 09:14:24 +0000 (14:44 +0530)]
serial: msm_serial_hs: Configure IRQ flag

Configure irq flag for wake_up IRQ which is
passed from the DT.

Change-Id: Ib521a73a6164053c9bf846078482afb6671b76e0
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
6 years agoMerge android-4.4.132 (46155cc) into msm-4.4
Srinivasarao P [Tue, 22 May 2018 09:39:44 +0000 (15:09 +0530)]
Merge android-4.4.132 (46155cc) into msm-4.4

* refs/heads/tmp-46155cc
  Linux 4.4.132
  perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map()
  perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[]
  perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver
  perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr
  perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_*
  tracing/uprobe_event: Fix strncpy corner case
  Revert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174"
  atm: zatm: Fix potential Spectre v1
  net: atm: Fix potential Spectre v1
  can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg()
  tracing: Fix regex_match_front() to not over compare the test string
  libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs
  rfkill: gpio: fix memory leak in probe error path
  xfrm_user: fix return value from xfrm_user_rcv_msg
  f2fs: fix a dead loop in f2fs_fiemap()
  bdi: Fix oops in wb_workfn()
  tcp: fix TCP_REPAIR_QUEUE bound checking
  perf: Remove superfluous allocation error check
  soreuseport: initialise timewait reuseport field
  dccp: initialize ireq->ir_mark
  net: fix uninit-value in __hw_addr_add_ex()
  net: initialize skb->peeked when cloning
  net: fix rtnh_ok()
  netlink: fix uninit-value in netlink_sendmsg
  crypto: af_alg - fix possible uninit-value in alg_bind()
  ipvs: fix rtnl_lock lockups caused by start_sync_thread
  usb: musb: host: fix potential NULL pointer dereference
  USB: serial: option: adding support for ublox R410M
  USB: serial: option: reimplement interface masking
  USB: Accept bulk endpoints with 1024-byte maxpacket
  USB: serial: visor: handle potential invalid device configuration
  test_firmware: fix setting old custom fw path back on exit, second try
  drm/vmwgfx: Fix a buffer object leak
  IB/mlx5: Use unlimited rate when static rate is not supported
  NET: usb: qmi_wwan: add support for ublox R410M PID 0x90b2
  RDMA/mlx5: Protect from shift operand overflow
  RDMA/ucma: Allow resolving address w/o specifying source address
  xfs: prevent creating negative-sized file via INSERT_RANGE
  Input: atmel_mxt_ts - add touchpad button mapping for Samsung Chromebook Pro
  Input: leds - fix out of bound access
  tracepoint: Do not warn on ENOMEM
  ALSA: aloop: Add missing cable lock to ctl API callbacks
  ALSA: aloop: Mark paused device as inactive
  ALSA: seq: Fix races at MIDI encoding in snd_virmidi_output_trigger()
  ALSA: pcm: Check PCM state at xfern compat ioctl
  USB: serial: option: Add support for Quectel EP06
  gpmi-nand: Handle ECC Errors in erased pages
  ath10k: rebuild crypto header in rx data frames
  ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode
  mac80211: Add RX flag to indicate ICV stripped
  mac80211: allow same PN for AMSDU sub-frames
  mac80211: allow not sending MIC up from driver for HW crypto
  percpu: include linux/sched.h for cond_resched()
  KVM: s390: Enable all facility bits that are known good for passthrough
  bpf: map_get_next_key to return first key on NULL
  perf/core: Fix the perf_cpu_time_max_percent check
  goldfish: pipe: ANDROID: mark local functions static
  Revert "goldfish: pipe: ANDROID: Allocate memory with GFP_KERNEL."
  UPSTREAM: ANDROID: binder: prevent transactions into own process.
  goldfish: pipe: ANDROID: Add DMA support
  UPSTREAM: f2fs: clear PageError on writepage - part 2
  UPSTREAM: f2fs: avoid fsync() failure caused by EAGAIN in writepage()
  ANDROID: build.config: enforce trace_printk check
  ANDROID: x86_64_cuttlefish_defconfig: Disable KPTI
  UPSTREAM: mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss()
  UPSTREAM: mac80211: Fix clang warning about constant operand in logical operation
  UPSTREAM: nl80211: Fix enum type of variable in nl80211_put_sta_rate()
  UPSTREAM: sysfs: remove signedness from sysfs_get_dirent
  UPSTREAM: tracing: Use cpumask_available() to check if cpumask variable may be used
  BACKPORT: clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK
  UPSTREAM: netpoll: Fix device name check in netpoll_setup()
  FROMLIST: staging: Fix sparse warnings in vsoc driver.
  FROMLIST: staging: vsoc: Fix a i386-randconfig warning.
  FROMLIST: staging: vsoc: Create wc kernel mapping for region shm.
  Revert "goldfish: pipe: ANDROID: remove a redundant target"
  goldfish: pipe: ANDROID: Replace writel with gf_write_ptr
  goldfish: pipe: ANDROID: Use dev_ logging instead of pr_
  goldfish: pipe: ANDROID: fix checkpatch warnings
  goldfish: pipe: ANDROID: Update module license

Conflicts:
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/htt_rx.c

Change-Id: If2ede1dea6a07b3fd498724e83071fd547170e1c
[spathi@codeaurora.org: resolved compilation errors in ath10k
by rebuilding crypto header in rx data frames]
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agodefconfig: msmcortex: Enable INET_UDP_DIAG
Tejaswi Tanikella [Tue, 22 May 2018 07:29:28 +0000 (12:59 +0530)]
defconfig: msmcortex: Enable INET_UDP_DIAG

Enable config to enable UDP stats collection by ss tool.
  "ss -uneiopan" should work now.

Change-Id: If74647d5027f509c7f4f5878aae8e051ed15c979
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
6 years agoARM: dts: msm: remove modem region reserved on APQ8096 ADP
Vivek Kumar [Mon, 21 May 2018 08:50:05 +0000 (14:20 +0530)]
ARM: dts: msm: remove modem region reserved on APQ8096 ADP

This reverts commit bb5f7ce39ea3c49764774ff1b5ab02c0f4bc713d.
GPS uses modem memory in lahb115 for 8996 APQ.

Change-Id: I0784af084f764b64dc1acfa0236a7e4ef949193d
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
6 years agodefconfig: sdm660: Enable INET_UDP_DIAG
Tejaswi Tanikella [Tue, 22 May 2018 07:22:52 +0000 (12:52 +0530)]
defconfig: sdm660: Enable INET_UDP_DIAG

Enable config to enable UDP stats collection by ss tool.
  "ss -uneiopan" should work now.

Change-Id: I6535055c12646826e6f96e8cb17dc8bf5e02f37e
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
6 years agoMerge "soc: qcom: scm_qcpe: Fix unused variable warning"
Linux Build Service Account [Tue, 22 May 2018 04:44:22 +0000 (21:44 -0700)]
Merge "soc: qcom: scm_qcpe: Fix unused variable warning"

6 years agoMerge "msm:ais: Remove recursive locks"
Linux Build Service Account [Tue, 22 May 2018 04:44:21 +0000 (21:44 -0700)]
Merge "msm:ais: Remove recursive locks"

6 years agoMerge "arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW"
Linux Build Service Account [Mon, 21 May 2018 15:45:44 +0000 (08:45 -0700)]
Merge "arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW"

6 years agopower: smb-lib: Allow PD enable/disable for typeC devices only
Umang Agrawal [Thu, 26 Apr 2018 10:22:40 +0000 (15:52 +0530)]
power: smb-lib: Allow PD enable/disable for typeC devices only

Currently if pd is not allowed, we force pd_active to 0 inorder
to run the legacy workaround and rerun apsd. But, this workaround
is required only for typeC devices.

Add a check to prevent PD disable for micro usb device.

Change-Id: I842166f66065c281ab366da327080b09a5e282e1
Signed-off-by: Umang Agrawal <uagrawal@codeaurora.org>
6 years agomsm: camera: Fix for Possible information leak issue
annamraj [Wed, 11 Apr 2018 05:12:13 +0000 (10:42 +0530)]
msm: camera: Fix for Possible information leak issue

Fix for possible information leak issue because of unintialised variable
Which can be accesed from userspace in camera fd driver

Signed-off-by: annamraj <annamraj@codeaurora.org>
Change-Id: I4552c4829e9532d848e46fd123316b26105e310e

6 years agomsm: ipa: Fix to slab out of bounds issue
Mohammed Javid [Tue, 10 Apr 2018 10:03:48 +0000 (15:33 +0530)]
msm: ipa: Fix to slab out of bounds issue

Add changes to verify passed value with in the allocated
max array size range or not before accessing structure.

Change-Id: If70493e937f6f0bc29bbfe08bf43738bdb4e9cf4
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
6 years agosoc: qcom: scm_qcpe: Fix unused variable warning
Amit Blay [Mon, 21 May 2018 05:47:11 +0000 (08:47 +0300)]
soc: qcom: scm_qcpe: Fix unused variable warning

Fix an unused variable warning when GHS flag is not defined.

Change-Id: Icd5b8bbb0e1bd7bedbaa6c806889d21213cb23f2
Signed-off-by: Amit Blay <ablay@codeaurora.org>
6 years agoarm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
Will Deacon [Thu, 8 Jun 2017 23:44:22 +0000 (16:44 -0700)]
arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW

Recently vDSO support for CLOCK_MONOTONIC_RAW was added in
49eea433b326 ("arm64: Add support for CLOCK_MONOTONIC_RAW in
clock_gettime() vDSO"). Noticing that the core timekeeping code
never set tkr_raw.xtime_nsec, the vDSO implementation didn't
bother exposing it via the data page and instead took the
unshifted tk->raw_time.tv_nsec value which was then immediately
shifted left in the vDSO code.

Unfortunately, by accellerating the MONOTONIC_RAW clockid, it
uncovered potential 1ns time inconsistencies caused by the
timekeeping core not handing sub-ns resolution.

Now that the core code has been fixed and is actually setting
tkr_raw.xtime_nsec, we need to take that into account in the
vDSO by adding it to the shifted raw_time value, in order to
fix the user-visible inconsistency. Rather than do that at each
use (and expand the data page in the process), instead perform
the shift/addition operation when populating the data page and
remove the shift from the vDSO code entirely.

[jstultz: minor whitespace tweak, tried to improve commit
 message to make it more clear this fixes a regression]

Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Tested-by: Daniel Mentz <danielmentz@google.com>
Acked-by: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Cc: "stable #4 . 8+" <stable@vger.kernel.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Link: http://lkml.kernel.org/r/1496965462-20003-4-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Git-commit: dbb236c1ceb697a559e0694ac4c9e7b9131d0b16
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: Ifa530498a6cd364ef258691ddf03cd3bc2a860b5
[vivekuma@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
6 years agomsm:ais: Remove recursive locks
Suprith Malligere Shankaregowda [Mon, 7 May 2018 09:00:20 +0000 (14:30 +0530)]
msm:ais: Remove recursive locks

We are trying to acquire the same mutex lock twice
in iotcl path and axi/stats start stream.
Removed recursive locks.

Change-Id: I331f79e5a387aa64600656f6377ba46385d11a83
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
6 years agodrm/msm/sde: fix array overflow
Lan Zou [Fri, 27 Apr 2018 11:20:21 +0000 (19:20 +0800)]
drm/msm/sde: fix array overflow

Array ilm_pair_mask may use index larger than its size. This change
can avoid the risk happens.

Change-Id: I18b2ae814aa19e6c76884bbe71cdd9ea659ce05a
Signed-off-by: Lan Zou <lanz@codeaurora.org>
6 years agoMerge "ASoC: msm: check payload size before memory allocation"
Linux Build Service Account [Mon, 21 May 2018 02:31:52 +0000 (19:31 -0700)]
Merge "ASoC: msm: check payload size before memory allocation"

6 years agoMerge "ASoC: msm: qdsp6v2: return the proper LPASS status"
Linux Build Service Account [Mon, 21 May 2018 02:31:51 +0000 (19:31 -0700)]
Merge "ASoC: msm: qdsp6v2: return the proper LPASS status"

6 years agoMerge "Ath10k: enable WLAN channel switch announcement offload"
Linux Build Service Account [Sat, 19 May 2018 21:01:37 +0000 (14:01 -0700)]
Merge "Ath10k: enable WLAN channel switch announcement offload"

6 years agoMerge "Revert "usb: host: Add support for usb core indexing""
Linux Build Service Account [Sat, 19 May 2018 21:01:21 +0000 (14:01 -0700)]
Merge "Revert "usb: host: Add support for usb core indexing""

6 years agoMerge "ARM: dts: msm: IPA clock switches to virtual clock on msm8996 vplatform"
Linux Build Service Account [Sat, 19 May 2018 21:01:16 +0000 (14:01 -0700)]
Merge "ARM: dts: msm: IPA clock switches to virtual clock on msm8996 vplatform"

6 years agoMerge "ARM: dts: msm: Enable required USB nodes for 8996 lagvm"
Linux Build Service Account [Sat, 19 May 2018 10:29:39 +0000 (03:29 -0700)]
Merge "ARM: dts: msm: Enable required USB nodes for 8996 lagvm"

6 years agoMerge "Revert "cfg80211: Define new API to send reg change event""
Linux Build Service Account [Sat, 19 May 2018 10:29:34 +0000 (03:29 -0700)]
Merge "Revert "cfg80211: Define new API to send reg change event""

6 years agoMerge "Revert "reg: qcom: call reg notifier during wiphy registration""
Linux Build Service Account [Sat, 19 May 2018 10:29:28 +0000 (03:29 -0700)]
Merge "Revert "reg: qcom: call reg notifier during wiphy registration""

6 years agoAth10k: enable WLAN channel switch announcement offload
Sarada Prasanna Garnayak [Thu, 10 May 2018 09:15:01 +0000 (14:45 +0530)]
Ath10k: enable WLAN channel switch announcement offload

The WLAN firmware supports the channel switch offload and
channel switch announcement event reporting to the WLAN driver.
In STA mode this feature adds support to wakeup the device from
the wow suspend on channel switch announcement by the connected
access point.

CRs-Fixed: 2170011
Change-Id: I68612beb0a808700a732fc858c8797200d1f4819
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
6 years agodrm/msm : check buffer size before writing to user buffer
Harsh Sahu [Fri, 23 Mar 2018 06:22:17 +0000 (23:22 -0700)]
drm/msm : check buffer size before writing to user buffer

Check the number of bytes to copy against the size of the
user buffer before copy to user to avoid buffer overflow.

Change-Id: Ida3f2470b8441010adc30312c12c6d75fdd6ccb8
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
6 years agoARM: dts: msm: Enable required USB nodes for 8996 lagvm
c_krikum [Thu, 17 May 2018 12:09:20 +0000 (17:39 +0530)]
ARM: dts: msm: Enable required USB nodes for 8996 lagvm

Enable required USB nodes in LA-GVM specific dts
for msm8996.

Change-Id: I6359f6b7435383019d920e97f574c23ed557a67b
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
6 years agoARM: dts: msm: IPA clock switches to virtual clock on msm8996 vplatform
Zhiqiang Tu [Tue, 10 Apr 2018 02:40:25 +0000 (10:40 +0800)]
ARM: dts: msm: IPA clock switches to virtual clock on msm8996 vplatform

Virtual clock driver has added support for RPM controlled clock.
So change the IPA clock which is controlled by RPM from dummy
clock to virtual clock.

Change-Id: If0a95fd0cb530c7a230105f5035373e7cac2c102
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
6 years agoMerge "msm: mdss: Increase fbmem buf ref count before use in mdp3"
Linux Build Service Account [Thu, 17 May 2018 19:23:36 +0000 (12:23 -0700)]
Merge "msm: mdss: Increase fbmem buf ref count before use in mdp3"

6 years agoMerge "diag: Add new log codes to diag mask"
Linux Build Service Account [Thu, 17 May 2018 19:23:34 +0000 (12:23 -0700)]
Merge "diag: Add new log codes to diag mask"

6 years agoMerge changes into msm-4.4
Gerrit - the friendly Code Review server [Thu, 17 May 2018 19:06:46 +0000 (12:06 -0700)]
Merge changes  into msm-4.4

6 years agocfg80211: Add backport flag for user cellular base hint
Amar Singhal [Wed, 16 May 2018 19:20:18 +0000 (12:20 -0700)]
cfg80211: Add backport flag for user cellular base hint

Upstream commit aced43ce780dc5e683b3de00ce9fb3db7d28e1d3 ("cfg80211: Call
reg_notifier for self managed hints conditionally") adds support
for processing user cell_base hints when wiphy is self managed. Add
backport flag for the same.

Change-Id: I44e083f4346cc95eb2f80eeec7d56f305e7ecce0
CRs-Fixed: 2201959
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
6 years agocfg80211: Call reg_notifier for self managed hints conditionally
Amar Singhal [Thu, 26 Apr 2018 17:13:07 +0000 (20:13 +0300)]
cfg80211: Call reg_notifier for self managed hints conditionally

Currently the regulatory core does not call the regulatory callback
reg_notifier for self managed wiphys, but regulatory_hint_user() call is
independent of wiphy and is meant for all wiphys in the system. Even a
self managed wiphy may be interested in regulatory_hint_user() to know
the country code from a trusted regulatory domain change like a cellular
base station. Therefore, for the regulatory source
NL80211_REGDOM_SET_BY_USER and the user hint type
NL80211_USER_REG_HINT_CELL_BASE, call the regulatory notifier.

No current wlan driver uses the REGULATORY_WIPHY_SELF_MANAGED flag while
also registering the reg_notifier regulatory callback, therefore there
will be no impact on existing drivers without them being explicitly
modified to take advantage of this new possibility.

Change-Id: Ibd700eae551840c94daa8b721add74a8e744c748
CRs-Fixed: 2201959
Git-commit: aced43ce780dc5e683b3de00ce9fb3db7d28e1d3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
6 years agoRevert "cfg80211: Define new API to send reg change event"
Amar Singhal [Wed, 7 Mar 2018 19:41:48 +0000 (11:41 -0800)]
Revert "cfg80211: Define new API to send reg change event"

This reverts commit 98d5572dd2ec954f516f9fd5b55dcef2b09a1d7c. This API
no more needed since user would use existing kernel API.

Change-Id: I2d5a19fc9159da5ef7020cb1808b704b0344087e
CRs-Fixed: 2201959
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
6 years agoRevert "reg: qcom: call reg notifier during wiphy registration"
Amar Singhal [Wed, 7 Mar 2018 20:58:55 +0000 (12:58 -0800)]
Revert "reg: qcom: call reg notifier during wiphy registration"

This reverts commit 2aa0bb3ac04d659292993423415a98a9b3cdda49. Upstream
commit aced43ce780dc5 ("cfg80211: Call reg_notifier for self managed
hints conditionally") replaces this functionality.

Change-Id: If52d83577ab2f136540f70ba17d417718ba05ddf
CRs-Fixed: 2201959
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
6 years agoRevert "reg: qcom: call regulatory callback for self managed hints"
Amar Singhal [Tue, 10 Apr 2018 16:35:27 +0000 (09:35 -0700)]
Revert "reg: qcom: call regulatory callback for self managed hints"

This reverts commit 31e37a680dcbb02ba41d17972dba0b298cf1983d. Upstream
commit aced43ce780d ("cfg80211: Call reg_notifier for self managed
hints conditionally") replaces this functionality.

Change-Id: Ic0c3a235aee2dc8ccb36014c60314217b98b5b97
CRs-Fixed: 2201959
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
6 years agoMerge "rh850: Add support to get irq type from device tree"
Linux Build Service Account [Thu, 17 May 2018 10:38:43 +0000 (03:38 -0700)]
Merge "rh850: Add support to get irq type from device tree"

6 years agoMerge "clk: msm: Add rpm controlled clock support for virtual clock"
Linux Build Service Account [Thu, 17 May 2018 10:38:41 +0000 (03:38 -0700)]
Merge "clk: msm: Add rpm controlled clock support for virtual clock"

6 years agoMerge "lpm-levels: Remove kfree for memory allocated with devm_kzalloc"
Linux Build Service Account [Thu, 17 May 2018 10:38:39 +0000 (03:38 -0700)]
Merge "lpm-levels: Remove kfree for memory allocated with devm_kzalloc"

6 years agoMerge "dsp: codecs: use native API to configure PCM output block in multiaac"
Linux Build Service Account [Thu, 17 May 2018 10:38:38 +0000 (03:38 -0700)]
Merge "dsp: codecs: use native API to configure PCM output block in multiaac"

6 years agoMerge "ARM: dts: msm: Add fastrpc vmid flag for sdm630"
Linux Build Service Account [Thu, 17 May 2018 10:38:37 +0000 (03:38 -0700)]
Merge "ARM: dts: msm: Add fastrpc vmid flag for sdm630"

6 years agoMerge "msm: camera: Update camera CDR mask setting for CPHY mode"
Linux Build Service Account [Thu, 17 May 2018 10:38:35 +0000 (03:38 -0700)]
Merge "msm: camera: Update camera CDR mask setting for CPHY mode"

6 years agoMerge "Revert "usb: core: Add helper function to return controller id""
Linux Build Service Account [Thu, 17 May 2018 10:38:31 +0000 (03:38 -0700)]
Merge "Revert "usb: core: Add helper function to return controller id""

6 years agoMerge "Revert "usb: host: xhci: Add helper function to return controller id""
Linux Build Service Account [Thu, 17 May 2018 10:38:29 +0000 (03:38 -0700)]
Merge "Revert "usb: host: xhci: Add helper function to return controller id""

6 years agoMerge "Revert "sound: usb: Provide controller number in QMI response""
Linux Build Service Account [Thu, 17 May 2018 10:38:27 +0000 (03:38 -0700)]
Merge "Revert "sound: usb: Provide controller number in QMI response""

6 years agoMerge "ARM: dts: msm: Add speed-bin 4 support for sdm660"
Linux Build Service Account [Thu, 17 May 2018 10:38:25 +0000 (03:38 -0700)]
Merge "ARM: dts: msm: Add speed-bin 4 support for sdm660"

6 years agoMerge "[drm/sde/hdmi] move scrambler setup from mode-set to pre-enable"
Linux Build Service Account [Thu, 17 May 2018 10:38:20 +0000 (03:38 -0700)]
Merge "[drm/sde/hdmi] move scrambler setup from mode-set to pre-enable"

6 years agodiag: Add new log codes to diag mask
Manoj Prabhu B [Thu, 17 May 2018 06:38:51 +0000 (12:08 +0530)]
diag: Add new log codes to diag mask

The patch adds new requested log codes to diag mask.

Change-Id: I4124e55077ae63b9c0c349feed409851108261d3
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
6 years agoMerge "ARM: dts: msm: support msm-pcm-dtmf on msm8996 adsp/cdp"
Linux Build Service Account [Wed, 16 May 2018 17:28:48 +0000 (10:28 -0700)]
Merge "ARM: dts: msm: support msm-pcm-dtmf on msm8996 adsp/cdp"

6 years agoMerge "ASoC: msm: qdsp6v2: increase max Rx DTMF duration"
Linux Build Service Account [Wed, 16 May 2018 17:28:45 +0000 (10:28 -0700)]
Merge "ASoC: msm: qdsp6v2: increase max Rx DTMF duration"

6 years agoARM: dts: msm: Add fastrpc vmid flag for sdm630
Tharun Kumar Merugu [Mon, 25 Sep 2017 08:01:37 +0000 (13:31 +0530)]
ARM: dts: msm: Add fastrpc vmid flag for sdm630

Add device specific flag for new vmid heap shared feature.

Change-Id: Ie6abb5d79162d2cbb80e31922452be249f18c632
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
6 years agoMerge 4.4.132 into android-4.4
Greg Kroah-Hartman [Wed, 16 May 2018 09:32:47 +0000 (11:32 +0200)]
Merge 4.4.132 into android-4.4

Changes in 4.4.132
perf/core: Fix the perf_cpu_time_max_percent check
bpf: map_get_next_key to return first key on NULL
KVM: s390: Enable all facility bits that are known good for passthrough
percpu: include linux/sched.h for cond_resched()
mac80211: allow not sending MIC up from driver for HW crypto
mac80211: allow same PN for AMSDU sub-frames
mac80211: Add RX flag to indicate ICV stripped
ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode
ath10k: rebuild crypto header in rx data frames
gpmi-nand: Handle ECC Errors in erased pages
USB: serial: option: Add support for Quectel EP06
ALSA: pcm: Check PCM state at xfern compat ioctl
ALSA: seq: Fix races at MIDI encoding in snd_virmidi_output_trigger()
ALSA: aloop: Mark paused device as inactive
ALSA: aloop: Add missing cable lock to ctl API callbacks
tracepoint: Do not warn on ENOMEM
Input: leds - fix out of bound access
Input: atmel_mxt_ts - add touchpad button mapping for Samsung Chromebook Pro
xfs: prevent creating negative-sized file via INSERT_RANGE
RDMA/ucma: Allow resolving address w/o specifying source address
RDMA/mlx5: Protect from shift operand overflow
NET: usb: qmi_wwan: add support for ublox R410M PID 0x90b2
IB/mlx5: Use unlimited rate when static rate is not supported
drm/vmwgfx: Fix a buffer object leak
test_firmware: fix setting old custom fw path back on exit, second try
USB: serial: visor: handle potential invalid device configuration
USB: Accept bulk endpoints with 1024-byte maxpacket
USB: serial: option: reimplement interface masking
USB: serial: option: adding support for ublox R410M
usb: musb: host: fix potential NULL pointer dereference
ipvs: fix rtnl_lock lockups caused by start_sync_thread
crypto: af_alg - fix possible uninit-value in alg_bind()
netlink: fix uninit-value in netlink_sendmsg
net: fix rtnh_ok()
net: initialize skb->peeked when cloning
net: fix uninit-value in __hw_addr_add_ex()
dccp: initialize ireq->ir_mark
soreuseport: initialise timewait reuseport field
perf: Remove superfluous allocation error check
tcp: fix TCP_REPAIR_QUEUE bound checking
bdi: Fix oops in wb_workfn()
f2fs: fix a dead loop in f2fs_fiemap()
xfrm_user: fix return value from xfrm_user_rcv_msg
rfkill: gpio: fix memory leak in probe error path
libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs
tracing: Fix regex_match_front() to not over compare the test string
can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg()
net: atm: Fix potential Spectre v1
atm: zatm: Fix potential Spectre v1
Revert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174"
tracing/uprobe_event: Fix strncpy corner case
perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_*
perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr
perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver
perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[]
perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map()
Linux 4.4.132

Change-Id: I66c21e374dff5a5735f1c5958021612387c635bf
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
6 years agoRevert "usb: host: Add support for usb core indexing"
Ajay Agarwal [Fri, 4 May 2018 04:51:57 +0000 (10:21 +0530)]
Revert "usb: host: Add support for usb core indexing"

This reverts commit 03a86f5cb1adaa2e30a70eefd7bc1ab9509eea46.

Remove support for usb core indexing since it is no longer
required to send controller number to remote client.

Change-Id: I8021c10037a668997782327e4c151d8cac2a2ebb
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
6 years agoRevert "ARM: dts: msm: Pass usb controller id for 8996"
Ajay Agarwal [Wed, 16 May 2018 07:11:43 +0000 (12:41 +0530)]
Revert "ARM: dts: msm: Pass usb controller id for 8996"

This reverts commit 745e97d518ee7fcd0836d329747926a8201bbca4.

Remove unique core IDs of the USB controllers on MSM8996.

Change-Id: Ie929c8c11831422e32e8b673abd8c20dfbcc79c5
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
6 years agoLinux 4.4.132
Greg Kroah-Hartman [Wed, 16 May 2018 08:06:53 +0000 (10:06 +0200)]
Linux 4.4.132

6 years agoperf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map()
Peter Zijlstra [Fri, 20 Apr 2018 12:08:58 +0000 (14:08 +0200)]
perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map()

commit 46b1b577229a091b137831becaa0fae8690ee15a upstream.

> arch/x86/events/intel/cstate.c:307 cstate_pmu_event_init() warn: potential spectre issue 'pkg_msr' (local cap)
> arch/x86/events/intel/core.c:337 intel_pmu_event_map() warn: potential spectre issue 'intel_perfmon_event_map'
> arch/x86/events/intel/knc.c:122 knc_pmu_event_map() warn: potential spectre issue 'knc_perfmon_event_map'
> arch/x86/events/intel/p4.c:722 p4_pmu_event_map() warn: potential spectre issue 'p4_general_events'
> arch/x86/events/intel/p6.c:116 p6_pmu_event_map() warn: potential spectre issue 'p6_perfmon_event_map'
> arch/x86/events/amd/core.c:132 amd_pmu_event_map() warn: potential spectre issue 'amd_perfmon_event_map'

Userspace controls @attr, sanitize @attr->config before passing it on
to x86_pmu::event_map().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoperf/core: Fix possible Spectre-v1 indexing for ->aux_pages[]
Peter Zijlstra [Fri, 20 Apr 2018 12:03:18 +0000 (14:03 +0200)]
perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[]

commit 4411ec1d1993e8dbff2898390e3fed280d88e446 upstream.

> kernel/events/ring_buffer.c:871 perf_mmap_to_page() warn: potential spectre issue 'rb->aux_pages'

Userspace controls @pgoff through the fault address. Sanitize the
array index before doing the array dereference.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoperf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver
Peter Zijlstra [Fri, 20 Apr 2018 12:23:36 +0000 (14:23 +0200)]
perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver

commit 06ce6e9b6d6c09d4129c6e24a1314a395d816c10 upstream.

> arch/x86/events/msr.c:178 msr_event_init() warn: potential spectre issue 'msr' (local cap)

Userspace controls @attr, sanitize cfg (attr->config) before using it
to index an array.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoperf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr
Peter Zijlstra [Fri, 20 Apr 2018 12:25:48 +0000 (14:25 +0200)]
perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr

commit a5f81290ce475489fa2551c01a07470c1a4c932e upstream.

> arch/x86/events/intel/cstate.c:307 cstate_pmu_event_init() warn: potential spectre issue 'pkg_msr' (local cap)

Userspace controls @attr, sanitize cfg (attr->config) before using it
to index an array.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoperf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_*
Peter Zijlstra [Fri, 20 Apr 2018 12:06:29 +0000 (14:06 +0200)]
perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_*

commit ef9ee4ad38445a30909c48998624861716f2a994 upstream.

> arch/x86/events/core.c:319 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_event_ids[cache_type]' (local cap)
> arch/x86/events/core.c:319 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_event_ids' (local cap)
> arch/x86/events/core.c:328 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_extra_regs[cache_type]' (local cap)
> arch/x86/events/core.c:328 set_ext_hw_attr() warn: potential spectre issue 'hw_cache_extra_regs' (local cap)

Userspace controls @config which contains 3 (byte) fields used for a 3
dimensional array deref.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agotracing/uprobe_event: Fix strncpy corner case
Masami Hiramatsu [Tue, 10 Apr 2018 12:20:08 +0000 (21:20 +0900)]
tracing/uprobe_event: Fix strncpy corner case

commit 50268a3d266ecfdd6c5873d62b2758d9732fc598 upstream.

Fix string fetch function to terminate with NUL.
It is OK to drop the rest of string.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: security@kernel.org
Cc: 范龙飞 <long7573@126.com>
Fixes: 5baaa59ef09e ("tracing/probes: Implement 'memory' fetch method for uprobes")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174"
Hans de Goede [Thu, 26 Apr 2018 12:18:19 +0000 (14:18 +0200)]
Revert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174"

commit 544a591668813583021474fa5c7ff4942244d654 upstream.

Commit f44cb4b19ed4 ("Bluetooth: btusb: Fix quirk for Atheros
1525/QCA6174") is causing bluetooth to no longer work for several
people, see: https://bugzilla.redhat.com/show_bug.cgi?id=1568911

So lets revert it for now and try to find another solution for
devices which need the modified quirk.

Cc: stable@vger.kernel.org
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoatm: zatm: Fix potential Spectre v1
Gustavo A. R. Silva [Thu, 3 May 2018 18:17:12 +0000 (13:17 -0500)]
atm: zatm: Fix potential Spectre v1

commit 2be147f7459db5bbf292e0a6f135037b55e20b39 upstream.

pool can be indirectly controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

drivers/atm/zatm.c:1462 zatm_ioctl() warn: potential spectre issue
'zatm_dev->pool_info' (local cap)

Fix this by sanitizing pool before using it to index
zatm_dev->pool_info

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonet: atm: Fix potential Spectre v1
Gustavo A. R. Silva [Thu, 3 May 2018 18:45:58 +0000 (13:45 -0500)]
net: atm: Fix potential Spectre v1

commit acf784bd0ce257fe43da7ca266f7a10b837479d2 upstream.

ioc_data.dev_num can be controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:
net/atm/lec.c:702 lec_vcc_attach() warn: potential spectre issue
'dev_lec'

Fix this by sanitizing ioc_data.dev_num before using it to index
dev_lec. Also, notice that there is another instance in which array
dev_lec is being indexed using ioc_data.dev_num at line 705:
lec_vcc_added(netdev_priv(dev_lec[ioc_data.dev_num]),

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agocan: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg()
Jimmy Assarsson [Fri, 20 Apr 2018 12:38:46 +0000 (14:38 +0200)]
can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg()

commit 6ee00865ffe4e8c8ba4a68d26db53c7ec09bbb89 upstream.

Increase rx_dropped, if alloc_can_skb() fails, not tx_dropped.

Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agotracing: Fix regex_match_front() to not over compare the test string
Steven Rostedt (VMware) [Wed, 9 May 2018 15:59:32 +0000 (11:59 -0400)]
tracing: Fix regex_match_front() to not over compare the test string

commit dc432c3d7f9bceb3de6f5b44fb9c657c9810ed6d upstream.

The regex match function regex_match_front() in the tracing filter logic,
was fixed to test just the pattern length from testing the entire test
string. That is, it went from strncmp(str, r->pattern, len) to
strcmp(str, r->pattern, r->len).

The issue is that str is not guaranteed to be nul terminated, and if r->len
is greater than the length of str, it can access more memory than is
allocated.

The solution is to add a simple test if (len < r->len) return 0.

Cc: stable@vger.kernel.org
Fixes: 285caad415f45 ("tracing/filters: Fix MATCH_FRONT_ONLY filter matching")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agolibata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs
Hans de Goede [Thu, 26 Apr 2018 20:32:21 +0000 (22:32 +0200)]
libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs

commit 184add2ca23ce5edcac0ab9c3b9be13f91e7b567 upstream.

Richard Jones has reported that using med_power_with_dipm on a T450s
with a Sandisk SD7UB3Q256G1001 SSD (firmware version X2180501) is
causing the machine to hang.

Switching the LPM to max_performance fixes this, so it seems that
this Sandisk SSD does not handle LPM well.

Note in the past there have been bug-reports about the following
Sandisk models not working with min_power, so we may need to extend
the quirk list in the future: name - firmware
Sandisk SD6SB2M512G1022I   - X210400
Sandisk SD6PP4M-256G-1006  - A200906

Cc: stable@vger.kernel.org
Cc: Richard W.M. Jones <rjones@redhat.com>
Reported-and-tested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>