Commit graph

581086 commits

Author SHA1 Message Date
Ritesh Harjani
b93aab4d22 mmc: mmc: Don't send CMD13 after switch command while switching speed modes
Do not send CMD13 after sending switch command for HS, HS_DDR,
HS200 and HS400 modes. It seems that below problem can occur -
1. After sending switch CMD6, card will switch to mentioned bus speed
mode.
2. At this moment the controller will be in different bus speed mode,
unless the timing of the controller is switched to match with that of
card.

During this time, if CMD13 follows CMD6 to switch the bus speed
mode in card. Then it may cause timeouts or other errors because
of mismatch in timing of controller and card.

Thus send CMD13 to see the status once both controller and card are
switched to same timings.

Change-Id: If796c8cfce2cbdc1bce460460e3276886ae1be0c
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2017-01-11 12:20:08 +05:30
Yahui Wang
1e19092380 ARM: dts: msm: enable display panel for sdm660 QRD
nt36850 wqhd command panel will be used for sdm660 QRD,
so enable it for sdm660 QRD.

CRs-Fixed: 1107352
Change-Id: Ia7a691949bfef8777f78e846b6fb92e01658441f
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
2017-01-11 09:51:50 +08:00
Runmin Wang
5d18545892 ARM: dts: msm: Add TLB dump entries for msm8998
Add TLB dump entries to setup memory space for the cpuss dump
driver to dump TLB entries.

Change-Id: I7514969c1540d18d2102088b43d959adec68152f
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2017-01-10 14:41:51 -08:00
John Dias
5145fb9b00 perf: don't leave group_entry on sibling list (use-after-free)
When perf_group_detach is called on a group leader,
it should empty its sibling list. Otherwise, when
a sibling is later deallocated, list_del_event()
removes the sibling's group_entry from its current
list, which can be the now-deallocated group leader's
sibling list (use-after-free bug).

Bug: 32402548
Change-Id: I99f6bc97c8518df1cb0035814368012ba72ab1f1
Signed-off-by: John Dias <joaodias@google.com>
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 6b6cfb2362f09553b46b3b7e5684b16b6e53e373
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2017-01-10 14:18:20 -08:00
David Howells
7e5d3e2def KEYS: Fix short sprintf buffer in /proc/keys show function
This fixes CVE-2016-7042.

Fix a short sprintf buffer in proc_keys_show().  If the gcc stack protector
is turned on, this can cause a panic due to stack corruption.

The problem is that xbuf[] is not big enough to hold a 64-bit timeout
rendered as weeks:

	(gdb) p 0xffffffffffffffffULL/(60*60*24*7)
	$2 = 30500568904943

That's 14 chars plus NUL, not 11 chars plus NUL.

Expand the buffer to 16 chars.

I think the unpatched code apparently works if the stack-protector is not
enabled because on a 32-bit machine the buffer won't be overflowed and on a
64-bit machine there's a 64-bit aligned pointer at one side and an int that
isn't checked again on the other side.

The panic incurred looks something like:

Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81352ebe
CPU: 0 PID: 1692 Comm: reproducer Not tainted 4.7.2-201.fc24.x86_64 #1
Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
 0000000000000086 00000000fbbd2679 ffff8800a044bc00 ffffffff813d941f
 ffffffff81a28d58 ffff8800a044bc98 ffff8800a044bc88 ffffffff811b2cb6
 ffff880000000010 ffff8800a044bc98 ffff8800a044bc30 00000000fbbd2679
Call Trace:
 [<ffffffff813d941f>] dump_stack+0x63/0x84
 [<ffffffff811b2cb6>] panic+0xde/0x22a
 [<ffffffff81352ebe>] ? proc_keys_show+0x3ce/0x3d0
 [<ffffffff8109f7f9>] __stack_chk_fail+0x19/0x30
 [<ffffffff81352ebe>] proc_keys_show+0x3ce/0x3d0
 [<ffffffff81350410>] ? key_validate+0x50/0x50
 [<ffffffff8134db30>] ? key_default_cmp+0x20/0x20
 [<ffffffff8126b31c>] seq_read+0x2cc/0x390
 [<ffffffff812b6b12>] proc_reg_read+0x42/0x70
 [<ffffffff81244fc7>] __vfs_read+0x37/0x150
 [<ffffffff81357020>] ? security_file_permission+0xa0/0xc0
 [<ffffffff81246156>] vfs_read+0x96/0x130
 [<ffffffff81247635>] SyS_read+0x55/0xc0
 [<ffffffff817eb872>] entry_SYSCALL_64_fastpath+0x1a/0xa4

Change-Id: I23554b54eb9b82f44554a3ef620200de9f6ea55a
Reported-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Ondrej Kozina <okozina@redhat.com>
cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git
Git-commit: 03dab869b7b239c4e013ec82aea22e181e441cfc
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2017-01-10 14:14:57 -08:00
Daniel Rosenberg
c7adff7a0c ion: Fix use after free during ION_IOC_ALLOC
If a user happens to call ION_IOC_FREE during an
ION_IOC_ALLOC on the just allocated id, and the
copy_to_user fails, the cleanup code will attempt
to free an already freed handle.

This adds a wrapper for ion_alloc that adds an
ion_handle_get to avoid this.

Bug: 31568617
Change-Id: I476e5bd5372b5178a213f1fea143d270cf9361ed
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Git-repo: https://android.googlesource.com/kernel/msm/
Git-commit: 20a5411d0115b16826f3d327b6abb0192c8a2001
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2017-01-10 14:08:32 -08:00
Zhen Kong
0963c07e9f qseecom: fix potential memory leak in __qseecom_update_cmd_buf_64
__qseecom_update_cmd_buf_64() called __qseecom_allocate_sg_list_buffer()
to allocate memory from within a for loop. Should it fail on any other
than the first time through the loop, the prior allocations will not be
deallocated, make change to deallocate memory in this error case.

Change-Id: I8cb71a3b141249d8266aec4890632f200d147405
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-01-10 13:14:10 -08:00
Linux Build Service Account
2dc96b1cbb Merge "msm: camera: fd: Call fd buffer done on active buffer" 2017-01-10 12:27:11 -08:00
Linux Build Service Account
9c82f6cac8 Merge "drm/msm/dsi-staging: add dsi definitions for new dsi driver" 2017-01-10 12:27:10 -08:00
Linux Build Service Account
86a4156c95 Merge "ASoC: msm8996: Fix kernel crash in "Speaker Function" mixer control" 2017-01-10 12:27:10 -08:00
Linux Build Service Account
3d66b34e70 Merge "ARM: dts: msm: add audio support for sdm660 qrd skus" 2017-01-10 12:27:09 -08:00
Linux Build Service Account
19511e6726 Merge "ASoC: msm-cpe-lsm: cleanup ioctl functions" 2017-01-10 12:27:08 -08:00
Linux Build Service Account
1847eaf629 Merge "ASoC: msm: Add support for INT5_MI2S vi feedback" 2017-01-10 12:27:07 -08:00
Linux Build Service Account
e7bbbbb031 Merge "ARM: dts: msm: add audio device node for qrd msm8998 interposer" 2017-01-10 12:27:06 -08:00
Linux Build Service Account
36a9ec4be8 Merge "ARM: dts: msm: Add pinctrl for USB type-C analog audio on msm8998" 2017-01-10 12:27:06 -08:00
Linux Build Service Account
8bfd4fdbf3 Merge "clk: qcom: Add support to register GPU rbcpr clocks" 2017-01-10 12:27:05 -08:00
Linux Build Service Account
61b8d2d068 Merge "ARM: dts: msm: enable blink for RGB led" 2017-01-10 12:27:04 -08:00
Linux Build Service Account
aa7e73ef9f Merge "qpnp-pin: Fix null pointer access in qpnp_pin_debugfs_create()" 2017-01-10 12:27:03 -08:00
Linux Build Service Account
7d4cf5211b Merge "security: switched to stackable model for PFT/PFK module" 2017-01-10 12:27:02 -08:00
Linux Build Service Account
d2da327b0b Merge "clk: qcom: Fix clocks which are required to be always on" 2017-01-10 12:27:02 -08:00
Linux Build Service Account
17f73896b6 Merge "msm: sps: add the checking of userspace input length" 2017-01-10 12:27:01 -08:00
Ram Chandrasekar
8bd88623cc ARM: dts: msm: Add alias information for tsens in msm8998
Add alias name for the temperature sensors for msm8998. This information
will be read by KTM and will be communicated to thermal-engine.

Change-Id: Ia0a579f1ead211cefa42fc846a32aa3419b1259b
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2017-01-10 12:53:01 -07:00
Nicholas Troast
9645aa1f61 smb-lib: fix Type-C removal detection with OTG
When VCONN is enabled while OTG is disabled the CC line which is not
configured for VCONN can be internally pulled down. If the Type-C plug
were removed then Type-C detection would still see that Rd is applied and
not detect the removal.

Fix this by ensuring that OTG is enabled while VCONN is enabled. If OTG
were disabled due to an over-current event then VCONN must also be
disabled.

Implement a retry mechanism if over-current is detected on either VCONN or
VBUS.

Change-Id: Iccfb923bce8f06c7c1270943211ce134ea9ef616
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-01-10 11:38:45 -08:00
Syed Rameez Mustafa
47f7e0415a sched: Convert the global wake_up_idle flag to a per cluster flag
Since clusters can vary significantly in the power and performance
characteristics, there may be a need to have different CPU selection
policies based on which cluster a task is being placed on. For example
the placement policy can be more aggressive in using idle CPUs on
cluster that are power efficient and less aggressive on clusters
that are geared towards performance. Add support for per cluster
wake_up_idle flag to allow greater flexibility in placement policies.

Change-Id: I18cd3d907cd965db03a13f4655870dc10c07acfe
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2017-01-10 11:01:52 -08:00
Taniya Das
6a6c254115 clk: qcom: Add support to register GPU rbcpr clocks
GPU RBCPR clocks needs to registered separately, as GFX CPR would require
the rbcpr clocks to register the regulator handle.

Change-Id: I59def76e7dd69600be8faf47eb867a97ab04739e
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-01-10 20:54:51 +05:30
Ramesh V
640e4defce ARM: dts: msm: Change SVS clock rate for VFE on msm8998
Change SVS clock for vfe_clk_src from 384MHz to 480MHz.

Change-Id: Ieff3fed56bc669e5b36022bb3282f17120cf949f
Signed-off-by: Ramesh V <ramev@codeaurora.org>
2017-01-10 05:12:01 -08:00
Sandeep Panda
2eb4e731c5 msm: mdss: remove timing db mode from DSI host init sequence
In the current implementation DSI timing db(Double Buffering)
mode is set as part of DSI controller initialization. This is
causing DSI command transfer failures when sending panel init
commands during device resume for some platforms like SDM660.
Since on these platforms DSI_CMD_OFFSET and DSI_CMD_LENGTH
register has now become double buffered and hence would need a
control flush, for these registers to take effect. But control
flush in driver does not happen until panel init is done properly.
So removing the programing of timing db registers from DSI host
initialization sequence as this is already taken care during dynamic
refresh rate change usecase.

Change-Id: Ia08788127f4d132530e3f3a28efd9d7ee9869483
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-01-10 17:53:28 +05:30
Taniya Das
55b19878c2 clk: qcom: Fix clocks which are required to be always on
Following are the changes made:
1. Add CLK_IGNORE_UNUSED flag for some clocks which are not
   supposed to be disabled at late_init_level.
2. Fix clock measure debug mux value for mmcc clocks.
3. Add mmss_mdss_byte1_intf_div_clk for mdp.
4. Fix usb ref clocks to branch voted.

Change-Id: I06396c73f7855acfac283abe576e0b4cc1a92bd5
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-01-10 14:10:02 +05:30
Linux Build Service Account
0a8e939a4e Merge "ARM: dts: msm: Enable blsp2_uart1_hs for sdm660 QRD" 2017-01-09 23:59:49 -08:00
Linux Build Service Account
67110b8cb6 Merge "ARM: dts: msm: Add support for A540 710MHz on msmcobaltv2" 2017-01-09 23:59:48 -08:00
Linux Build Service Account
8b8ae0ed76 Merge "common: DMA-mapping: add per-buffer coherent mappings attributes" 2017-01-09 23:59:47 -08:00
Linux Build Service Account
8313c19b74 Merge "iommu/arm-smmu: support querying IOVA coherency" 2017-01-09 23:59:46 -08:00
Linux Build Service Account
875855417e Merge "iommu: support querying IOVA coherency" 2017-01-09 23:59:45 -08:00
Linux Build Service Account
09d27a060b Merge "iommu/io-pgtable-arm: support querying IOVA coherency" 2017-01-09 23:59:45 -08:00
Linux Build Service Account
8787746ecb Merge "msm: mdss: Fix dynamic refresh sequence" 2017-01-09 23:59:38 -08:00
Yahui Wang
92172af176 msm: mdss: add backlight gpio invert support for display
Some platforms may use external gpio to enable and disable backlight,
and we may need to invert this gpio according to HW design,
so add support for that.

CRs-Fixed: 1109294
Change-Id: Ib5e895eebcc38d185e8b703c3d895781b43c58c7
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
2017-01-10 14:51:52 +08:00
cyizhao
115a780108 ARM: dts: msm: enable blink for RGB led
Add PWM parameters to blink the RGB LED.

CRs-Fixed: 1106886
Change-Id: I2e4c67ffc7adbab887ae417c9c46bca786936cd1
Signed-off-by: cyizhao <cyizhao@codeaurora.org>
2017-01-10 10:20:50 +08:00
Benjamin Chan
8e761d5f69 msm: sde: Enable traffic shaping for 4k@30fps rotation
For 30fps rotation, it is only required to perform a commit every other
vsync for a 60fps refresh rate panel. Rotation time for a 4k resolution
will take approx 12ms including SW overhead, and leave very little room
to perform a frame commit in fb driver. One way is to delay the
rotation time by enabling traffic shaping for 4k@30fps content so that
the it will take approx 15ms to finish, and that will force the frame
commit into next vsync time slot and thus matching the cadence of
30fps commit time.

CRs-Fixed: 1100633
Change-Id: I0aecfe767cd77140f75bb13c4fe6f9267d4d911e
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-01-09 19:41:05 -05:00
Subbaraman Narayanamurthy
e17f4cf09e qpnp-pin: Fix null pointer access in qpnp_pin_debugfs_create()
qpnp_pin_debugfs_create() is going through all the child nodes
to create debugfs entries whereas the allocation for q_spec is
made only for available child nodes. This leads to a null pointer
access when CONFIG_GPIO_QPNP_PIN_DEBUG is selected in defconfig.
Fix it by using number of gpios available under each gpio chip
which was populated from the available child count already.

Change-Id: I17cbeeba158d34180763087103da4b03e01f7c90
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-01-09 16:21:51 -08:00
Oleg Perelet
14adb1564e ARM: dts: msm: Add support for A540 710MHz on msmcobaltv2
Add 710MHz to A540 GPU power level on msmcobaltv2 as per
the hardware recommendation.

CRs-Fixed: 1085733
Change-Id: Iceff8329caf939ad3b34d6a750f056026853c76a
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
2017-01-09 13:00:35 -08:00
Linux Build Service Account
a6d83d2e8e Merge "usb: gadget: Fix null pointer crash issue in gsi_free_inst" 2017-01-09 12:42:41 -08:00
Linux Build Service Account
f272bb9cd5 Merge "sched: add the max_freq comparing for evaluating the mitigation" 2017-01-09 12:42:40 -08:00
Linux Build Service Account
2b36adfb73 Merge "ARM: dts: msm: Enable early firmware loading for SDM660" 2017-01-09 12:42:40 -08:00
Linux Build Service Account
e58fd61c4f Merge "ARM: dts: msm: Change the resource name for LPI CX/MX regulators" 2017-01-09 12:42:39 -08:00
Linux Build Service Account
77fadbc47f Merge "sched: fix stale predicted load in trace_sched_get_busy()" 2017-01-09 12:42:38 -08:00
Linux Build Service Account
c081bc0dbd Merge "ASoC: msm: Remove DOLBY_DAP config from sdm660" 2017-01-09 12:42:37 -08:00
Linux Build Service Account
8992a2bc85 Merge "qpnp-qnovo: Remove dependency on adapter current limit" 2017-01-09 12:42:36 -08:00
Linux Build Service Account
de87f8c7f5 Merge "thermal: tsens: Switch from usleep_range() to msleep" 2017-01-09 12:42:36 -08:00
Linux Build Service Account
9801eea3b6 Merge "coresight: fix spinlock corruption issue" 2017-01-09 12:42:35 -08:00
Linux Build Service Account
a999a488bf Merge "msm: kgsl: Remove BUG_ON from the map global" 2017-01-09 12:42:34 -08:00